Preparations and Building EEROS with ROS Support

Back to Interfacing with ROS.

ROS1 or ROS2 needs to be installed on the developer machine as well as on the target machine. For building the EEROS library with ROS support, for building an EEROS application with ROS support or before an EEROS application with ROS support can be started, you need to run the setup.bash script of ROS. This can be done with

source /path_to_ros_install_dir/setup.bash

Our EEROS build scripts already include the setup.bash.

IMPORTANT If an integrated development environment such as kdevelop or Qt Creator is used, the IDE has to be started from a terminal after the setup.bash script has run therein.

EEROS defines its own ROS messages.

They are used to transport an analog signal (double or array of doubles) together with its timestamp. The digital message is of type boolean or array of boolean together with its timestamp.

When you use these messages in one of your applications or want to run one of the ROS examples in EEROS, make sure to make these messages available by running the corresponding setup script with

source /path_to_eeros_install_dir/share/eeros_msgs/local_setup.bash

Building the EEROS library with ROS

If you build the library with cmake, make sure you use the -DUSE_ROS=TRUE (for ROS1) or the -DUSE_ROS2=TRUE (for ROS2) switch. An example of a cmake call could look like this:

cmake -DCMAKE_INSTALL_PREFIX=“$install_dir” -DUSE_ROS2=TRUE ..

Our build scripts already include this switch.