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

New planning algorithm when braking? #38

Open
daohu527 opened this issue Apr 13, 2021 · 0 comments
Open

New planning algorithm when braking? #38

daohu527 opened this issue Apr 13, 2021 · 0 comments
Labels
planning planning module

Comments

@daohu527
Copy link
Owner

daohu527 commented Apr 13, 2021

It is necessary to plan the braking curve when parking. The current PID is adjusted according to the speed and position, which does not conform to human braking habits. There will be slipping, excessive braking, etc.

When parking, I suggest using the following acceleration curve, and the control module considers braking according to the acceleration.

        --------
      /
     / 
-----

Current implementation

For now they use a fix in control module(modules\control\controller\lon_controller.cc), but I don't think it’s very elegant

  // At near-stop stage, replace the brake control command with the standstill
  // acceleration if the former is even softer than the latter
  if ((trajectory_message_->trajectory_type() ==
       apollo::planning::ADCTrajectory::NORMAL) &&
      ((std::fabs(debug->preview_acceleration_reference()) <=
            control_conf_->max_acceleration_when_stopped() &&
        std::fabs(debug->preview_speed_reference()) <=
            vehicle_param_.max_abs_speed_when_stopped()) ||
       std::abs(debug->path_remain()) <
           control_conf_->max_path_remain_when_stopped())) {
    acceleration_cmd =
        (chassis->gear_location() == canbus::Chassis::GEAR_REVERSE)
            ? std::max(acceleration_cmd,
                       -lon_controller_conf.standstill_acceleration())
            : std::min(acceleration_cmd,
                       lon_controller_conf.standstill_acceleration());
    ADEBUG << "Stop location reached";
    debug->set_is_full_stop(true);
  }
@daohu527 daohu527 added the planning planning module label Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planning planning module
Projects
None yet
Development

No branches or pull requests

1 participant