ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
MAV_FRAME_LOCAL_NED is what the PX4 internally uses for all of its local coordinate frame calculations, this is in contrast to the ENU coordinate frame that is ROS standard. thankfully, the newer versions of MAVROS actually handles the coordinate frame conversion for you so if you are using MAVROS to send MAVLINK messages your coordinate frame should be based on the ROS ENU coordinate frame. The origin of the NED and ENU frame should be the same, where your quad booted up, or where your position estimation system launched. the difference lies in their directionality. For example in NED your altitude is actually -Z, whereas in ENU it is +Z
/setpoint_velocity/cmd_vel
should have the quad attempt to hold altitude, if you set linear.z to 0 yes
I believe the aligned frame is actually the ROS ENU frame as stated above, MAVROS does a coordinate transform for you when you enter your commands to transform it into the NED frame that PX4 wants. If you want you can check out the MAVROS source code: https://github.com/mavlink/mavros/blob/master/mavros/src/plugins/setpoint_velocity.cpp which spells this transform out explicitly