百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

apriltag_ros

> 编程语言
开源

用于 AprilTag 检测的 ROS 2 节点

356 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于 AprilTag 检测的 ROS 2 节点

AprilTag ROS 2 Node

This ROS 2 node uses the AprilTag library to detect AprilTags in images and publish their pose, id and additional metadata.

For more information on AprilTag, the paper and the reference implementation: https://april.eecs.umich.edu/software/apriltag.html

Topics

Subscriptions:

The node subscribes via a image_transport::CameraSubscriber to rectified images on topic image_rect. The set of topic names depends on the type of image transport (parameter image_transport) selected (raw or compressed):

  • image_rect (raw, type: sensor_msgs/msg/Image)
  • image_rect/compressed (compressed, type: sensor_msgs/msg/CompressedImage)
  • camera_info (type: sensor_msgs/msg/CameraInfo)

Publisher:

  • /tf (type: tf2_msgs/msg/TFMessage)
  • detections (type: apriltag_msgs/msg/AprilTagDetectionArray)

The camera intrinsics P in CameraInfo are used to compute the marker tag pose T from the homography H. The image and the camera intrinsics need to have the same timestamp.

The tag poses are published on the standard TF topic /tf with the header set to the image header and child_frame_id set to either tag: (e.g. "tag36h11:0") or the frame name selected via configuration file. Additional information about detected tags is published as AprilTagDetectionArray message, which contains the original homography matrix, the hamming distance and the decision_margin of the detection.

Configuration

The node is configured via a yaml configurations file. For the complete ROS yaml parameter file syntax, see: https://github.com/ros2/rcl/tree/master/rcl_yaml_param_parser.

The configuration file has the format:

…

The family (string) defines the tag family for the detector and must be one of 16h5, 25h9, 36h11, Circle21h7, Circle49h12, Custom48h12, Standard41h12, Standard52h13. size (float) is the tag edge size in meters, assuming square markers.

Instead of publishing all tag poses, the list tag.ids can be used to only publish selected tag IDs. Each tag can have an associated child frame name in tag.frames and a tag specific size in tag.sizes. These lists must either have the same length as tag.ids or may be empty. In this case, a default frame name of the form tag: and the default tag edge size size will be used.

The remaining parameters are set to the their default values from the library. See apriltag.h for a more detailed description of their function.

See tags_36h11.yaml for an example configuration that publishes specific tag poses of the 36h11 family.

Nodes

Standalone Executable

The apriltag_node executable can be launched with topic remappings and a configuration file:

bash
ros2 run apriltag_ros apriltag_node --ros-args \
    -r image_rect:=/camera/image \
    -r camera_info:=/camera/camera_info \
    --params-file `ros2 pkg prefix apriltag_ros`/share/apriltag_ros/cfg/tags_36h11.yaml

Composable Node

For more efficient intraprocess communication, a composable node is provided:

bash
$ ros2 component types
apriltag_ros
  AprilTagNode

This AprilTagNode component can be loaded with other nodes into a "container node" process where they used shared-memory communication to prevent unnecessary data copies. The example launch file camera_36h11.launch.yml loads the AprilTagNode component together with the camera::CameraNode component from the camera_ros package (sudo apt install ros-$ROS_DISTRO-camera-ros) into one container and enables use_intra_process_comms for both:

bash
ros2 launch apriltag_ros camera_36h11.launch.yml

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++apriltagros2

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言