New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ROS REP 147 Odometry Message #721
Comments
Agree! |
I currently am blocking on this for my ROS SLAM system, so I'm going to start adding it. ROS side# This represents an estimate of a position and velocity in free space.
# The pose in this message should be specified in the coordinate frame given by header.frame_id.
# The twist in this message should be specified in the coordinate frame given by the child_frame_id
Header header
string child_frame_id
geometry_msgs/PoseWithCovariance pose
geometry_msgs/TwistWithCovariance twist Data Contained
MAVROS
Proposed MAVLink message
|
Note float is 4-byte. In [32]: struct.calcsize('<bb3f4f3f3f21f21f')
Out[32]: 222 Short float (16-bit) is not implemented by mavlink, but it is may be useful for covariances. |
Ah, right.. oops, should still fit through, right, will be close. I believe 255 is the limit for the frame size and there is some overhead for check sum and header etc. |
Yes, 255 is max payload length. Message a bit longer (header + payload + crc + optional signature). |
OK, good. What do you think on field names, should we split twist and pose as I have done above (pos, vel, q, ang_vel), or just leave them as twist (length 6) and pose (length 7), I think either will work as long as we document it, but any preference? |
I prefer vector = float[3] and quaternion = float[4]. But many of mavlink messages propose split of vectors to x,y,z fields. |
Even that the cross covariance between attitude and position is not supported in ROS, the proposed MAVLink odom msg may include a 6x6 covariance matrix that supports this. |
That would cost us 6*6*4=144 bytes, so maybe in a separate message? |
Yeah we can leave the upper-triangular like you propose and add a separate msg for full co-variances. But you can check that ROS has full 6x6 covariance matrices for pose and twist on its |
Yeah, the covariance matrix is always symmetric. |
Ok so as long we keep the symetry in the ROS side, I suppose we can send the URT of the cov matrix of the pose and of the twist in the MAVLink msg. |
Could you send a PR with this? I'm closing meanwhile. |
@LorenzMeier on my todo list. I will issue a PR soon. |
http://www.ros.org/reps/rep-0147.html
If we support this I think it will be very helpful. Currently we are using local_position_ned_cov + attitude_quaternion_cov to send the same info. We may still have to split the message into the attitude and position parts due to size, but we should at least add the frame_id and child_frame_id so that the messages can be used for various sensors (vision/mocap etc.) These frame ids could be implemented in mavlink using an enum to save space.
@tfoote
@LorenzMeier
@mhkabir
@TSC21
The text was updated successfully, but these errors were encountered: