Skip to content

Position actuators not registering as position actuators and yields errors about missing PIDs? #54

@sea-bass

Description

@sea-bass

Describe the bug
It seems like there is an issue parsing models with position actuators in the latest version of this repo, because I am getting errors about velocity/motor actuators even though I do not have them.

To Reproduce
I had a working model on an older branch of this repo, with actuators formatted as such:

  <actuator>
    <position
      class="Rotation"
      name="shoulder_pan_joint"
      joint="shoulder_pan_joint"
      inheritrange="1"
    />
    <position
      class="Pitch"
      name="shoulder_lift_joint"
      joint="shoulder_lift_joint"
      inheritrange="1"
    />
    <position
      class="Elbow"
      name="elbow_joint"
      joint="elbow_joint"
      inheritrange="1"
    />
    <position
      class="Wrist_Pitch"
      name="wrist_pitch_joint"
      joint="wrist_pitch_joint"
      inheritrange="1"
    />
    <position
      class="Wrist_Roll"
      name="wrist_roll_joint"
      joint="wrist_roll_joint"
      inheritrange="1"
    />
    <position class="Jaw" name="jaw_joint" joint="jaw_joint" inheritrange="1" />
  </actuator>

After upgrading, I get this error:

[ros2_control_node-1] [ERROR] [1767018915.233158717] [MujocoSystemInterface]:
Position command interface for the joint : 
shoulder_pan_joint is not supported with velocity or motor actuator without defining the PIDs

However, these actuators are position actuators, not velocity or motor?

You can get this by:

  1. Getting the latest branch of https://github.com/JafarAbdi/ros2_so_arm100
  2. Fixing the issue highlighted in Mujoco model parameter susceptible to leading and trailing whitespaces in XML #53
  3. Running ros2 launch so_arm100_description controllers_bringup.launch.py hardware_type:=mujoco

If you just want to see the model, it's here: https://github.com/JafarAbdi/ros2_so_arm100/blob/e62f90672ec17a255ab4f9854eefe1fb41df54bf/so_arm100_description/mjcf/so_arm100.xml#L142-L174

Expected behavior
Actuators should be treated as position actuators and this error should not be there. I suspect there is a bug in this getActuatorType function that was recently added, which is looking for the existence of specific bias parameters?

Environment (please complete the following information):

  • OS: Ubuntu 24.04
  • Version: Kilted

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions