Skip to content

Commit

Permalink
plugin: setpoint_attitude: Fix ENU->NED conversion.
Browse files Browse the repository at this point in the history
Fix #64.
Related #33, #49.
  • Loading branch information
vooon committed Jul 24, 2014
1 parent 88d1f5f commit e93b135
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/setpoint_attitude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ class SetpointAttitudePlugin : public MavRosPlugin,
const uint8_t ignore_all_except_q = (7<<0);
float q[4];

// XXX: need add ENU->NED conversion
// ENU->NED, description in #49.
tf::Quaternion tf_q = transform.getRotation();
q[0] = tf_q.w();
q[1] = tf_q.x();
q[2] = tf_q.y();
q[3] = tf_q.z();
q[1] = tf_q.y();
q[2] = tf_q.x();
q[3] = -tf_q.z();

// Don't know if it turns out to be a problem to send 0.0;
// maybe in the PX4 side throttle can be discarded
Expand Down

0 comments on commit e93b135

Please sign in to comment.