Skip to content

Commit

Permalink
Merge pull request #358 from k-okada/fake
Browse files Browse the repository at this point in the history
add MoveItFakeControllerManager
  • Loading branch information
k-okada authored Sep 30, 2021
2 parents f2352f4 + 8c05bba commit f251e93
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
34 changes: 34 additions & 0 deletions nextage_moveit_config/config/fake_controllers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
controller_list:
- name: fake_rarm_controller
joints:
- RARM_JOINT0
- RARM_JOINT1
- RARM_JOINT2
- RARM_JOINT3
- RARM_JOINT4
- RARM_JOINT5
initial: [0, 0, 1, 0, 0, 0]
- name: fake_larm_controller
joints:
- LARM_JOINT0
- LARM_JOINT1
- LARM_JOINT2
- LARM_JOINT3
- LARM_JOINT4
- LARM_JOINT5
initial: [0, 0, 1, 0, 0, 0]
- name: fake_head_controller
joints:
- HEAD_JOINT0
- HEAD_JOINT0
initial: [0, 0]
- name: fake_torso_controller
joints:
- CHEST_JOINT0
initial: [0]
initial:
- group: right_arm
pose : right_arm_initial_pose
- group: left_arm
pose : left_arm_initial_pose

6 changes: 5 additions & 1 deletion nextage_moveit_config/launch/demo.launch
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
</include>

<node pkg="tf" type="static_transform_publisher" name="virtual_joint_broadcaster_0" args="0 0 0 0 0 0 world WAIST 100" />

<!-- We do not have a robot connected, so publish fake joint states -->
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="/use_gui" value="false"/>
<rosparam param="/source_list">[/move_group/fake_controller_joint_states]</rosparam>
</node>

<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />

<include file="$(find nextage_moveit_config)/launch/move_group.launch">
<arg name="allow_trajectory_execution" value="false"/>
<arg name="allow_trajectory_execution" value="true"/>
<arg name="fake_execution" value="true"/>
</include>

<include file="$(find nextage_moveit_config)/launch/moveit_rviz.launch">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<launch>

<!-- Set the param that trajectory_execution_manager needs to find the controller plugin -->
<param name="moveit_controller_manager" value="moveit_fake_controller_manager/MoveItFakeControllerManager"/>

<!-- The rest of the params are specific to this plugin -->
<rosparam file="$(find nextage_moveit_config)/config/fake_controllers.yaml"/>

</launch>
4 changes: 3 additions & 1 deletion nextage_moveit_config/launch/move_group.launch
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<arg if="$(arg info)" name="command_args" value="--debug" />

<arg name="allow_trajectory_execution" default="true"/>
<arg name="fake_execution" default="false"/>
<arg name="max_safe_path_cost" default="1"/>
<arg name="jiggle_fraction" default="0.05" />
<arg name="publish_monitored_planning_scene" default="true"/>
Expand All @@ -22,7 +23,8 @@
</include>

<include ns="move_group" file="$(find nextage_moveit_config)/launch/trajectory_execution.launch" if="$(arg allow_trajectory_execution)">
<arg name="moveit_controller_manager" value="NextageOpen" />
<arg name="moveit_controller_manager" value="NextageOpen" unless="$(arg fake_execution)"/>
<arg name="moveit_controller_manager" value="fake" if="$(arg fake_execution)"/>
<arg name="moveit_manage_controllers" value="true" />
</include>

Expand Down

0 comments on commit f251e93

Please sign in to comment.