ROS Melodic and RPi 4 on Raspian Buster

Hey all!

I’m working on getting our Turtle rover upgraded to the newest ROS-based Leo OS. The end goal is to use ROS and rtabmap or hector_slam with a Lidar mounted on the bot for autonomous driving.

I’ve tried the Turtle to Leo upgrade guide, and got the latest image (“tr_2019-07-15.img.xz”) running on our old raspi 3, but it had some issues that prevented me from actually using that image.

It kind of worked, but there were some issues with the leo service, and with ROS communicating with the Turtle Hat. I was able to get ROS connected to roscore running on my laptop, and could send commands to the tr_hat_bridge nodes, but the Web UI wasn’t working, no motor/servo control from there. I could get it to show battery voltage in the UI if I manually did ‘rosrun tr_hat_bridge tr_hat_bridge’, but that was it.

All of this, plus the fact that I want to run a new RPi 4 in the Leo, made me look at a fresh OS build. Ubuntu Core doesn’t have support for the RPi 4, and Ubuntu Mate support is in an early dev state so I didn’t want to use either of those.

I decided to just use Raspian Buster, which works on both RPi 3 and 4, and supports ROS Melodic (which is what I have installed on my linux dev environment).

So currently I’m building ROS melodic on the RPi. I didn’t want to deal with the QEMU build so I’m just taking the slow route, and doing all the compilation on the RPi. I’ve essentially followed the install scripts from the turtleos github repo, replacing ‘kinetic’ with ‘melodic’. I’ve also been following this guide: https://www.instructables.com/id/ROS-Melodic-on-Raspberry-Pi-4-RPLIDAR/
and this forum post: How to install ROS on a Turtle Rover - Tutorial
(for a few config.txt changes needed to enable communication with the turtle hat)

Right now, the RPi is building the ROS-Desktop environment plus the TurtleOS dependencies. If that fails, I’m going to try compiling the ROS-Core environment which is a lot lighter. I’m sure the RPi 4 could handle the compilation, but it won’t get here until Monday.

Once ROS is built, I just have to switch back to the pi user, create a catkin_ws folder and pull the tr_ros repo. Then I build that as my new catkin workspace, source the devel/setup.bash file, and I should have a working RPi with ROS and the tr_ros nodes.

If all of that works (or if it doesn’t haha), I’ll make sure to post a full guide here so anyone who wants to can do the same. I can post an OS image too, once I have a working system.

Is there any major reason Leo still uses kinetic besides that having been the major release when development started? Is anyone seeing any obvious roadblocks or reasons this will fail, or anything I’ve overlooked here?

I’m sure I’m forgetting some details or something important… oh well :wink:

Thanks!
Joe

So I was able to get the ROS install compiled over the weekend. Seems like everything is working, I have tr_hat_bridge working with ROS. Serial communication worked after I enabled serial in raspi-config and disabled “login shell over serial”.

I’ve still got some things to cleanup so that ‘roslaunch tr_bringup tr_bringup.launch’ works correctly. v4l2 and gcam aren’t happy right now either. It’s also complaining about " can’t locate node [tr_system] in package [tr_bringup]"

But, as far as I can tell, I can just do ‘rosrun tr_hat_bridge tr_hat_bridge’ and then I can successfully send Twist messages to the motors, or read battery voltage, etc.

Final test before I move this all over to the RPi 4 that should arrive today, is to get the Lidar working again, and hopefully get hector_slam running.

Raspbian Buster does not support gstreamer 0.1 anymore which is the default version gscam is using. To use 1.0 version, you need to build gscam with CMake flag -DGSTREAMER_VERSION_1_x=On.
To install gstreamer with the standard plugins, use:

sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly

The pipeline (gscam_config parameter) may also need to be changed

I’m afraid not. When the development started, Raspbian Buster was still in the testing stage. Apart from that, kinetic and melodic distributions don’t differ too much (besides being build on newer system dependencies) and are mostly compatible