Access tf Vector3 values
Hello,
I would like to get the z position value of my robot in gazebo. My Robot is using a skid steering plugin publishing on the "/player0/odom" topic and the "/tf" topic with "player0/frame" as it's frame id.
I do know how to get the x and y values by using the odom topic, but to get the z value it seems I have to use tf. However, the tf data confuses me.
If I echo the /tf topic, I get:
transforms:
header:
seq: 0
stamp:
secs: 8
nsecs: 402000000
frame_id: player0/frame
child_frame_id: root
transform:
translation:
x: -2.00000384203
y: -0.000426774126042
z: 0.400000377264
rotation:
x: -4.57302626635e-07
y: 9.54536038539e-08
z: -0.00161574482528
w: 0.999998694683
How can I get the z: 0.4...value and store it into a variable?