ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.12k stars 9.7k forks source link

Controller Tuning ofline is possible? #11342

Closed Addi2020 closed 4 years ago

Addi2020 commented 4 years ago

Is it possible to do controller (PID or LQR or MPC) tuning offline using record bag and Apollo dream view? If possible then how to do it?

sjiang2018 commented 4 years ago

Hello, there! The short answer to this question is "yes, it's possible".

  1. Filter out the control channel using cyber (https://github.com/ApolloAuto/apollo/blob/master/docs/cyber/CyberRT_Developer_Tools.md).
  2. Play the filtered record with cyber_recorder and you may monitor it with dream view.
  3. Start control module on dream view front-end. Now you are using the controller with the parameters of your local Apollo repo.
  4. Use cyber_monitor or dream view front-end to monitor the controller performance. You might not be able to observe the behavior change of ego vehicle on dream view, because the localization info is recorded in the bag. But you can observe the control output changes when parameters are changed.
Addi2020 commented 4 years ago

Thank you for response. I did it the same way you explained . I can use the recorded file for control tuning and add log to debug lateral error, heading error, speed error, then try to minimize these error by tuning control parameters. Then apply it on real car and it works..