Skip to main content
The sample_apriltag is a ROS package that provides AprilTag pipeline samples for Qualcomm robotics platforms.
NoteFor more information, see sample_apriltag on GitHub.

Figure: Sample results of sample_apriltag

Pipeline flow for sample_apriltag

Figure: Pipeline flow for sample_apriltag

  • The pipeline accepts an NV12 image from qrb_ros_camera and converts the color space to RGB8 format.
  • Then, it uses image_proc to rectify the image, and outputs /apriltag/image_rect.
  • The Apriltag node detects tags and calculates their poses, which are published via /tf.

ROS nodes used in the sample_apriltag pipeline

ROS topics used in the sample_apriltag pipeline

ROS TopicTypePublished by
/apriltag/image_nv12sensor_msgs/msg/Imageqrb_ros::camera::CameraNode
/apriltag/camera_infosensor_msgs/msg/CameraInfoqrb_ros::camera::CameraNode
/apriltag/image_rgb8sensor_msgs/msg/Imageqrb_ros::colorspace_convert::ColorspaceConvertNode
/apriltag/image_rectsensor_msgs/msg/Imageimage_proc::RectifyNode
/apriltag/detectionsapriltag_msgs/msg/AprilTagDetectionArrayapriltag_ros::AprilTagNode
/tftf2_msgs/msg/TFMessageapriltag_ros::AprilTagNode

Prerequisites

You have completed the settings in Set up the environment for running sample applications.

Run out-of-the-box sample_apriltag

1

Run the sample on the development kit

SSH Session
2

Place AprilTag images in front of the camera

tagStandard41h12-1tagStandard41h12-2tagStandard41h12-3
tagStandard41h12: 1tagStandard41h12: 2tagStandard41h12: 3
3

Check the detection result

  1. Start a terminal and run the following commands to check the apriltag detection result.
    SSH Session
    The pipeline outputs the detection results with /apriltag/detections and detects the tag pose with /tf.
  2. To check the topic output, run the following command:
    SSH Session
    Result:
The result shows:
  • Detected tag: tagStandard41h12
  • Tag ID: 1

Build and run sample_apriltag

1

Build and package on the host computer

  1. Build the sample application project.
  2. Package and push the sample application to the device.
2

Install and run on the development kit

  1. Install the sample application.
    SSH Session
  2. Run the sample application with the steps in Run out-of-the-box sample_apriltag.