From b1a5c9b54e4895de419f5c87b6574563355415f2 Mon Sep 17 00:00:00 2001 From: cjds Date: Sun, 25 Apr 2021 23:01:29 -0400 Subject: [PATCH] improve gazebo --- src/systems/joint_controller/JointController.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/systems/joint_controller/JointController.cc b/src/systems/joint_controller/JointController.cc index 64762df6433..4b13f1af555 100644 --- a/src/systems/joint_controller/JointController.cc +++ b/src/systems/joint_controller/JointController.cc @@ -98,6 +98,13 @@ void JointController::Configure(const Entity &_entity, return; } + gazebo::Entity jointEntity = this->dataPtr->model.JointByName(_ecm, this->dataPtr->jointName); + if (jointEntity == kNullEntity) + { + ignerr << "Joint with name[" << jointName << "] not found. " + << "The JointController will not control this joint.\n"; + } + if (_sdf->HasElement("initial_velocity")) { this->dataPtr->jointVelCmd = _sdf->Get("initial_velocity");