How to stop a vehicle normally with the RTKReplayPlanner?
I used RTKReplayPlanner to test the normal stop ability in a closed area without a high-definition map. When I made a MainStop decision,the vehicle kept moving on if the output trajectory wasn't stopped. In other words, the MainStop decision didn't work (If an emergency stop decision is made, the car will stop immediately). If an empty trajectory is output at this time, the planning module will exit at once because it cannot find the correct reference line, and the vehicle will keep moving on at the current speed. What can I do to make the vehicle stop normally? Thank you.
I think there is no stop decisions for rtk planner. It can only follow a pre-recorded planning trajectory.
@lianglia-apollo I think I can calculate the stop trajectory and output it. Let me try it first and tell you the result.
I have figured it out for the straight-line case. First, I registered a callback function: AdapterManager::AddPerceptionObstaclesCallback(
&RTKReplayPlanner::OnPerceptionObstacles, this); to fetch all obstacles. Second, I determined the threat level based on the distance between every obstacle and the vehicle. If the distance is within the specified distance, a stop decision is made and the corresponding trajectory sequence is calculated. The generation of the stopping trajectory sequence is a stop problem within a constant distance. It can be solved by using simple calculus. Third, if the obstacle disappears, the RTK trajectory sequence will be used again to guide the vehicle to keep moving on.
It looks good to me. As long as you can pre-record a stop trajectory, the RTK planner would work.