1 minute read

Quickstart for Visual SLAM with Isaac Sim

Overview

This tutorial walks you through a graph to estimate 3D pose of the camera with Visual SLAM using images from Isaac Sim
(1)Set up your development environment by following the instructions here
=> Already Done
(2)Clone isaac_ros_common and this repository under ${ISAAC_ROS_WS}/src

cd ${ISAAC_ROS_WS}/src
git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git
git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_visual_slam.git

(3)[Terminal 1] Launch the Docker container

cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \
  ./scripts/run_dev.sh ${ISAAC_ROS_WS}

(4)[Terminal 1] Install this package’s dependencies

sudo apt-get install -y ros-humble-isaac-ros-visual-slam

IsaacSimVisualSLAM_QuickStart4
Run the following launch files in the current terminal (Terminal 1):

ros2 launch isaac_ros_visual_slam isaac_ros_visual_slam.launch.py

(5)[Terminal 2] Attach another terminal to the running container for RViz2
Attach another terminal to the running container for RViz2

cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \
  ./scripts/run_dev.sh ${ISAAC_ROS_WS}

From this second terminal, run RViz2 to display the output

rviz2 -d src/isaac_ros_visual_slam/isaac_ros_visual_slam/rviz/default.cfg.rviz

IsaacSimVisualSLAM_QuickStart3
IsaacSimVisualSLAM_QuickStart5
If you are SSHing in from a remote machine, the RViz2 window should be forwarded to your remote machine
(6)[Terminal 3] Attach the 3rd terminal to start the rosbag

cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \
  ./scripts/run_dev.sh ${ISAAC_ROS_WS}

Run the rosbag file to start the demo

ros2 bag play src/isaac_ros_visual_slam/isaac_ros_visual_slam/test/test_cases/rosbags/small_pol_test/

IsaacSimVisualSLAM_QuickStart2
IsaacSimVisualSLAM_QuickStart1

Coordinate Frames
This section describes the coordinate frames that are involved in the VisualSlamNode
The frames discussed below are oriented as follows:
IsaacSimVisualSLAM_QuickStart6
(1)input_base_frame:
The name of the frame used to calculate transformation between base link and left camera
The default value is empty (‘’), which means the value of base_frame_ will be used
If input_base_frame_ and base_frame_ are both empty, the left camera is assumed to be in the robot’s center
(2)input_left_camera_frame:
The frame associated with left eye of the stereo camera
Note that this is not the same as the optical frame
The default value is empty (‘’), which means the left camera is in the robot’s center and left_pose_right will be calculated from the CameraInfo message
(3)input_right_camera_frame:
The frame associated with the right eye of the stereo camera
Note that this is not the same as the optical frame
The default value is empty (‘’), which means left and right cameras have identity rotation and are horizontally aligned, so left_pose_right will be calculated from CameraInfo
(4)input_imu_frame:
The frame associated with the IMU sensor (if available)
It is used to calculate left_pose_imu

Reference: https://nvidia-isaac-ros.github.io/repositories_and_packages/isaac_ros_visual_slam/isaac_ros_visual_slam/index.html#quickstart

Updated: