fixed target angle
This commit is contained in:
@@ -116,8 +116,8 @@ void ApproachAcorns::acorn_position_cb(PoseStamped::ConstSharedPtr msg)
|
||||
|
||||
std::lock_guard _lock(mutex_);
|
||||
|
||||
const double dx = initial_pose_.position.x - pose_global.pose.position.x;
|
||||
const double dy = initial_pose_.position.y - pose_global.pose.position.y;
|
||||
const double dx = pose_global.pose.position.x - initial_pose_.position.x;
|
||||
const double dy = pose_global.pose.position.y - initial_pose_.position.y;
|
||||
double yaw_to_goal = std::atan2(dy,dx);
|
||||
|
||||
tf2::convert(tf2::Quaternion::createFromRPY(0, 0, yaw_to_goal), pose_global.pose.orientation);
|
||||
|
||||
Reference in New Issue
Block a user