Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

robot rotates in-place if the yaw error is beyond 45 degrees #36

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/NeoLocalPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,14 @@ geometry_msgs::msg::TwistStamped NeoLocalPlanner::computeVelocityCommands(
control_yawrate = fmin(control_yawrate, m_last_cmd_vel.angular.z + acc_lim_theta * dt);
control_yawrate = fmax(control_yawrate, m_last_cmd_vel.angular.z - acc_lim_theta * dt);

// Avoiding arc trajectories and keeping the robot inside the global plan
if (abs(yaw_error) > M_PI / 6 && !is_goal_target) {
control_vel_x = 0;
control_vel_y = 0;
RCLCPP_INFO_THROTTLE(
logger_, *clock_, 2000.0, "Changing the course of navigation");
}

// fill return data
if (m_robot_direction == -1.0) {
cmd_vel.linear.x = fmax(
Expand Down
Loading