diff --git a/src/multirotor_simulator.cpp b/src/multirotor_simulator.cpp index 150c79f..95909ba 100644 --- a/src/multirotor_simulator.cpp +++ b/src/multirotor_simulator.cpp @@ -287,6 +287,10 @@ void MultirotorSimulator::handleCollisions(void) { auto drs_params = mrs_lib::get_mutexed(mutex_drs_params_, drs_params_); + if (!(drs_params.collisions_crash || drs_params.collisions_enabled)) { + return; + } + std::vector poses; for (size_t i = 0; i < uavs_.size(); i++) {