Joint position pertubation using effort_controllers/JointPositionController

asked 2018-10-17 07:47:14 -0500

Borkr gravatar image

This question has already been posted on answers.gazebosim.org , and I hope it's appropriate to post here as well.

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.

edit retag flag offensive close merge delete

Comments

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

Borkr gravatar image Borkr  ( 2018-10-19 11:57:25 -0500 )edit

Hi Borkr, Did you manage to solve the problem? Looks like I have the very same problem.

lotfishtaine gravatar image lotfishtaine  ( 2019-10-07 04:54:12 -0500 )edit

No fix I'm afraid, just a bypass. Check out this thread on github https://github.com/ros-controls/ros_c...

Borkr gravatar image Borkr  ( 2019-10-21 05:40:45 -0500 )edit