Servers by jDrones

ROS and Raspberry Pi | Tutorial for Beginners

raspberrypi
ros

(Tiziano Fiorenzani) #1

Technically speaking there is no mention of any autopilot in my tutorial. But, as ROS (Robot Operating System) becomes more and more popular, I kinda felt like it was time to create a Tutorial for beginner that was actually fun to do (and watch, I hope).

So I decided to go for a real example. I had my Donkey Car (donkeycar.com) parked somewhere (too many things to do) and I thought that would have been a perfect robot to start with.

This video covers (it's long, but I wrote down the time marks in the description on YouTube):

  • setting up a Raspberry Pi 3 with an SD card image from Ubiquity Robotics, with ROS Kinetic installed. 
  • installing ROS on Ubuntu
  • ROS master, ROS_MASTER_URI and ROS running on multiple platforms
  • Packages installation and creation
  • topics and messages
  • writing a script (publisher and subscriber) in Python
  • lots of fun outdoor

You are all welcome to contribute with your own packages!

CODE: Find the code on Github

CLICK HERE TO GO TO THE VIDEO ON YOUTUBE


(James Pattison) #2

Great intro: really looking forward to the ROS series. I didn’t follow along with DonkeyCar, but if MAVROS is coming I’ll definitely jump onboard.


(Tiziano Fiorenzani) #3

Ardupilot is going to be included. We just need to cover the basics first. I thought that was easier to follow on a real example rather than on a gazebo simulation


(James Pattison) #4

For sure: I think that’s a good approach, as going too deep too quickly can be overwhelming.

I skipped DonkeyCar as it is basically just an iteration on good ol’ TurtleBot :slight_smile:

Are you sticking with Kinetic throughout, or transitioning to Melodic?

Regards,

James


(ppoirier) #5

Yes it is a good start :+1:
It’s not easy to find an interesting project to dive into ROS, the donkey car is much more interesting than the turtles.

Btw the image for the RPI (ubiquity robotics) is the same as the http://stereopi.com/#main , so the kernel can process stereoscopic camera on the & pointcloud images (you need to run on a Pi Compute Module)…so bear in mind for future projects :wink:


(James Pattison) #6

https://dronee.aero/pages/lychee might be an option to get the cm3, 2 cameras and an autopilot all in a clean install :slight_smile:


(ppoirier) #7

Yes James , this could be used as well, providing the camera trigger is correctly designed to work as stereoscopic.


(Tiziano Fiorenzani) #8

I was thinking to Lychee too. They might be interested to send a free sample either. I will ask.
I thought that applying ROS to a real robot, as simple as a “snap-a-pi-on-a-car” could have been more entertaining (for me too) than using Gazebo. Plus there is the matter of distributing ROS on multiple platform that might be very tricky.

Here I call ROS experts to contribute to the series. If you want to suggest a topic (funny, a /topic…) or a video or a package you have developed, do let me know. You will be mentioned in the video. I love collaboration!


(ppoirier) #9

Definitively revisit Aruco Code as a position estimator under ROS and remap the pose as Vision Position on Mavros. That can run on a PI and it can be used to control a quadcopter.

This is oubviously more advanced stuff and prerequisites are RQT , RVIZ and SITL (or Gazeboo). As you might say: step by step,thi iis a long journey, lets enjoy


(Tiziano Fiorenzani) #10

ROS: Launching nodes

The first video is going great, but I received lots of comments and questions that made me feel I have gone too fast.

So I decided to take a step back and divide the series is smaller, slower videos , where I guide step by step into the ROS concepts .

Episode #1: launching nodes, compiling packages, launch files, rosrun, roslaunch…