Skip to content

Commit

Permalink
Adds the panda_control_moveit_rviz launch file (#45)
Browse files Browse the repository at this point in the history
This commit adds the panda_control_moveit_rviz launch file. This file can be used to control a real robot using MoveIt.
  • Loading branch information
rickstaa authored Aug 27, 2021
1 parent fc127c9 commit d7cecd4
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 154 deletions.
20 changes: 20 additions & 0 deletions config/panda_gripper_moveit_controllers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
controller_list:
- name: position_joint_trajectory_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
- name: franka_gripper
action_ns: gripper_action
type: GripperCommand
default: true
joints:
- panda_finger_joint1
- panda_finger_joint2
13 changes: 13 additions & 0 deletions config/panda_moveit_controllers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
controller_list:
- name: position_joint_trajectory_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
55 changes: 1 addition & 54 deletions config/ros_controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,57 +17,4 @@ hardware_interface:
- panda_joint6
- panda_joint7
- panda_finger_joint1
sim_control_mode: 1 # 0: position, 1: velocity
# Publish all joint states
# Creates the /joint_states topic necessary in ROS
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
controller_list:
[]
position_joint_trajectory_controller:
type: position_controllers/JointTrajectoryController
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
gains:
panda_joint1:
p: 100
d: 1
i: 1
i_clamp: 1
panda_joint2:
p: 100
d: 1
i: 1
i_clamp: 1
panda_joint3:
p: 100
d: 1
i: 1
i_clamp: 1
panda_joint4:
p: 100
d: 1
i: 1
i_clamp: 1
panda_joint5:
p: 100
d: 1
i: 1
i_clamp: 1
panda_joint6:
p: 100
d: 1
i: 1
i_clamp: 1
panda_joint7:
p: 100
d: 1
i: 1
i_clamp: 1
sim_control_mode: 1 # 0: position, 1: velocity
74 changes: 0 additions & 74 deletions launch/demo_gazebo.launch

This file was deleted.

23 changes: 0 additions & 23 deletions launch/gazebo.launch

This file was deleted.

3 changes: 2 additions & 1 deletion launch/move_group.launch
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
<!-- Trajectory Execution Functionality -->
<include ns="move_group" file="$(dirname)/trajectory_execution.launch.xml" if="$(arg allow_trajectory_execution)">
<arg name="moveit_manage_controllers" value="true" />
<arg name="moveit_controller_manager" value="panda" unless="$(arg fake_execution)"/>
<arg name="moveit_controller_manager" value="panda" if="$(eval not arg('fake_execution') and not arg('load_gripper'))"/>
<arg name="moveit_controller_manager" value="panda_gripper" if="$(eval not arg('fake_execution') and arg('load_gripper'))"/>
<arg name="moveit_controller_manager" value="fake" if="$(arg fake_execution)"/>
<arg name="execution_type" value="$(arg execution_type)" />
</include>
Expand Down
30 changes: 30 additions & 0 deletions launch/panda_control_moveit_rviz.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" ?>
<!--
Used to control a real robot using moveit
-->
<launch>
<arg name="load_gripper" default="true" />
<arg name="launch_rviz" default="true" />
<!--
By default we load the franka controllers.Disable this option if the controllers are
running on a seperate workstation
-->
<arg name="launch_franka_control" default="true" />
<group if="$(arg launch_franka_control)">
<arg name="robot_ip" />
</group>

<!-- If needed, broadcast static tf for robot root -->
<node pkg="tf2_ros" type="static_transform_publisher" name="virtual_joint_broadcaster_1" args="0 0 0 0 0 0 world panda_link0" />

<include if="$(arg launch_franka_control)" file="$(find franka_control)/launch/franka_control.launch">
<arg name="robot_ip" value="$(arg robot_ip)" />
<arg name="load_gripper" value="$(arg load_gripper)" />
</include>

<include file="$(find panda_moveit_config)/launch/panda_moveit.launch">
<arg name="load_gripper" value="$(arg load_gripper)" />
</include>

<include file="$(find panda_moveit_config)/launch/moveit_rviz.launch" if="$(arg launch_rviz)"/>
</launch>
12 changes: 12 additions & 0 deletions launch/panda_gripper_moveit_controller_manager.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<launch>

<!-- this argument is not used here, only necessary so that this launch file has the same args as fake_moveit_controller_manager.launch -->
<arg name="execution_type" default="unused" />

<!-- Set the param that trajectory_execution_manager needs to find the controller plugin -->
<arg name="moveit_controller_manager" default="moveit_simple_controller_manager/MoveItSimpleControllerManager" />
<param name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/>

<!-- load controller_list -->
<rosparam file="$(find panda_moveit_config)/config/panda_gripper_moveit_controllers.yaml"/>
</launch>
10 changes: 10 additions & 0 deletions launch/panda_moveit.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" ?>
<launch>
<arg name="load_gripper" default="true" />

<include file="$(dirname)/ros_controllers.launch"/>

<include file="$(find panda_moveit_config)/launch/move_group.launch">
<arg name="load_gripper" value="$(arg load_gripper)" />
</include>
</launch>
2 changes: 1 addition & 1 deletion launch/panda_moveit_controller_manager.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
<param name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/>

<!-- loads ros_controllers to the param server -->
<rosparam file="$(find panda_moveit_config)/config/ros_controllers.yaml"/>
<rosparam file="$(find panda_moveit_config)/config/panda_moveit_controllers.yaml"/>
</launch>
2 changes: 1 addition & 1 deletion launch/ros_controllers.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

<!-- Load the controllers -->
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" args="position_joint_trajectory_controller "/>
output="screen" args="position_joint_trajectory_controller"/>

</launch>

0 comments on commit d7cecd4

Please sign in to comment.