Skip to content

Conversation

SakshayMahna
Copy link
Contributor


Basic Info

Info Please fill out this column
Ticket(s) this addresses #4865
Primary OS tested on Ubuntu
Robotic platform tested on Turtlebot3 Gazebo Simulation
Does this PR contain AI generated software? No
Was this PR description generated by AI software? No

Description of contribution in a few bullet points

Graceful Controller makes use of a slowdown radius to stop at the target. This PR additionally applies deceleration limit while the robot is stopping.

Description of documentation updates required from your changes

  • Added new parameter, deceleration_max to Graceful Controller.
  • Supporting a new behavior for stopping.

Description of how this change was tested

Tested in simulation.


Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists
  • Should this be backported to current distributions? If so, tag with backport-*.

Signed-off-by: Sakshay Mahna <[email protected]>
Signed-off-by: Sakshay Mahna <[email protected]>
Signed-off-by: Sakshay Mahna <[email protected]>
@SakshayMahna
Copy link
Contributor Author

@SteveMacenski
Opened the PR as discussed.

A few points to note on the implementation:

  • I modified the existing calculateRegularVelocity and calculateNextPoint functions in the Smooth Control Law file. There is only one dependency to the package nav2_docking. Instead of modification of the existing function signature, I can implement a new function altogether.
  • This PR is touching nav2_docking package as well, which now also requires the decleration_max parameter.

@@ -48,6 +48,8 @@ Controller::Controller(
node, "controller.v_angular_max", rclcpp::ParameterValue(0.75));
nav2::declare_parameter_if_not_declared(
node, "controller.slowdown_radius", rclcpp::ParameterValue(0.25));
nav2::declare_parameter_if_not_declared(
node, "controller.deceleration_max", rclcpp::ParameterValue(0.1));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a sane value?

@@ -66,7 +73,10 @@ geometry_msgs::msg::Twist SmoothControlLaw::calculateRegularVelocity(
double v = v_linear_max_ / (1.0 + beta_ * std::pow(fabs(curvature), lambda_));

// Slowdown when the robot is near the target to remove singularity
v = std::min(v_linear_max_ * (ego_coords.r / slowdown_radius_), v);
v = std::min(v_linear_max_ * (target_distance / slowdown_radius_), v);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change from ego_coords.r?

@SteveMacenski
Copy link
Member

Also check out the CI tests, a few are legit failing it looks like from this update

@SteveMacenski
Copy link
Member

@SakshayMahna any update? I see you pulled in main

@SakshayMahna
Copy link
Contributor Author

No not yet. I will get it done by this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants