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.
Tutorial Walkthrough
Complete the quickstart here.
Complete the Isaac ROS ros1_bridge Setup Guide.
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"
Launch the Docker container using the
run_dev.sh
script:cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \ ./scripts/run_dev.sh ${HOME}/workspaces
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
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
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.
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
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.
Source
ros1_noetic
and runroscore
:source /opt/ros/noetic/setup.bash && \ roscore
Attach a fourth terminal to the Docker container:
cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \ ./scripts/run_dev.sh ${HOME}/workspaces
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
Attach a fifth terminal to the Docker container:
cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \ ./scripts/run_dev.sh ${HOME}/workspaces
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
Attach a sixth terminal to the Docker container:
cd ${ISAAC_ROS_WS}/src/isaac_ros_common && \ ./scripts/run_dev.sh ${HOME}/workspaces
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