Revolute joint disobeying limits in Gazebo
I have a revolute joint being controlled by a custom ros2 controller which is setting the joints position. When the position is set by the controller I would expect Gazebo to handle moving the joint to that position, obeying the velocity parameter in the limit
tag of the joint URDF. If that were the case, then the joint would slowly move to the correct position, instead it instantaneously snaps to the desired position and none of the parameters (friction, damping, effort...) seem to make any difference to this.
Is this how it's supposed to work? Surely the controller just issues a command and the hardware interface is responsible for moving to that position? Or have I misunderstood entirely?
This is the joint
<joint name="lower_leg_joint" type="revolute">
<parent link="upper_leg"/>
<child link="lower_leg"/>
<origin xyz="0 0 0" rpy="0 0 0" />
<axis xyz="0 0 1"/>
<limit effort="1000.0" lower="${-pi/3}" upper="${pi/3}" velocity="0.1"/>
</joint>
and this is the ros2_control URDF
<ros2_control name="GazeboSystem" type="system">
<hardware>
<plugin>gazebo_ros2_control/GazeboSystem</plugin>
</hardware>
<joint name="lower_leg_joint">
<command_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="position"/>
</joint>
</ros2_control>
<gazebo>
<plugin name="gazebo_ros2_control" filename="libgazebo_ros2_control.so">
<parameters>./config/controllers.yaml</parameters>
</plugin>
</gazebo>