JetsonHacks

Exploring ROS – RACECAR/J

Exploring ROS - RACECAR/J

Exploring ROS is easy using the both the built-in tools and additional GUI based tools. Looky here:

This is a little different than most the content on JetsonHacks. Basically we bring up a running ROS system using the MIT RACECAR stack and take a look around. This gives some background on how to use the ROS introspection tools. There are several ways to gather the same information, using both graphics based tools and command line tools. In the video, we mix these up a bit so that you can get a feel on how to explore on your own.

To be clear, PLAY! A lot of people ask “How do I do this?” or “I want to do this, what should I do?”. These types of projects are not about some rote method of “Do this, do that”. Get in there, take things apart, put things together! Look around, play and see what happens. You will need to understand how all this works and ties together, and the only way to do that is to get your hands dirty.

Many people ask us questions such as “How do I do this?” You will always receive the reply, “What did you try?” If you haven’t tried anything, you don’t have a foundation from which to ask a question. Therefore we can’t help you. On the other hand, if you say “I tried this, that and the other thing and it didn’t work”, there’s a starting point on which to build. Plus, you’re smart enough to figure most of this out on your own, you don’t need help.

Same thing with general questions. If a simple one sentence question requires a PhD dissertation as an answer, you should consider breaking the question into something just a little more specific.

Background

Because of the format of the video which is an interactive exploration of the RACECAR stack, we’ll just have some notes here. You should definitely have the book “Programming Robots with ROS, a practical introduction to the Robot Operating System” by Morgan Quigley, Brian Gerkey and William D. Smart. The book is written by the people who wrote ROS originally, and has a very good overview of ROS and practical application.

Notes

rqt is a Qt-based framework for GUI development for ROS. It consists of three parts/metapackages:

In the video, we load rqt:

$ sudo apt-get install ros-kinetic-rqt -y
$ sudo apt-get install ros-kinetic-rqt-common-plugins -y
$ sudo apt-get install ros-kinetic-rqt-robot-plugins -y

You should know that most of the command line tools shown in the video have equivalents in the rqt system. Again, Play! There is so much more than can be covered in a few minutes of video. We chose to use command line tools in addition to rqt so that you would be exposed to both ways of doing the same tasks. It is easier to see the full graph of the system in rqt, it’s easier to see the messages using the command line.

We use several command line tools:

These are specific tools, and are useful. There is a very rich environment of documentation and examples, both on the ROS Wiki and elsewhere. Please use those resources to become familiar with the concepts in use here.

One thing we didn’t cover in the video is the mechanism which ROS uses to communicate between nodes. We know that ROS topics provide access to ROS messages.

ROS is pretty simple conceptually, but as in most distributed systems it can turn in to a tangle when you try to examine it. There is roscore, which is the minimum number of ROS nodes and the server which constitute the ROS “kernel” if you will. The server is “ROS MASTER” (you may recall this from setting up ROS). ROS Master conceptually keeps track of all the nodes. When a node registers a publish/subscribe request, it looks up corresponding nodes which are interested in that information based on the rostopic the node wants to use. ROS Master also communicates with a parameter server to inform nodes of how messages are constructed.

ROS Master has other responsibilities of course, but it’s useful to know at least that it is responsible for the lower level communication.

Conclusion

This is the first part of an occasional series of post of hands on with the RACECAR ROS stack. We are planning more in the future, stay tuned!