Skip to content

Commit

Permalink
Rename fake_components to mock_components (#470)
Browse files Browse the repository at this point in the history
(cherry picked from commit 215c771)

# Conflicts:
#	doc/examples/dual_arms/dual_arm_panda_moveit_config/config/panda.ros2_control.xacro
#	doc/examples/dual_arms/dual_arm_panda_moveit_config/config/panda_hand.ros2_control.xacro
  • Loading branch information
tylerjw authored and mergify[bot] committed Jul 14, 2022
1 parent 80a7b61 commit 68f113c
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">

<xacro:macro name="panda_arm_ros2_control" params="name initial_positions_file prefix">
<xacro:property name="initial_positions" value="${load_yaml(initial_positions_file)['initial_positions']}"/>

<ros2_control name="${prefix}${name}" type="system">
<hardware>
<plugin>mock_components/GenericSystem</plugin>
</hardware>
<joint name="${prefix}panda_joint1">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['panda_joint1']}</param>
</state_interface>
<state_interface name="velocity"/>
</joint>
<joint name="${prefix}panda_joint2">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['panda_joint2']}</param>
</state_interface>
<state_interface name="velocity"/>
</joint>
<joint name="${prefix}panda_joint3">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['panda_joint3']}</param>
</state_interface>
<state_interface name="velocity"/>
</joint>
<joint name="${prefix}panda_joint4">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['panda_joint4']}</param>
</state_interface>
<state_interface name="velocity"/>
</joint>
<joint name="${prefix}panda_joint5">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['panda_joint5']}</param>
</state_interface>
<state_interface name="velocity"/>
</joint>
<joint name="${prefix}panda_joint6">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['panda_joint6']}</param>
</state_interface>
<state_interface name="velocity"/>
</joint>
<joint name="${prefix}panda_joint7">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['panda_joint7']}</param>
</state_interface>
<state_interface name="velocity"/>
</joint>
</ros2_control>
</xacro:macro>
</robot>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">

<xacro:macro name="panda_hand_ros2_control" params="name prefix">
<ros2_control name="${name}" type="system">
<hardware>
<plugin>mock_components/GenericSystem</plugin>
</hardware>
<joint name="${prefix}panda_finger_joint1">
<command_interface name="position" />
<state_interface name="position">
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity"/>
</joint>
<joint name="${prefix}panda_finger_joint2">
<param name="mimic">${prefix}panda_finger_joint1</param>
<param name="multiplier">1</param>
<command_interface name="position" />
<state_interface name="position">
<param name="initial_value">0.0</param>
</state_interface>
<state_interface name="velocity"/>
</joint>
</ros2_control>
</xacro:macro>

</robot>
12 changes: 12 additions & 0 deletions moveit2_tutorials.repos
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,15 @@ repositories:
type: git
url: https://github.com/ros-planning/srdfdom.git
version: ros2
moveit2:
type: git
url: https://github.com/ros-planning/moveit2
version: main
moveit_resources:
type: git
url: https://github.com/ros-planning/moveit_resources
version: ros2
ros2_control:
type: git
url: https://github.com/ros-controls/ros2_control.git
version: 2.12.1

0 comments on commit 68f113c

Please sign in to comment.