Tuesday, May 11, 2021
Home » Bonus Content » VEXpro Controller

VEXpro Controller


EDITOR’S NOTE: If you are looking for the bonus content for the “Add Bling To Your Robot With Multicolor LEDS” from page 44 in the March/April 2012 issue of ROBOT magazine, please CLICK HERE



The VexPro and Linux

VEXpro runs a bare-bones version of Linux. For the advanced user, a controller running Linux with direct I/O control from user space and built-in wifi is a huge step forward compared to most current offerings.  Linux makes the VEXpro extensible and modifiable. Opkg, its Linux package manager, enables downloading useful apps from suitable repositories. One I’ve used in the past is picocom: a  terminal emulator.

Linux on the VEXpro also runs user applications and supports a variety of peripheral devices, including Linux-compatible webcams. There did not appear to be a driver for FTDI USB serial installed, but that should be straightforward. In combination with a USB hub, the USB host port enables attaching a wide variety of USB peripherals.

More and more, advanced robotics requires multiple networked computer systems that collaborate and each perform a different part of the task. The VEXpro with its wifi link fits well into this paradigm. ROS (the Robot Operating System from Willow Garage), a Linux program that runs on multiple computers is based on this premise. One computer may handle vision, another perception and planning, and the VEXpro could provide the low-level I/O. At the Dallas Personal Robotics Group (DPRG) we are currently planning ROS integration for the VEXpro…  stay tuned.

As with any real time system, it’s beneficial to understand how responsive your controller needs to be.  Linux has limitations on real time response: it may not react instantly. Arrival of a network packet, or an internal scheduler interrupt, may delay its response by tens of milliseconds. This unpredictability is not an issue for many ground robots, but may not be acceptable in more demanding applications such as aircraft flight stabilization.

A big benefit of Linux on the VEXpro is that it’s open source. Crowd-sourced applications and fixes suddenly become possible that aren’t possible on a proprietary system. But be warned that it can also be a liability: you don’t have a vendor’s support for your modifications to the system. If you have problems you may die if you can’t fix them.



Vision Software: How to Download, Build and Run

How to Download Source Code with Subversion

What is subversion? It’s a program that downloads entire folders and all their contained files and subfolders from a special website called a subversion repository. The repository stores the folders and files in a special way that lets software developers retrieve previous versions of every source code file. Subversion is typically abbreviated svn.

You can browse directly to a subversion repository and view and download source code files using your browser. That is the hard way to acquire source code. A much more efficient and less error-prone way of acquiring source code is to install an svn client on your PC (there are many, but TortoiseSVN is one I recommend), and tell it to download a folder from a repository. Svn clients will accept the URL given in this article, and will store a copy of the latest version in a place of your choosing.

How to Build and Run  the Software

The server folder contains the source code that you can open in the IDE, build and download by following these steps:

1.            Click the “Create New Project” in the IDE.

2.            In the popup dialog, name the project “watchVideo”, uncheck the “Use default location” and browse to the server folder in the location where you downloaded the VEXpro code. Make sure you have selected the project type as an Executable empty project. Press the Finish button.

3.            Right-click on the watchVideo project folder in the Project Explorer and select “Clean Project”. In the Project Explorer you will see a Debug folder get created, and in it several files including one called watchVideo. This is the program which will run on the VEXpro.

4.            With the watchVideo project selected, click the “Run Program” button.

5.            Select the Console tab in the lower pane and if the program recognized your webcam it should have printed “waiting for video client connection on port 5005″. All is well.

6.            If you don’t see the “waiting for video client” message, your webcam may need different program options. Launch a terminal, cd /opt/usr/bin, and run ./uvcsrvr h. Look at the help for different options that may be appropriate. Read the README.txt in the watchVideo folder, which will contain the latest suggestions.