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 your 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.

Copy the rosserial_embeddedlinux/libraries directory into an appropriate place in your embedded linux development environment.

If necessary, copy the ros_lib and examples directories to a Windows machine, or wherever you do your embedded linux development.

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

Development Environment

Each embedded Linux system is typically supported by its own development environment. Most cross-compile the target binary on a development host such as a Windows or Linux PC or virtual machine. Refer to your system's documentation for instructions on how to install the development environment and how to deploy the built binary onto the target.

Building the Examples; Download, Test and Debug

The rosserial_embeddedlinux/examples directory contains a set of examples that are described in these tutorials. You compile them for your target, ensuring that the compiler's set of include directories includes a path to the location you installed libraries/ros_lib. This is typically done in a Makefile with a -I<path_to_ros_lib> flag, or in a GUI with an include directory project property.

The output of building the examples is an executable file built to run on your embedded linux target system. Use your system-specific procedures to copy the file to the target, run and debug it.

Wiki: rosserial_embeddedlinux/GenericInstall (last edited 2013-03-10 01:04:45 by PaulBouchier)