apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Running Sim Model without passing sensor data

Open chiragr15 opened this issue 10 months ago • 1 comments

I have a question on how the tool is able to run modules which require lidar/camera/ground-truth data like prediction/perception during 'Sim Control'? I am able to route and actuate the vehicle on some demo maps using bootstrap and Sim Control without sending any explicit sensor data channels for the modules to read from. How is this possible in Sim Control? Does the sensor data come from pre-simulated data?

chiragr15 avatar Apr 11 '24 04:04 chiragr15

For the planning module to operate, it needs to receive prediction messages, and SimControl publishes dummy prediction messages with no obstacle by default. So to run SimControl pretty much only planning and routing need to be turned on, and there will be no obstacle in simulation.

Checkout https://github.com/ApolloAuto/apollo/blob/03e6dddcc065355281af2e7c4eb27fa8db4d919f/modules/dreamview/backend/common/sim_control_manager/dynamic_model/perfect_control/sim_perfect_control.cc#L514-L524

There also exist tools like replay_perception that publish perception messages, then you can turn on the prediction module can see Apollo reacting to those obstacles in SimControl simulation.

YuqiHuai avatar Apr 11 '24 14:04 YuqiHuai