Joint position pertubation using effort_controllers/JointPositionController

asked 2018-10-16 14:33:56 -0500

skrede gravatar image

updated 2018-10-19 12:02:57 -0500

I've been trying to get a simulation of the Kuka KR6 Agilus running in Gazebo, and while almost there, there is one problem that remains.

I'm running Gazebo 9 with ROS Melodic.

Each joint is controlled by a JointPositionController, and all but one joint behaves sufficiently. I won't paste configurations here, but the repository is available on Github: https://github.com/skrede/kuka_gazebo

The joint in question is joint_a4, and the problem is that the joint has a given setpoint but somehow the controller seems confused as to how to get there. If I echo the following topic (of message type control_msgs/JointControllerState)

rostopic echo /joint_a4_position_controller/state

to terminal, I can see that the setpoint is specified, but the command and error fields seem to perturb violently, as shown in the following printout of the topic.

---
header: 
  seq: 74830
  stamp: 
    secs: 748
    nsecs: 825000000
  frame_id: ''
set_point: -1.69285065965e-08
process_value: -3.05827630699
process_value_dot: 1.96346264844
error: 3.05827629006
time_step: 0.001
command: 1175.71498185
p: 500.0
i: 5.0
d: 180.0
i_clamp: 0.0
antiwindup: False
---
header: 
  seq: 74831
  stamp: 
    secs: 748
    nsecs: 835000000
  frame_id: ''
set_point: -1.69285065965e-08
process_value: -3.03920837904
process_value_dot: 1.76346476062
error: -3.24397694507
time_step: 0.001
command: -1939.41204719
p: 500.0
i: 5.0
d: 180.0
i_clamp: 0.0
antiwindup: False

The package is somewhat easy to get running, given dependencies are already installed. I haven't listed them in the repository, but the package.xml should state dependencies.

When running Gazebo, the joint starts to perturb right away. This can be seen visually or by echoing the abovementioned topic to terminal. The setpoint does not change, i.e., nothing is sent via the topic

/joint_a4_position_controller/command

With that I mean the command-field listed in the terminal dump above is not sent to the controller.

I'm not sure how to begin debugging this. Any hints as to what confuses the controllers or solutions are welcomed.

I started looking at the urdf configurations, but I'm not even sure what to look for. I also tried to adjust PID gains, but that didn't help either.

Here's a video showing the problem: https://youtu.be/PqQh9spXjgM

edit retag flag offensive close merge delete