Skip to content

This repo contains a implementation of realtime SLAM with Apriltag front-end in ROS. The front-end runs on either CPU or CUDA GPUs including Jetson devices.

License

Notifications You must be signed in to change notification settings

SafeRoboticsLab/AprilTagSLAM_ROS

Repository files navigation

ROS AprilTag SLAM

This repo contains a ROS implementation of a real-time landmark SLAM based on AprilTag and GTSAM. We use AprilTag as the front end, which alleviates the challengings in data association. Both CPU and CUDA versions of the AprilTag front end are included. We provide iSAM2 and batch fixed-lag smoother for SLAM and visual Inertia Odometry.

The package is initially built for a ZED2 camera running on Nvidia Jetson Xavier. However, it can be easily adapted for other sensors and other platforms. We have tested this on JetPack 5.0.2 and regular PC with Ubuntu 20.04, ROS Noetic and Nvidia GTX 1080Ti.

Dependency (Must)

Dependency (Highly Recommended)

  • ZED SDK 3.8:

    If ZED SDK is not installed, you will not able to run SLAM that directly interface with ZED SDK. However, you can still run SLAM that subscribes to ROS topics. If you do not have ZED SDK, You will have to to add -DUSE_ZED=OFF flag to the catkin.

  • CUDA 11+:

    If CUDA is not enabled, we will only do SLAM with CPU based CUDA detector. Interface with ZED SDK will be turned off as well. If you do not have CUDA, You will have to to add -DUSE_CUDA=OFF flag to the catkin.

    Note: older JetPack with CUDA 10 should work as well, but we have not tested it.

  • OpenCV 4.6.0 with CUDA support:

Install

First, complete an environment set up on your Ubuntu 20.04 machine like here. This will install

In the last step source set_startup_package we build a ~/StartUp directory similar to below. However, this also includes the Maestro-Controller-ROS repository. To build AprilTagSLAM_ROS on its own, follow these instructions:

mkdir tagslam_ws
cd tagslam_ws
mkdir src
cd src

git clone https://github.com/SafeRoboticsLab/AprilTagSLAM_ROS.git 
cd AprilTagSLAM_ROS
git checkout sdk_v4
cd ..

git clone https://github.com/AprilRobotics/apriltag.git

# We need compile cv_bridge from source files to avoid mixing OpenCV versions
git clone https://github.com/ros-perception/vision_opencv.git
cd vision_opencv
git checkout noetic
cd ../..

# build
source /opt/ros/noetic/setup.bash
catkin_make_isolated

Run with ZED SDK

Checkout the settings in config/config.yaml.

source devel_isolated/setup.bash
roslaunch tagslam_ros zed_sdk.launch

About

This repo contains a implementation of realtime SLAM with Apriltag front-end in ROS. The front-end runs on either CPU or CUDA GPUs including Jetson devices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published