With this ROS2-Node can be determined the pose of different ArUco Markers. The goal of this project was to attach a marker on different robots, and get the absolute positions and orientations via a camera on the ceiling. However, this localization can also be applied to any other arbitary object. This project was created as an project thesis (MSY-Master).
For computing the pose the node requires this library. A detailed description can be found on: https://matthew-brett.github.io/transforms3d/)
pip install transforms3d
Usb_cam is a frequently used ros driver for V4L USB cameras. A detailed description can be found here: http://wiki.ros.org/usb_cam
sudo apt get install ros-<ros2-distro>-usb-cam
Important: It’s necessary to work with compressed images. Therefor you can use the image_transport library. A detailed description can be found here: http://wiki.ros.org/image_transport
For an easy start there is already created a launch file. All required parameters can be set and edited centrally here. The launch-file starts:
cd launch/ ros2 launch aruco_launch.py
An overview about the running topics is illustrated in the next picture.
The aruco_detector_node publishes a custom ros2 message.
int64 marker_ids geometry_msgs/Pose poses
marker_ids contains all detected ids of the ArUco Markers. The array
poses contains all poses of the detected ArUco Markers. This message will be published to the topic .
To this topic will be published the output images. In this images the detected ArCuo Marker is highlighted and the pose is drawn using a coordinate system.