Install the Terk IDE

Install the development environment for the VEXPro controller - known as the Terk IDE - on your windows PC or virtual machine following these installation instructions. We will call this system the VEXPro build system. (Ignore the instructions for installing on Linux.)

Do the VEXPro Terk IDE example tutorial here, to make sure you can successfully build and run programs on the VEXPro controller.

Installing Rosserial from Source

At present, installing from source is the only way to get the rosserial_embeddedlinux package. You'll need to do these few steps.

Note: source build instructions are different for groovy (catkin) than for earlier (rosbuild) releases. Select the build system based on your release to see appropriate instructions.

Rosserial has been catkin-ized, and the workflow is a bit different from in the past. Rather than running the library generator over each package you want to use, you run it once and generate libraries for all installed messages. In the instructions below, <ws> represents your catkin workspace.

  cd <ws>/src
  git clone https://github.com/ros-drivers/rosserial.git
  cd <ws>
  catkin_make
  catkin_make install
  source <ws>/install/setup.bash

These commands clone rosserial from the github repository, generate the rosserial_msgs needed for communication, and make the ros_lib library in the <ws>/install directory.

Note: currently you HAVE to run catkin_make install, otherwise portions of the ros_lib directory will be missing. This will hopefully be fixed soon.

hg clone https://kforge.ros.org/rosserial/hg rosserial
rosmake rosserial_embeddedlinux

These commands clone rosserial from the kforge repository using mercurial, generate the rosserial_msgs needed for communication, and make the ros_lib library.

Install rosserial_embeddedlinux into the VEXPro Terk Development Environment

Ros_lib installation instructions are different for groovy source (catkin) than for earlier (rosbuild) releases. Be sure you've selected the correct build system above to see appropriate instructions - catkin for a groovy source build, rosbuild otherwise.

You need to create the ros_lib and examples folders in some appropriate directory. These commands also copy the examples directory to the target location.

  cd <some_directory>
  rm -rf ros_lib examples
  rosrun rosserial_embeddedlinux make_libraries.py .

Note: you have to delete ros_lib in order to regenerate as its existence causes an error.

Now create a tar archive of the libraries and examples directories in the rosserial_embeddedlinux package as follows:

$ tar -cf rosserial_embeddedlinux.tar libraries examples

Transfer the .tar file to the Terk build system and untar it into a suitable folder, such as C:\Users\<username>\workspace. (Replace <username> with your Windows username.) As part of the Terk IDE install, you installed cygwin. Open a cygwin window and cd to the workspace directory and untar it:

# cd /cygdrive/c/Users/<username>/workspace
# tar -xf rosserial_embeddedlinux.tar

You now have two new directories in your workspace: libraries, and examples.

On your ROS workstation, create a tar archive of the libraries and examples directories in the rosserial_embeddedlinux package as follows:

$ roscd rosserial_embeddedlinux
$ tar -cf rosserial_embeddedlinux.tar libraries examples

Transfer the .tar file to the Terk build system and untar it into a suitable folder, such as C:\Users\<username>\workspace. (Replace <username> with your Windows username.) As part of the Terk IDE install, you installed cygwin. Open a cygwin window and cd to the workspace directory and untar it:

# cd /cygdrive/c/Users/<username>/workspace
# tar -xf rosserial_embeddedlinux.tar

You now have two new directories in your workspace: libraries, and examples.

Now you've copied ros_lib and examples directories to an appropriate place in your VEXPro development environment, try the embedded linux tutorials.

Build the Second Tutorial

  • Run the Terk IDE and press the "Create New Project" button
  • In the popup dialog, type the new Project Name: "Hello Ros". (Do not type the quotes.) Uncheck "Use default location" and browse to the examples/HelloRos directory. Choose Project Type: "Empty Project" and Toolchain: "TerkOS Cygwin GCC". Finish the dialog and ignore the build failure.
  • Right-click the Hello Ros project in the Project Explorer pane and select properties
  • In the left navigation pane, expand the "C/C++ Build" property group by clicking the arrow, and select "Settings".
  • In the main pane, "Tool Settings" tab, expand the "TerkOS C++ Compiler" settings and select the "Directories" folder.
  • Next to "Include Paths -I" click the + button and type the following path into the dialog:

../../../libraries/ros_lib

This gives the compiler the path to ros.h and the other library files for rosserial_embeddedlinux. Adjust appropriately if you placed the libraries elsewhere.

  • Close the properties dialog with "Ok". From here, the build instructions are the same as for any Terk project:
  • Select the console tab in the bottom half of the Terk IDE. This will display the output as the project builds
  • Right-click the Hello Ros project in the project explorer and select "Clean Project". You should see that it "Finished building target" with no errors.
  • If there were build errors, correct them.

Congratulations! You have now completed the first tutorial - VEXProInstall. You are now ready to run and test it by following the Example Publisher tutorial

Wiki: rosserial_embeddedlinux/VEXProInstall (last edited 2013-03-21 12:07:57 by PaulBouchier)