RACECAR/J Software Install

In the previous article in our RACECAR/J Build Series, we finished the initial assembly of the base robot. Now it is time for the Software Install. Looky here:

Background

In the video, we install the software for the “MIT Hardware Configuration – Version 2.5” of RACECAR/J. This includes support for the following:

  • VESC 4.12 hardware compatible electronic speed controller
  • Sparkfun SEN-14001 IMU
  • Stereolabs ZED Camera
  • Hokuyo UST-10LX Scanning Laser Range Finder

The VESC and SEN-14001 are part of the RACECAR/J Base hardware configuration, the ZED and UST-10LX are additional.

The base RACECAR/J uses some new code for the Sparkfun IMU. Note that this is transition code in the RACECAR/J racecar Repository (the RacecarJTransitory branch). A different code base for the IMU is now under submission to the OSRF to become an official package. As such, we’ll publish updates as new code becomes available.

Installation Requirements

The software install is for the Jetson on the RACECAR/J. In the video a Jetson TX2 is used, connected to a monitor, keyboard, mouse and ethernet connection. The only difference in the code bases is the version of the ZED Camera driver. The version for the Jetson TX2 is in the folder ‘JetsonTX2’ and the version for the Jetson TX1 is in the folder ‘JetsonTX1’.

Note that version 2.2.1 of the ZED Camera driver installs to match the CUDA 8.0 package.

The current software stack runs on the Jetson TX1 and Jetson TX2 running L4T 28.1. Use JetPack 3.1 to install L4T 28.1, and at a minimum:

  • CUDA 8.0
  • cuDNN 6.0
  • OpenCV4Tegra 2.4.13

Note that the next version of L4T will release in the next few weeks from this writing, at which time we’ll start to update the code.

Installation

The installRACECARJ repository on the RACECARJ Github account contains the scripts necessary to install the software stack. First, clone the repository and switch to the repository directory:

$ git clone https://github.com/RacecarJ/installRACECARJ.git
$ cd installRACECARJ

Next, install the appropriate ZED camera driver for the Jetson in use. If possible, plug the ZED camera into the RACECAR/J USB hub (in one of the FAST ports, they are full speed USB 3.0). If the ZED is present during installation, the ZED driver installer will download the cameras’ calibration file. To install the Jetson TX2 driver for example:

$ cd JetsonTX2
$ ./installZED-SDK-TX2.sh

Then, return to the installRACECARJ directory:

$ cd ..

We’re now ready to install the Robot Operating System (ROS) software and the rest of the RACECAR/J software stack. The installation script does the following:

  • L4T 28.1 does not have a cdc-acm driver. The script installs a pre-built cdc-acm driver. The driver expects a stock kernel (4.4.38-tegra)
  • Because the electronic speed controller and the IMU both report as ttyACM, a udev rule is installed which names them as vesc and imu respectively.
  • ROS is configured and rosbase is installed
  • One of the dependencies is missing in the package specifications, so ros-kinetic-opencv3 is installed.
  • The MIT RACECAR packages are installed, which includes the ZED v2.2.x ROS wrapper.

To start the installation:

$ ./installMITRACECAR.sh

The directory ‘~/racecar-ws’ is the default workspace directory name; it can be specified on the command line after the script name. Because there is such a large amount of messages during installation, you may want to log everything to a log file:

$ ./installMITRACECAR.sh |& tee softinstall.log

The log will be placed in the file ‘softinstall.log’ for review. This is useful in case there are installation issues.

ROS Environment Variables

Worth noting is that the scripts also set up two environment variables in the .bashrc, namely ROS_MASTER_URI and ROS_IP. These are placeholders, you should replace them with values appropriate to your network layout. Also, while the normal ROS setup.bash is sourced, you may want to source the devel/setup.bash of your workspace.

After installation, you should be able to run the teleoperation launch file if the VESC is programmed.

Conclusion

The installation of the entire ROS software stack for RACECAR/J can be a complicated affair. However, these installation scripts should make things fairly simple.

