rosflight / rosflight_ros_pkgs

ROS packages for the ROSflight autopilot
http://rosflight.org/
BSD 3-Clause "New" or "Revised" License
86 stars 56 forks source link

Coordinate Frames #33

Open plusk01 opened 6 years ago

plusk01 commented 6 years ago

What coordinate frame standard are we adopting for the ROSflight stack? It would be good to have a standard and have some solid documentation (with images) on this. Coordinate frames are a big source of confusion in robotics it seems.

This comes with some philosophical questions: ROS standard (REP 103 and REP 105) is ENU with body-NWU, which lends itself to ground robots. But the UAV community is NED.

If we break the ROS standard and use NED, it may make it more difficult/confusing to interface with other ROS packages. Also, for what it is worth, mavros follows the ROS standard, but didn't really seem to agree on it until well into the project. And even then, they seem to have had some errors in their understanding: https://github.com/mavlink/mavros/issues/216

It may also be worth considering tf2 to help mitigate coordinate frame issues.

plusk01 commented 6 years ago

Related: https://github.com/byu-magicc/rosflight_plugins/issues/4

superjax commented 6 years ago

From a practical perspective, I'm pretty determined to continue breaking REP. Haha. The aerospace literature in general follows a NED convention. ROS's origins are in ground robots, which use ENU. I don't know that it's super unreasonable to stick with a NED convention for MAVs.

I know several people who have been incredibly confused by the switching of coordinate frames in mavros. I think that's probably the worst possible implementation (a hidden coordinate frame switch?) let's not do that.

Anyway. I'm not super familiar with tf. Do you have any idea on how we might deal with that? In my implementation of rosflight_sil I publish truth in both NED and NWU to appeal to both groups. They are namespaced in the publication to make it obvious which frame they are in. Perhaps tf would make that easier.

superjax commented 5 years ago

Let's publish the attitude to tf. I think that would be a nice and easy way to visualize the attitude.

bsutherland333 commented 8 months ago

We should confirm that coordinate frames have been unified within rosflight_io before closing this issue.