Skip to content

Commit

Permalink
improve gazebo
Browse files Browse the repository at this point in the history
Signed-off-by: cjds <[email protected]>
  • Loading branch information
cjds committed Apr 26, 2021
1 parent 51befb4 commit d3b6b12
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/systems/joint_controller/JointController.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<double>("initial_velocity");
Expand Down

0 comments on commit d3b6b12

Please sign in to comment.