Redundant locations in URDF for joint position/effort/velocity limits
In ROS1 (and now in ROS2), position (and effort/velocity) limits were specified in the Joint URDF definition.
I understand that the more flexible <ros2_control> tags in URDF allow the specification of limits for any user-defined interface as well, but in the specific case of position (and effort/velocity) limits, how are redundant values handled?
For example, say I have a joint definition with position limits, as below:
<joint name="gripper_joint" type="revolute">
<axis xyz="0 1 0"/>
<parent link="base_link"/>
<child link="gripper_link"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<limit effort="1000.0" lower="-1.57" upper="1.57" velocity="10.0"/> <!-- <<< HERE -->
<dynamics damping="0.0" friction="0.0"/>
</joint>
And I also specify a <ros2_control> tag with a different set of position limits, as below:
<ros2_control name="gripper" type="system">
<hardware>
<plugin>gazebo_ros2_control/GazeboSystem</plugin>
</hardware>
<joint name="gripper_joint">
<command_interface name="position">
<param name="min">0.0</param> <!-- <<<< HERE -->
<param name="max">1.0</param> <!-- <<<< HERE -->
<param name="initial_value">0.5</param>
</command_interface>
<state_interface name="position">
</joint>
What is the order of precedence by which these conflicting values are resolved?