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

Running Sim Model without passing sensor data #15370

Open
chiragr15 opened this issue Apr 11, 2024 · 1 comment
Open

Running Sim Model without passing sensor data #15370

chiragr15 opened this issue Apr 11, 2024 · 1 comment

Comments

@chiragr15
Copy link

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?

@YuqiHuai
Copy link
Contributor

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

void SimPerfectControl::PublishDummyPrediction() {
auto prediction = std::make_shared<PredictionObstacles>();
{
std::lock_guard<std::mutex> lock(mutex_);
if (!send_dummy_prediction_) {
return;
}
FillHeader("SimPrediction", prediction.get());
}
prediction_writer_->Write(prediction);
}

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants