Skip to content

Commit d3b6b12

Browse files
committed
improve gazebo
Signed-off-by: cjds <[email protected]>
1 parent 51befb4 commit d3b6b12

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/systems/joint_controller/JointController.cc

+7
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ void JointController::Configure(const Entity &_entity,
9898
return;
9999
}
100100

101+
gazebo::Entity jointEntity = this->dataPtr->model.JointByName(_ecm, this->dataPtr->jointName);
102+
if (jointEntity == kNullEntity)
103+
{
104+
ignerr << "Joint with name[" << jointName << "] not found. "
105+
<< "The JointController will not control this joint.\n";
106+
}
107+
101108
if (_sdf->HasElement("initial_velocity"))
102109
{
103110
this->dataPtr->jointVelCmd = _sdf->Get<double>("initial_velocity");

0 commit comments

Comments
 (0)