Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

JointController doesn't move the joint

Hi, I created a simple robot model using urdf. In the urdf, there is a prismatic joint, which is supposed to move a link (a small box) vertically for position control.

joint values in urdf file : type="prismatic" limit effort="1000.0" lower="0" upper="2" velocity="1"

To move it vertically, I wrote a ROS aware gazebo plugin that takes the target position via ROS message. Then I used getJointController to move it like this:

my_model_->GetJointController()->SetPositionTarget(myJointName, 1.2);

my_model_->GetJointController()->SetPositionPID(myJointName, common::PID(2, 0, 1));

I just give a position target and filled the pid. not involved in effort, force or torque.

I tried my code in 2 different setup.

  1. virtualbox - ubuntu 16 - ros kinetic - gazebo 7.0

  2. virtualbox - ubuntu 16 - ros kinetic - gazebo 7.4

the code run on gazebo 7.0 without error and able to move the link as I wanted.

the code run on gazebo 7.4 without error but nothing moved.

Am I missing something or could it be related to a gazebo 7.4 issue ?