cyberbotics / urdf2webots

Utility to convert URDF files to Webots PROTO nodes
Apache License 2.0
127 stars 43 forks source link

SliderJoint initial position is not reflected in Webots simulation #192

Open astumpf opened 1 year ago

astumpf commented 1 year ago

Example proto snippet:

SliderJoint {
  jointParameters JointParameters {
    position 0.100000
    axis 0.000000 0.000000 -1.000000
  }
  device [
    LinearMotor {
      name "extension_leg_1_joint"
      maxVelocity 0.1
      maxPosition 0.74
      maxForce 1500.0
    }
    PositionSensor {
      name "extension_leg_1_joint_sensor"
    }
  ]
...

Results in unexpected result since Webots 2022b. In the following images, all legs with the exception of the front left one do have an initial position of 0.1 [m] specified.

In RViz we can see the correct (initial) joint states as expected, reported by the Webots simulation:

Screenshot from 2022-10-10 19-51-16

However, Webots seems to ignore physically the initial state and simulates the identical initial state for both legs despite the right one should be extended downwards by 0.1m:

Screenshot from 2022-10-10 19-51-35

Both screenshots are captured from the identical instance of Webots.