Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Micha Sende committed Jan 28, 2022
1 parent 5109aef commit e05fe96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mavros_pos_controller/src/mavros_pos_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void process_goal(geometry_msgs::PoseStamped& goal)
if (turning == false)
goal.pose.orientation = pose.pose.orientation;

// calculate new orientation if turning is enabled and no pose given
// calculate orientation towards goal if turning is enabled and no pose given
else if (goal.pose.orientation.x == 0 && goal.pose.orientation.y == 0 && goal.pose.orientation.z == 0 && goal.pose.orientation.w == 0) {
tf2::Quaternion orientation;
orientation.setRPY(0, 0, atan2(goal.pose.position.y - pose.pose.position.y, goal.pose.position.x - pose.pose.position.x));
Expand Down

0 comments on commit e05fe96

Please sign in to comment.