How to command a Gazebo position controller to a position?
Hello,
I'm currently attempting to setup a robot in simulation using Gazebo and am running into unexpected trouble. I've got the URDF loading and several joints are working just fine. There is one controller that is not working at all however. I send it a setpoint with the /controller/command topic and when I echo the /controller/state topic I see that the set_point is changed, but the controller seems quite happy to not try to minimize its error state:
shane:Controls$ rostopic echo -n 3 /controller/state
header:
seq: 129245
stamp:
secs: 1293
nsecs: 235000000
frame_id: ''
set_point: 0.0
process_value: -0.270000387651
process_value_dot: 3.30845968096e-05
error: 0.270000387651
time_step: 0.001
command: 270.000387651
p: 1000.0
i: 0.0
d: 0.0
i_clamp: 0.0
antiwindup: False
---
header:
seq: 129246
stamp:
secs: 1293
nsecs: 245000000
frame_id: ''
set_point: 0.0
process_value: -0.270000356687
process_value_dot: 3.38117573128e-05
error: 0.270000356687
time_step: 0.001
command: 270.000356687
p: 1000.0
i: 0.0
d: 0.0
i_clamp: 0.0
antiwindup: False
---
header:
seq: 129247
stamp:
secs: 1293
nsecs: 255000000
frame_id: ''
set_point: 0.0
process_value: -0.27000045489
process_value_dot: -1.81707723594e-05
error: 0.27000045489
time_step: 0.001
command: 270.00045489
p: 1000.0
i: 0.0
d: 0.0
i_clamp: 0.0
antiwindup: False
---
The controller is instantiated in a launch file like:
<rosparam file="$(find controller)/config/controller.yaml" command="load"/>
<node name = "my_controller_spawner"
pkg = "controller_manager"
type = "spawner"
respawn = "false"
output = "screen"
args = "controller"/>
And the controller.yaml:
controller:
type: "velocity_controllers/JointPositionController"
joint: linear_joint
pid: {p: 1000.0, i: 0.0, d: 0.0}
It's unclear why the controller is not attempting to minimize the error, as the setup of this controller is nearly identical to many others that seem to work just fine. Does someone have any ideas as to where the error could be or how I can debug further?
Asked by ssnover on 2019-08-01 12:07:55 UTC
Comments