Hello,
I would like to get position of bebop2 drone from sphinx. It is published in gazebo topic /gazebo/default/pose/info. How can I use this topic in my ROS node?
Or how can I use gazebo plugin libgazebo_ros_p3d.so or another sphinx plugin?
Thanks
1 Like
You can use tlm-data-logger
to read telemetry data published by sphinx as explained here: Reading altitude, velocities and acceleration of Bebop 1
For data published in gazebo topics, you can create your own plugin or you can use parrot-gz
like so:
parrot-gz topic -e /gazebo/default/pose/info
Hello! Did you manage to read the /gazebo/default/pose/info topic? I tried
parrot-gz topic -e /gazebo/default/pose/info
and
gz topic -e /gazebo/default/pose/info
they returned a little bit different results.
The first one returns correct results as follows
time {
sec: 8
nsec: 547000000
}
pose {
name: "Bebop1"
id: 10
position {
x: -0.00033121468296625053
y: 0.00062852123742144659
z: 0.0048740620753592589
}
orientation {
x: 1.229821080293234e-06
y: -5.7511182328991957e-05
z: 0.01515147281298114
w: 0.99988520819269489
}
}
pose {
name: "Bebop1::body"
id: 11
position {
x: 0
y: 0
z: 0.045
}
orientation {
x: 0
y: 0
z: 0
w: 1
}
}
However, the second one returns:
time {
sec: 81
nsec: 419000000
}
pose {
name: "Bebop1"
id: 10
position {
y: -0.00033121468296625053
z: 0.00062846459922576365
4: 0x3f73f6d31365c0a0
}
orientation {
x: 1.2298210802933611e-06
y: -5.751118232899193e-05
z: 0.01515147281298114
w: 0.99988520819269489
}
}
pose {
name: "Bebop1::body"
id: 11
position {
y: 0
z: 0
4: 0x3fa70a3d70a3d70a
}
orientation {
x: 0
y: 0
z: 0
w: 1
}
}
The difference comes from the position info (the second has incorrect index [y, z, 4], instead of [x, y, z]).
I wrote a ros node to read the /gazebo/default/pose/info, but it gave me the second incorrect information. Do you also have the problem and how did you solve it?