JetsonHacks

JetsonBot Part 9 – Robot Operating Center Software – Vision Robot with a Create 2 Base

Install Robot Operating Center
The JetsonBot has companion software called the Robot Operating Center (ROC) which is run on a separate computer. The ROC can be run on a traditional laptop or desktop PC, but in this case it is being on another Jetson TK1. Looky here:

Background

The JetsonBot is a self contained robotic platform. The software controlling the JetsonBot runs on a Jetson TK1 mounted on the JetsonBot. In order to ‘talk’ to the JetsonBot, another computer networks into the JetsonBot. Because the ROS software that runs the JetsonBot works in a publish/subscribe manner, it is possible for the remote computer to communicate over the network and send messages to the JetsonBot. The remote computer runs the ROC software, which allows visualization of the JetsonBot data streams using tools such as robot visualizer (or rviz) and the JetsonBot dashboard. The ROC currently is lightly modified ROS TurtleBot software, though that will probably change as time goes on.

There are two Jetson TK1s being used in the video. One is running the JetsonBot, the other is running the ROC software. The video cast is being recorded from the Jetson TK1 running the ROC software.

It’s always something …

If you install rviz on a Jetson TK1 after installing ROS Indigo and try to launch it, rviz suffers a segmentation fault. People in the ROS community tracked the culprit to an updated version of a Collada library. Collada is used to import 3D computer models of a robot in to the ROS environment. As of this writing, the current fix is to recompile robot_model from source, which will include recent fixes that address the issue.

Also, when starting the JetsonBot software on the robot side, the ‘robot_state_publisher’ process would die, like in the following message:

process[robot_state_publisher-2]: started with pid [8262]
[robot_state_publisher-2] process has died [pid 8262, exit code -11, cmd /opt/ros/indigo/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/ubuntu/.ros/log/10285482-331d-11e5-8fec-acfdce134093/robot_state_publisher-2.log].
log file: /home/ubuntu/.ros/log/10285482-331d-11e5-8fec-acfdce134093/robot_state_publisher-2*.log

Let’s just say this is what we call no bueno, since none of the robot state information gets published to any outside observers. Fortunately, recompiling robot_model fixes this issue too.

Once that issue is fixed, the next issue that springs up has to do with ‘laser scans’. On the JetsonBot, there is a process which takes the information in the depth image from the RGBD camera and converts it into a simulated 2D laser scan. One of the issues recently introduced in ROS Indigo manifests itself as:

[ERROR] [1437863905.354126034]: Scan message must contain angles from -x to x, i.e. angle_min = -angle_max

This issue needs to be addressed if you’re planning to do Simultaneous Localization and Maping, or SLAM.

Fortunately Vincent Rabaud in the ROS community has come up with a fix, which is included in the slam_gmapping repository.

That these two issues can be summed up in a couple of paragraphs does not mean that they were easily solved. As usual, it took several hours to figure out what the issues were and run down the usual Internet rabbit holes looking for fixes. It is not intuitive that rviz having issues and robot_state_publisher crashing are related when first starting to examine the problem.

I’m sure you’ve noticed that the JetsonHacks github repository has a whole slew of repositories. It’s exactly for this reason. When videos are made of an installation, it’s easier to forego the ‘enhancements’ and ‘fixes’ that come along later in the development cycle of software in order to have a version that ‘works’ as seen in the video. As I have stated before, professional software developers are not paid to write software, they end up being paid to maintain it.

Installation

First, on a fresh L4T OS installation install ROS Indigo. If you are still in the same Terminal window:

$ source ~/.bashrc
$ cd ~/

to refresh some of the environment variables the ROS installation added.

Next, clone the installJetsonBot repository and install and build all of the packages:

$ git clone https://github.com/jetsonhacks/installJetsonBot.sh
$ cd installJetsonBot
$ ./createJetsonBotWS.sh
$ ./installJetsonBot.sh

Next, configure the ROC:

$ ./setupROC.sh

This will add the appropriate environment variables to the ~/.bashrc script, the script which is called whenever a Terminal is opened. You will have to edit bashrc:

$ gedit ~/.bashrc

So that you can uncomment the ROS_MASTER_URI and ROS_IP lines. Set the ROS_MASTER_URI to the IP address of the JetsonBot, and the ROS_IP to that of the computer where ROC is being installed. Save and close bashrc. You will either have to ‘source’ bashrc:

$ source ~/.bashrc

which has the effect of reloading the bashrc file into the current Terminal environment, or close the Terminal and open up a new one. At that point you should be good to go. The demonstration video shows starting up the JetsonBot and opening a dashboard and rviz session to give you a feel for what to expect.

Off to Part 10: Voice Commands