Setting up rosserial with ROS Kinetic Kame

Despite the world having moved on since 2016, there are some compelling reasons to still be using ROS Kinetic Kame which was designed for Ubuntu 16.04.


Most of these compelling reasons boil down to following existing Turtlebot3 tutorials, running ROS on a Raspberry Pi 3 etc.

Rosserial is a useful library for allowing devices which can send and receive UART to publish and subscribe to ROS topics.

If using rosserial with Kinetic Kame there is a bit of an involved method to follow the ROS Wiki tutorials for rosserial with arduino.

This applies to installing rosserial on Kinetic Kame running on Ubuntu 16.04 at the date of publishing (October 2021).

Issues

1) The rosserial arduino tutorial (http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup) asks you to clone a github which currently relies on a minimum version of catkin_make which is more recent that Kinetic Kame has installed

2) The scripts to build rosserial_server require a compiler setting for C++11, which if not added to the CMakefiles.txt will cause a fatal error.

Solution

1) If the image above instead of cloning the latest branch of github, specify the Medolic-devel branh. So replace:

  git clone https://github.com/ros-drivers/rosserial.git

with:

  git -b melodic-devel clone https://github.com/ros-drivers/rosserial.git

2) Add "add_complile_options(-std=c++11)" to the beginning of the CMakeLists.txt in ~/catkin_ws/src/rosserial/rosserial_server/CMakeLists.txt

So navigate to the CMakeLists.txt file and add this tot he first line.

add_complile_options(-std=c++11)

Hopefully now when you run catkin_make in the catkin workspace root directory it will be able to successfully compile rosserial on your copy of Kinetic Kame.



Comments