Confusion with isaac_ros_visual_slam launch files

Could someone please help me understand why the following launch file works reliably with a realsense camera in Isaac Sim:

ros2 launch isaac_ros_visual_slam isaac_ros_visual_slam_isaac_sim.launch.py

While this other launch file works sometimes but not always.

ros2 launch isaac_ros_visual_slam isaac_ros_visual_slam.launch.py

The first launch file has two additional topic mappings and also has the parameter use_sim_time=True. I verified that it’s the mappings that make the difference. However, the topics being mapped from are not the ones used by the realsense camera in the carter_warehouse_apriltags_worker.usd scenario.

I can’t understand why mapping two topics that are not even active would make visual slam work. I confirmed they are not active with the command “ros2 topic list”.

There are three launch files currently which are very similar but in fact setup a ROS 2 process with different graphs.

isaac_ros_visual_slam.launch.py only spins up a ROS 2 application with a single VisualSlamNode running. You would need to spin up your own graph in addition from another launch file that runs the nodes for your camera (in this case, Realsense nodes) which publishes images to the topics the VisualSlamNode is expecting.

isaac_ros_visual_slam_realsense.launch.py spins up both VisualSlamNode and the Realsense nodes so you can be up and running without having to launch any other ROS 2 graphs. This may be what you’re looking for as it is aligns the topic names for you through remappings.

isaac_ros_visual_slam_isaac_sim.launch.py spins up a VisualSlamNode with topics remapped to the ones Isaac Sim is going to publish camera data through for you.

1 Like

Thanks for adding isaac_ros_visual_slam_realsense.launch.py. It works fine. Just want to know whether it’s possible to add an example with imu enabled?

In our upcoming Isaac ROS release, the launch file will now always enable the IMU. In the meantime, here’s the launch file code for reference for the two nodes that includes enabling IMU on RealSense, configuring VisualSlam node to use the IMU, and wiring the two together.

"""Launch file which brings up visual slam node configured for RealSense."""
    realsense_camera_node = Node(
        name='camera',
        namespace='camera',
        package='realsense2_camera',
        executable='realsense2_camera_node',
        parameters=[{
                'enable_infra1': True,
                'enable_infra2': True,
                'enable_color': False,
                'enable_depth': False,
                'depth_module.emitter_enabled': 0,
                'depth_module.profile': '640x360x90',
                'enable_gyro': True,
                'enable_accel': True,
                'unite_imu_method': 2
        }]
    )

    visual_slam_node = ComposableNode(
        name='visual_slam_node',
        package='isaac_ros_visual_slam',
        plugin='isaac_ros::visual_slam::VisualSlamNode',
        parameters=[{
                    'enable_rectified_pose': True,
                    'denoise_input_images': False,
                    'rectified_images': True,
                    'enable_debug_mode': False,
                    'debug_dump_path': '/tmp/elbrus',
                    'enable_slam_visualization': True,
                    'enable_landmarks_view': True,
                    'enable_observations_view': True,
                    'map_frame': 'map',
                    'odom_frame': 'odom',
                    'base_frame': 'camera_link',
                    'input_imu_frame': 'camera_gyro_optical_frame',
                    'enable_imu': True
                    }],
        remappings=[('stereo_camera/left/image', 'camera/infra1/image_rect_raw'),
                    ('stereo_camera/left/camera_info', 'camera/infra1/camera_info'),
                    ('stereo_camera/right/image', 'camera/infra2/image_rect_raw'),
                    ('stereo_camera/right/camera_info', 'camera/infra2/camera_info'),
                    ('visual_slam/imu', 'camera/imu')]
    )
2 Likes

Very, very soon. Running through final testing and qualification.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.