14. Docker April Tags Detection
14.1. Learning Objectives
In this example, we show how to use a ROS docker container to connect to Isaac Sim and run the April Tags tutorial.
If running Isaac Sim locally, follow the Workstation Setup guide on how to download, install and launch Isaac Sim.
If running Isaac Sim in a container, follow the Container Deployment guide on how to pull and run the container and begin live streaming
Install Rocker to simplify GUI docker support for ROS.
14.2. Setup ROS container
Start the ROS container using rocker.
rocker --nvidia --x11 --privileged --network host --name ros_container osrf/ros:noetic-desktop-full-focal
--network hostlet us communicate between the Isaac Sim and ros docker containers, while also allowing us to launch rviz.
--name ros_containerallows us to refer to the container with a fixed name for this tutorial.
VPN might need to be disabled on first run of this command so rocker can properly build the docker container and download/install apt-get dependencies.
Copy Isaac Sim
noetic_wsfolder to running ROS container. Assuming you’ve already cloned Isaac Sim ROS Workspace Repository from here, navigate to the repository:
docker cp noetic_ws ros_container:/root/noetic_ws
The above commands assume that the ros container is named
ros_containerwhich should be the case if no changes are made to the commands when running
In the ROS container bash terminal run the following to install dependencies and build the ROS workspace
cd /root/noetic_ws apt-get update apt-get install ros-noetic-apriltag-ros rosdep install --from-paths src --ignore-src --rosdistro=noetic -y source /opt/ros/noetic/setup.sh catkin_make
Open a new terminal and connect to the running ROS container to start the ros master node. The same method can be used to open additional terminals for running more ROS commands
docker exec -it ros_container bash source ~/noetic_ws/devel/setup.sh roscore
Setup is now complete, next we will run the april tag detection sample
14.3. Detect April Tags
In Isaac Sim, either running locally or via the websocket client in the browser connected to the Isaac Sim docker container.
Open the April Tag example by going to Isaac Examples -> ROS -> April Tag. Three April Tags will show up in the viewport.
Open up the Stage Tree, and then open the ActionGraph by right-clicking on the prim and selecting Open Graph. The ROS Clock publisher, TF publisher and Camera Helper nodes (for initiating the camera_info and rgb image publishers) should already be setup.
Press Play to start publishing data to ROS
In a new terminal start the apriltag detection node
docker exec -it ros_container bash source ~/noetic_ws/devel/setup.sh roslaunch isaac_tutorials apriltag_continuous_detection.launch
You should see the following output in this terminal
process[apriltag_ros_continuous_node-1]: started with pid  [ INFO] [1639621422.356067231]: Initializing nodelet with 24 worker threads. [ INFO] [1639621422.407887915]: Loaded tag config: 0, size: 0.5, frame_name: tag_0 [ INFO] [1639621422.407936997]: Loaded tag config: 1, size: 0.5, frame_name: tag_1 [ INFO] [1639621422.407963206]: Loaded tag config: 2, size: 0.5, frame_name: tag_2
In a new terminal start rviz to visualize the detections.
docker exec -it ros_container bash source ~/noetic_ws/devel/setup.sh cd ~/ rviz -d noetic_ws/src/isaac_tutorials/rviz/apriltag_config.rviz
The rviz window should appear if there is an accelerated X server on the local machine
To see raw data, in a new terminal, echo the detections
docker exec -it ros_container bash source ~/noetic_ws/devel/setup.sh rostopic echo tag_detections
And you should see the apriltag detection messages being published
This tutorial shows the basics of running a ROS docker image with Isaac Sim.
14.4.1. Next Steps
Continue on to the next tutorial in our ROS Tutorials series, Visual Inertial Odometry with Quadruped.