Isaac ROS AprilTag ros1_bridge Tutorial

Overview

This tutorial walks you through a graph to estimate the 6DOF pose of AprilTags using isaac_ros_apriltag running ROS 2 and a ROS 1 rosbag containing images. The image data will be published from the ROS 1 bag and sent to ROS 2 for computation and the tag detections result will be visualized in ROS 1 using the command line rostopic echo tool.

https://media.githubusercontent.com/media/NVIDIA-ISAAC-ROS/.github/main/resources/isaac_ros_docs/concepts/fiducials/apriltag/ros1-bridge-flow-chart.png/

Tutorial Walkthrough

  1. Complete the quickstart here.

  2. Complete the Isaac ROS ros1_bridge Setup Guide.

  3. Pull down a ROS 1 rosbag of sample data:

    cd $ISAAC_ROS_WS/src/isaac_ros_apriltag && \
        git lfs pull -X "" -I "resources/rosbags/ros1_bridge_apriltag.bag"
    
  4. Launch the Docker container using the run_dev.sh script:

    cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \
    ./scripts/run_dev.sh ${HOME}/workspaces
    
  5. There is currently a bug that causes a .catkin file to be generated by the ros2_humble build which uses the –merge-install flag. So manually remove the .catkin file:

    sudo rm /opt/ros/humble/install/.catkin
    

    Note

    You will have to remove this file every time a new Isaac ROS docker container is created. But you do not have to do this step when attaching to an already running Docker container

  6. Inside the container, build the ROS 2 workspace expect ros1_bridge:

    source /opt/ros/humble/setup.bash && \
    cd /workspaces/isaac_ros-dev/isaac_ros-dev && \
    colcon build --symlink-install --packages-skip ros1_bridge
    
  7. Attach a second terminal to the container:

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

    Note

    Do NOT close the first terminal when you attach this second terminal to the container.

  8. Inside the container, build and source the workspace:

    source isaac_ros_1-dev/install_isolated/setup.bash && \
    source isaac_ros-dev/install/setup.bash && \
    cd /workspaces/isaac_ros-dev/isaac_ros-dev && \
    colcon build --symlink-install --packages-select ros1_bridge --cmake-force-configure && \
    source install/setup.bash && \
    export ROS_MASTER_URI=http://localhost:11311 && \
    ros2 run ros1_bridge dynamic_bridge --bridge-all-topics
    
  9. Attach a third terminal to the container:

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

    Note

    Do NOT close the first terminal when you attach this second terminal to the container.

  10. Source ros1_noetic and run roscore:

    source /opt/ros/noetic/setup.bash && \
    roscore
    
  11. Attach a fourth terminal to the Docker container:

cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \
./scripts/run_dev.sh ${HOME}/workspaces
  1. Play the ROS1 rosbag in a loop:

source /opt/ros/noetic/setup.bash && \
cd /workspaces/isaac_ros-dev/isaac_ros-dev/src/isaac_ros_apriltag/resources/rosbags && \
rosbag play -l ros1_bridge_apriltag.bag
  1. Attach a fifth terminal to the Docker container:

cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \
./scripts/run_dev.sh ${HOME}/workspaces
  1. Run the isaac_ros_apriltag node:

    cd /workspaces/isaac_ros-dev/isaac_ros-dev && \
    source install/setup.bash && \
    ros2 launch isaac_ros_apriltag isaac_ros_apriltag.launch.py
    
  2. Attach a sixth terminal to the Docker container:

    cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \
    ./scripts/run_dev.sh ${HOME}/workspaces
    
  3. Use rostopic echo to print the tag detections in ROS 1 :

    cd /workspaces/isaac_ros-dev/isaac_ros_1-dev && \
    source install_isolated/setup.bash && \
    rostopic echo /tag_detections
    
    https://media.githubusercontent.com/media/NVIDIA-ISAAC-ROS/.github/main/resources/isaac_ros_docs/concepts/fiducials/apriltag/ros1_tag_echo.png/