Skip to content

Commit

Permalink
uas_sensor_orientation: return identity quaternion if no orientation …
Browse files Browse the repository at this point in the history
…match
  • Loading branch information
TSC21 committed Jul 16, 2015
1 parent 5003940 commit 3c3bac7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mavros/src/lib/uas_sensor_orientation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Eigen::Quaterniond UAS::sensor_orientation_matching(MAV_SENSOR_ORIENTATION orien
size_t idx = size_t(orientation);
if (idx >= sensor_orientation.size()) {
ROS_WARN_NAMED("uas", "SENSOR: wrong orintation index: %zu", idx);
return Eigen::Quaterniond();
return Eigen::Quaterniond(1,0,0,0);
}

return UAS::quaternion_from_rpy(Eigen::Vector3d(sensor_orientation[idx].x(),
Expand Down

0 comments on commit 3c3bac7

Please sign in to comment.