diff --git a/src/SimulationRunner.cc b/src/SimulationRunner.cc index 03fb30ba3f..a6a61f288b 100644 --- a/src/SimulationRunner.cc +++ b/src/SimulationRunner.cc @@ -100,7 +100,14 @@ SimulationRunner::SimulationRunner(const sdf::World &_world, : sdfWorld(_world), serverConfig(_config) { // Keep world name - this->worldName = _world.Name(); + this->worldName = transport::TopicUtils::AsValidTopic(_world.Name()); + + if (this->worldName.empty()) + { + gzerr << "Can't start simulation runner with this world name [" + << _world.Name() << "]." << std::endl; + return; + } this->parametersRegistry = std::make_unique< gz::transport::parameters::ParametersRegistry>( diff --git a/src/systems/ackermann_steering/AckermannSteering.cc b/src/systems/ackermann_steering/AckermannSteering.cc index 59d81052f8..f1398c6c95 100644 --- a/src/systems/ackermann_steering/AckermannSteering.cc +++ b/src/systems/ackermann_steering/AckermannSteering.cc @@ -677,6 +677,11 @@ void AckermannSteering::PostUpdate(const UpdateInfo &_info, // Nothing left to do if paused. if (_info.paused) return; + + if (this->dataPtr->leftSteeringJoints.empty() || + this->dataPtr->rightSteeringJoints.empty()) + return; + if (this->dataPtr->steeringOnly) { this->dataPtr->UpdateAngle(_info, _ecm);