Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on Jetson JetPack 3 (deprecated) #655

Closed
matlabbe opened this issue Oct 7, 2021 · 0 comments
Closed

Build on Jetson JetPack 3 (deprecated) #655

matlabbe opened this issue Oct 7, 2021 · 0 comments

Comments

@matlabbe
Copy link
Member

matlabbe commented Oct 7, 2021

copied here for reference

These instructions are for Jetpack 3 (Ubuntu 16.04 with ROS Kinetic). For Jetpack 4 (Ubuntu 18.04 with ROS Melodic), see this post.

To use rtabmap_ros on Jetson, you can follow the instructions here if you don't care if OpenCV is built for Tegra. However, if you want rtabmap to use OpenCV 4 Tegra, we must re-build vision_opencv stack from source too to avoid conflicts with vision_opencv stack binaries from ros (which are linked on a not optimized version of OpenCV). Here are the steps:

  1. Install JetPack with OpenCV on the Jetson.

  2. Do steps 1.2 and 1.3 from http://wiki.ros.org/kinetic/Installation/Ubuntu

  3. Install non-opencv dependent ros packages:

    • Jetpack 3: sudo apt-get install ros-kinetic-ros-base ros-kinetic-image-transport ros-kinetic-tf ros-kinetic-tf-conversions ros-kinetic-eigen-conversions ros-kinetic-laser-geometry ros-kinetic-pcl-conversions ros-kinetic-pcl-ros ros-kinetic-move-base-msgs ros-kinetic-rviz ros-kinetic-octomap-ros ros-kinetic-move-base libhdf5-openmpi-dev libsuitesparse-dev
  4. Do step 1.6 from http://wiki.ros.org/kinetic/Installation/Ubuntu

  5. Create your catkin workspace

  6. Optional: Install g2o and/or GTSAM dependencies as above (increase visual odometry and graph optimization accuracy).

  7. To avoid libGL undefined errors:

    $ cd /usr/lib/aarch64-linux-gnu/
    # Jetpack 3:
    $ sudo ln -sf tegra/libGL.so libGL.so
    # Jetpack 4:
    sudo ln -sf libGL.so.1.0.0 libGL.so
    
  8. To avoid libvtkproj4 errors:

    $ sudo ln -s /usr/lib/aarch64-linux-gnu/libvtkCommonCore-6.2.so /usr/lib/libvtkproj4.so
    $ sudo ln -s /usr/lib/aarch64-linux-gnu/libvtkCommonCore-6.2.so /usr/lib/aarch64-linux-gnu/libvtkproj4-6.2.so.6.2.0
    
  9. Install RTAB-Map standalone libraries. Add -DCMAKE_INSTALL_PREFIX=~/catkin_ws/devel to cmake command below if you want to install in your Catkin's devel folder without sudo. Do not clone in your Catkin workspace.

    $ cd ~
    $ git clone https://github.com/introlab/rtabmap.git rtabmap
    $ cd rtabmap/build
    $ cmake ..  [<---double dots included]
    $ make
    $ sudo make install
  10. Clone vision_opencv, image_transport_plugins and rtabmap_ros packages in your catkin_ws:

 $ cd ~/catkin_ws
 $ git clone https://github.com/ros-perception/vision_opencv src/vision_opencv
 $ git clone https://github.com/ros-perception/image_transport_plugins.git src/image_transport_plugins
 $ git clone https://github.com/introlab/rtabmap_ros.git src/rtabmap_ros
 $ catkin_make -j2
@matlabbe matlabbe closed this as completed Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant