Main Content

Configure NVIDIA Jetson Board for Object Detection and Motion Planning

Note

The workflow mentioned in this topic is tested on NVIDIA® Jetson® Nano, NVIDIA Jetson TX2 and NVIDIA Jetson AGX Xavier compute boards, having Ubuntu® 18.04 with ROS Melodic and OpenCV 3.2.

This topic is part of the overall workflow described in Object Detection and Motion Planning Application with Onboard Deployment.

To configure NVIDIA Jetson board for object detection and motion planning:

  1. Ensure that you configure the NVIDIA Jetson compute board as per the instructions provided on the respective web pages - NVIDIA Jetson Nano, NVIDIA Jetson TX2 or NVIDIA Jetson AGX Xavier.

  2. Perform Ubuntu Install of ROS Melodic on the Jetson board.

  3. Install ROS packages and dependencies for Kinova Gen3 robot, as described in Install ROS Packages and Dependencies for ROS on External Computer, on the Jetson board. Because you are using the vision module to detect the object, the ROS packages for vision module also need to be installed.

  4. Check the libopencv-dev version by executing the following command in the terminal:

    $ apt list -a libopencv-dev
  5. If the installed version is greater than 4.0, then install the version lower than 4.0. For example, execute the following command in the terminal to install libopencv-dev version 3.2.0:

    $ sudo apt install libopencv-dev=3.2.0+dfsg-4ubuntu0.1
  6. Execute Step 4 again and ensure that the installed version has been modified according to the Step 5.

  7. The necessary source files for the OpenCV node, responsible to detect the object are included in the support package. Execute the following command in the MATLAB® command window and navigate to the folder location specified by the command output.

    >> fullfile(codertarget.robotmanipulator.internal.getSpPkgRootDir,'resources')
  8. The resources folder contains a ZIP file, opencv_node.zip. Extract the content of the ZIP file and copy the opencv_node folder to the src folder of the catkin workspace folder that you created in Step 3.

    If you only have the access of Jetson board via SSH terminal, you can use wget command to download the ZIP archive and then use unzip command to extract the content into the src folder. You can host the opencv_node.zip to any file-hosting platform and generate a sharable link.

  9. Execute this command to build the opencv node.

    catkin_make --cmake-args -DCONAN_TARGET_PLATFORM=jetson

    Once the build is completed, execute the command ‘source devel/setup.bash’ from the catkin workspace folder that you created in Step3.

See Also