30 Comments

  1. Hi! I just go through clean install everything on my Jetson TX2 by your instruction. It was straight forward with little exception. The location of SDK for ZED has been changed. Amcl and map_server need manual install. Thank you for your effort. Hopefully, I want to see next step of driving.

  2. Hello,
    First of all I would like to thank you for all the hard work you put on this website to share your knowledge. It’s very helpful.

    I have problem that I could not solve for a while.

    I’m trying to build an RC car similar to the racecar. I have a problem with capturing an image frame of the ZED camera. It causes huge delay to the system (~6 seconds). Now keep in mind that I’m using the ZED Python API which is still in beta. Can you guide me to the right API to capture ZED camera frames smoothly?

    Thanks.

  3. Thanks for this article, and your website in general. Super helpful and informative! Can I ask: Why use BOTH a depth-sensing stereo camera, AND a Lidar unit? Are they each effective at different ranges or something? Thanks again!

    • You’re welcome!
      The RACECAR is used in educational and research settings. One of the interesting problems is sensor fusion, which is how do you combine the information streams from different sensors to get a comprehensive overview of the surrounding environment. A subproblem is how do you determine which sensor to believe for a particular situation.
      The Hokuyo is a very high quality 2D LIDAR, but basically it’s just the line of objects in the field of view at a particular height. The 3D depth camera provides a wider field of view, but isn’t as accurate. The advantage of using a camera to identify something like a stop sign or so on is readily apparent. Typically autonomous vehicles use multiple cameras, radar, ultrasonics, and most use LIDAR. The “real” cars use 3D LIDAR, but it is considerably more expensive than the one used here. A “real” car also combines in GPS information.
      The thing to remember is that sensors like LIDAR may encounter issues depending on things like lighting conditions and reflectivity of objects to the laser being used. Cameras have issues with lighting also, so typically they have RGB cameras and infrared cameras too. You also have to plan for the case where a sensor gets obscured by dirt or something.

      • Would love to see a shootout between the ZED camera, RealSense D435 and Structure.io cameras, specifically in the context of RACECAR/J, and which one(s) you ended up going with.

  4. When I install the ZED driver,

    ./installZED-SDK-TX2.sh

    Igot the following error messages:
    Installation path: /usr/local/zed
    Checking CUDA version…
    ERROR : Found CUDA 9.0 but the ZED SDK requires 8.0
    The ZED will NOT work with this CUDA version (9.0), Continue (Y/N) ?
    Installing…

    Could you please let me know how to fix it? I thin I flashed Jetsonpack3.1.

    THanks,

    George

    • I believe that there is a new ZED driver available. Be aware that the entire software stack has not been tested thoroughly on L4T 28.2. You may also have to change the .rosinstall scripts for a new ZED wrapper.

  5. I flash my Tx2 with JetPack3.1. But when I tried to install the ZED, it said:

    ERROR: cannot verify http://www.stereolabs.com‘s certificate, issued by ‘CN=RapidSSL RSA CA 2018,OU=www.digicert.com,O=DigiCert Inc,C=US’:
    Unable to locally verify the issuer’s authority.
    To connect to http://www.stereolabs.com insecurely, use `–no-check-certificate’.
    chmod: cannot access ‘ZED_SDK_Linux_JTX2_v2.2.1.run’: No such file or directory
    ./installZED-SDK-TX2.sh: line 19: ./ZED_SDK_Linux_JTX2_v2.2.1.run: No such file or directory

    Could you let me know how to fix it?

    Thanks,

  6. I plugged-in the ZED camera. But when I install the SDK by running:

    ./installZED-SDK-TX2.sh

    It complained

    *** Download Factory Calibration ***
    No ZED detected : ZED calibration file will not be downloaded. Go directly to http://calib.stereolabs.com to manually download your calibration file.
    ZED SDK installation complete !

    Is this normal?

  7. “If the ZED is present during installation, the ZED driver installer will download the cameras’ calibration file.”
    I don’t see anything in the ZED documentation about calibrating the camera, and no indication of whether or not this succeeded. Cna you tell me where to look for the calibration file?

    • For anyone finding this question int he future, and having the same problem, my main clue that solved this for me was the comment from George above. The ZED camera installation script does not actually automagically download the calibration file. You need to run wget http://calib.stereolabs.com/?SN= , and replace with the serial number for your camera, which is printed on the back of the box it came in.

      Alternatively (or possibly in addition to?) the above, you can run /usr/local/zed/tools/ZED\ Calibration , which I’m guessing creates a custom calibration file.

      Hoping this helps someone out in the future, because it isn’t documented anywhere on the ZED developer site.

      • The ZED shipped nowadays has a new firmware that does not work with the RacecarJ install script. RacecarJ uses a old version of ZED API, including the tools, such as Explorer. What I did (recommended by ZED) was install the new ZED API on a different machine, link ZED to that machine, then use the tool on that machine to downgrad the ZED firstware to a older version. Then, link ZED to TX2 and RacecarJ script will work perfectly.

        • I *think* you’re talking only about the RacecarJ install script, is that correct? I only ask because, as far as I can tell, RacecarJ (and mit-racecar as well) doesn’t contain any actual logic. Just a bunch of ROS sensor nodes chattering away at eachother. I want to just make sure that my manual installation of the ZED driver, software and ROS node didn’t screw something up (seems to be working fine on the command line, with no errors, but who knows for sure?)

          • I noticed that teleop.launch did not start ZED ROS node. What is the correctly way to launch the car ros node with ZED ros node?

  8. When I run “roslaunch zed_wrapper zed.launch”

    I got below error. Do you know why? and How do I fix it?

    [ERROR] [1531400428.350306233]: Failed to load nodelet [/zed/zed_wrapper_node] of type [zed_wrapper/ZEDWrapperNodelet] even after refreshing the cac he: MultiLibraryClassLoader: Could not create object of class type zed_wrapper::ZEDWrapperNodelet as no factory exists for it. Make sure that the li brary exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
    [ERROR] [1531400428.350438805]: The error before refreshing the cache was: MultiLibraryClassLoader: Could not create object of class type zed_wrappe r::ZEDWrapperNodelet as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadL ibrary()

Leave a Reply

Your email address will not be published.


*