ipa320 / cob_gazebo_plugins

Apache License 2.0
9 stars 17 forks source link

[BUG] effort hardware interface not work with multiple joint #45

Open jackstarred opened 4 years ago

jackstarred commented 4 years ago

I used the position hardware interface and effort hardware interface. The position controller with multiple joints works well. But the torque controller with multiple joints didn't work for all joints.

We defined two controllers as follow:

arm_controller:
  type: position_controllers/JointTrajectoryController
  joints:
     - joint1
     - joint2
     - joint3
  gains:
    joint1: {p: 800.0, i: 0.0, d: 80.0, i_clamp: 1}
    joint2: {p: 200.0, i: 1.0, d: 1.0, i_clamp: 1}
    joint3: {p: 100.0, i: 1.0, d: 1.0, i_clamp: 1}
  constraints:
    goal_time: 0.6
    stopped_velocity_tolerance: 0.05
    joint1: {trajectory: 0.05, goal: 0.05}
    joint2: {trajectory: 0.05, goal: 0.05}
    joint3: {trajectory: 0.05, goal: 0.05}
  stop_trajectory_duration: 0.5
  state_publish_rate:  25
  action_monitor_rate: 10

TorqueController:
  type: effort_controllers/JointGroupEffortController
  joints:
    - joint1
    - joint2
    - joint3

The arm_controller can work for all three joints. But the TorqueController can only control the torque command for joint2, doesn't work at all for other two joints. I switch to the normal gazebo ros control plugin, and it works. So I think this is a bug of the cob gazebo ros control plugin.

fmessmer commented 4 years ago

@jackstarred I've never really used the effort_hardware_interface...only position and velocity I can only assume that maybe it has something to do with how cob_gazebo_ros_control sets forces/torques in gazebo compared to gazebo_ros_control...in the past the gazebo API for this has changed every now and then... Please note that this plugin is not really actively developed anymore...but if you can provide a PR that fixes this issue, I'm happy to merge and release a new version...