Apriltag pkg - geometry_msgs::PoseArray how to use it?
Hi,
I can't figure out how to use this kind of message. Could someone give me an example of the subscription to get x,y,z position of the apriltag and the callback needed to be write ? Because, in the tests I did with the Terminal, using rostopic list
, you find the list provided in the github. When I display the message by using rostopic echo /tag_detections_pose
, there is 3 cases possible:
- No apriltag is detected and the message is:
---
header:
seq: 204
stamp:
secs: 428
nsecs: 144000000
frame_id: "iris/camera_red_iris_link"
poses: []
---
- One apriltag is detected and the message is:
---
header:
seq: 204
stamp:
secs: 428
nsecs: 144000000
frame_id: "iris/camera_red_iris_link"
poses:
-
position:
x: -0.011312831
y: 1.238084094
z: 1.23437430412
orientation:
x: 0.79874230734
y: -0.2934723472
z: -0.3842379824
w: 0.002302324
---
- Two (or more) apriltags is detected and the message is:
---
header:
seq: 204
stamp:
secs: 428
nsecs: 144000000
frame_id: "iris/camera_red_iris_link"
poses:
-
position:
x: -0.011312831
y: 1.238084094
z: 1.23437430412
orientation:
x: 0.79874230734
y: -0.2934723472
z: -0.3842379824
w: 0.002302324
-
position:
x: 0.011312831
y: -1.238084094
z: 1.23437430412
orientation:
x: -0.79874230734
y: 0.2934723472
z: -0.3842379824
w: 0.002302324
---
Thanks in advance