2025-04-22 09:46:27 +00:00
|
|
|
|
<?xml version="1.0"?>
|
2025-05-22 07:22:55 +00:00
|
|
|
|
<!--
|
|
|
|
|
|
Copyright 2025 Reazon Holdings, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
|
limitations under the License.
|
|
|
|
|
|
-->
|
2025-04-22 09:46:27 +00:00
|
|
|
|
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
|
|
|
|
|
|
<xacro:macro name="openarm_bimanual_ros2_control" params="name initial_positions_file">
|
|
|
|
|
|
<xacro:property name="initial_positions" value="${load_yaml(initial_positions_file)['initial_positions']}"/>
|
|
|
|
|
|
|
|
|
|
|
|
<ros2_control name="${name}" type="system">
|
|
|
|
|
|
<hardware>
|
|
|
|
|
|
<!-- By default, set up controllers for simulation. This won't work on real hardware -->
|
|
|
|
|
|
<plugin>mock_components/GenericSystem</plugin>
|
|
|
|
|
|
</hardware>
|
|
|
|
|
|
<joint name="left_rev1">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['left_rev1']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="left_rev2">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['left_rev2']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="left_rev3">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['left_rev3']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="left_rev4">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['left_rev4']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="left_rev5">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['left_rev5']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="left_rev6">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['left_rev6']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="left_rev7">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['left_rev7']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="right_rev1">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['right_rev1']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="right_rev2">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['right_rev2']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="right_rev3">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['right_rev3']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="right_rev4">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['right_rev4']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="right_rev5">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['right_rev5']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="right_rev6">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['right_rev6']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="right_rev7">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['right_rev7']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="left_left_pris1">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['left_left_pris1']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
<joint name="right_left_pris1">
|
|
|
|
|
|
<command_interface name="position"/>
|
|
|
|
|
|
<command_interface name="velocity"/>
|
|
|
|
|
|
<state_interface name="position">
|
|
|
|
|
|
<param name="initial_value">${initial_positions['right_left_pris1']}</param>
|
|
|
|
|
|
</state_interface>
|
|
|
|
|
|
<state_interface name="velocity"/>
|
|
|
|
|
|
</joint>
|
|
|
|
|
|
|
|
|
|
|
|
</ros2_control>
|
|
|
|
|
|
</xacro:macro>
|
|
|
|
|
|
</robot>
|