Hi all,
I have been trying to send VIO input to MAVROS. I am running PX4 SITL with Gazebo. Instead of VIO, I stream the actual pose of the drone from Gazebo as odometry messages. Below is a sample odometry message sent to MAVROS. This is soon after the simulation is started, and the drone hasn’t armed yet.
header:
seq: 6235
stamp:
secs: 276
nsecs: 460000000
frame_id: "odom"
child_frame_id: "base_link"
pose:
pose:
position:
x: -0.0391446413748
y: 0.0140626932904
z: 0.104499788973
orientation:
x: 0.000328258242524
y: -0.000728838002484
z: -0.0162061963804
w: 0.999868351455
covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
twist:
twist:
linear:
x: -4.28733335195e-06
y: -3.45217754377e-06
z: -1.90775514868e-06
angular:
x: 6.23758257956e-05
y: -7.78719329085e-05
z: -9.29900690144e-09
covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---
As far as I understood from the VIO input guide, if the relevant frames are present in the tf tree, the odom module in MAVROS should do the required transformation to the FRD frame, and use the transformed odometry values in MAVLINK (correct me if I am wrong). Below is the tf tree.
But the values seen in MAVLINK inspector is wrong. The rotation at the beginning is not [0, 0, 0, 1]
. Below is what comes in MAVLINK inspector.
Can someone tell what is going wrong here? The VIO guide is a bit unclear for me. Should I transform all the values to NED/FRD frame before sending it to MAVLINK?
Thanks,
Anand