lgsvl / simulator

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles
Other
2.29k stars 780 forks source link

As an autonomous vehicles researcher, I need to programmatically reset the state of the simulator, so that I can run controlled experiments. #1250

Open TrentWeiss opened 3 years ago

TrentWeiss commented 3 years ago

Does LGSVL have a way to programmatically reset the simulator's state to a specified value?

For a ROS/ROS2 dev like me, this would manifest as calling a ROS/ROS2 service that (temporarily) defies physics by instantaneously moving a particular entity (vehicle) to a specified state (pose/velocity/steering/throttle/brake) and then let's good ole' Newtonian physics resume. Other simulation frameworks have this option, for example Gazebo/gazebo_ros.

EricBoiseLGSVL commented 3 years ago

@TrentWeiss Yes we had a seed value that can be applied to a simulation. You can place a vehicle with the API to any position in the map you want. You can create a sensor that will apply any values over time or on the start of simulation.