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
13 Responses
Well I reinstalled everything from scratch and was very careful to do everything in the right order, after installing part 6-1 I noticed that it did not update the bashrc file like you showed in the video so I manually updated with this:
export ROS_MASTER_URI=http://192.168.0.58:11311
export ROS_HOSTNAME=192.168.0.58
export TURTLEBOT_BASE=create2
export TURTLEBOT_STACKS=circles
export TURTLEBOT_3D_SENSOR=asus_xtion_pro
export TURTLEBOT_SERIAL_PORT=/dev/ttyUSB0
and continued on to finish the installs and it did without any errors that I saw then I tried to bring up the Bot and got this error…
File “/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py”, line 673, in main
f = open(args[0])
IOError: [Errno 2] No such file or directory: ‘/opt/ros/indigo/share/turtlebot_description/robots/create2_circles_asus_xtion_pro.urdf.xacro’
while processing /opt/ros/indigo/share/turtlebot_bringup/launch/includes/robot.launch.xml:
while processing /opt/ros/indigo/share/turtlebot_bringup/launch/includes/description.launch.xml:
Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/share/xacro/xacro.py ‘/opt/ros/indigo/share/turtlebot_description/robots/create2_circles_asus_xtion_pro.urdf.xacro’] returned with code [1].
Param xml is
The traceback for the exception was written to the log file
ubuntu@tegra-ubuntu:~$ sudo nano ~/.bashrc
ubuntu@tegra-ubuntu:~$ source ~/.bashrc
ubuntu@tegra-ubuntu:~$ roslaunch turtlebot_bringup minimal.launch –screen
… logging to /home/ubuntu/.ros/log/b11d4b94-a6f0-11e5-8310-00044b490816/roslaunch-tegra-ubuntu-2793.log
I got this error on the last install as well, that’s why I did the re-install, I thought maybe I missed a step…
I had a similar issue. When I changed the export TURTLEBOT_BASE=create2 to TURTLEBOT_BASE=roomba in the bashrc, it worked.
I followed the file path in the –>
Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/share/xacro/xacro.py ‘/opt/ros/indigo/share/turtlebot_description/robot/create2_circles_asus_xtion_pro.urdf.xacro’] returned with code [1].
to find the folder holding all the possible combinations of hardware, roomba was one of the options.
Hi Quartinium,
I had one line missing in the blog article. After the installJetsonBot:
sets up all the paths and directories for the bash file. I updated the article JetsonBot Software Install to reflect the change.
My apologies.
Certainly if you have pictures or videos of your bot send them to me, I’d love to see them. We can even post them on the site with your permission.
I’ll happy send along the few photos I’ve taken. I’m not sure they’d be worth posting but I’ll try to get a decent shot in the bunch.
Hi,
I got an error that is “ERROR: Module uvcvideo not found” when I install ROS. An addition information are I used JetPack 2.3.1 to flash OS and I just have installed Grinch21.3.4. If those things make the installation of ROS get this error or there is anther reason. I’m very confusing now.
Which file were you running when you got the error? The JetsonBot did not use the Grinch kernel, but I don’t know if the Grinch kernel removes the uvcvideo module.
Hi,
Sorry reply too late!
Actually, I got the problems are same with this linK. https://devtalk.nvidia.com/default/topic/985460/not-able-to-install-anything-because-of-the-following-error-need-help/
An addition, the version of L4T is 21.5 in my TK1. And I have install Grinch kernel.
My guess would be that the Grinch kernel is having issues with the UVC video module. In the above example, a standard kernel is used. I am not familiar enough with the Grinch kernel to offer much more help.
Hi, Kangalow:
Thank you for your reply.
Due to I got several mistakes now. I wanna setup TK1 again now. So, I have re-flashed TK1 again, and the version of L4T is R21.5 and the kernel is standard kernel now.
My thinking is that I wanna use ROS to develop algorithm for the robot. Therefore, I am gonna try install and use ROS in TK1, and I also need to use realtime camera.
I have seen your blog and some video of it, and I summarized the process that how to setup TK1 and install ROS:
1.postFlash
2.Build USB FDTI Module
3.Build a new kernel
4.Build the realsense camera driver library
5.Install ROS
6.Install JetsonBot
7.Install the realsense camera ROS Node
Due to the version of L4T is R21.5. Is this process correct or fix to my TK1?
A couple of comments:
The postFlash step is useful because it tells the Jetson to turn off USB autosuspend and turn on USB 3.0, which is needed for USB camera connection.
I believe that the FTDI module is built into the Jetson TK1 in 21.5. You should check to see if that’s the case.
Other than that, your list sounds correct.
Thank you!
I checked to see that the FTDI module was not built yet. So I think the FTDI modules is not built onto the jetson TK1 in 21.5.
After I built FTDI module in 21.5, and checked it. I can see “FTDI USB Serial device converter now attached to ttyUSB0”
Does that mean I do this success?
Once you build a module, test it out to make sure it works. There are few changes between 21.4 and 21.5, kernel changes usually don’t carry across unbuilt modules.