Skip to content

Commit 7e05119

Browse files
committed
Add name argument for robot name in xml parsing step.
1 parent e921bb1 commit 7e05119

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

ur5_moveit_config/config/ur5.srdf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<!--CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are also included. This means that joints along the chain and the parent joint of the base link are included in the group-->
1111
<!--SUBGROUPS: Groups can also be formed by referencing to already defined group names-->
1212
<group name="manipulator">
13-
<chain base_link="base_link" tip_link="ee_link" />
13+
<chain base_link="base_link" tip_link="flange" />
1414
</group>
1515
<group name="endeffector">
16-
<link name="ee_link" />
16+
<link name="flange" />
1717
</group>
1818
<!--GROUP STATES: Purpose: Define a named state for a particular group, in terms of joint values. This is useful to define states like 'folded arms'-->
1919
<group_state name="home" group="manipulator">
@@ -33,14 +33,15 @@
3333
<joint name="wrist_3_joint" value="0" />
3434
</group_state>
3535
<!--END EFFECTOR: Purpose: Represent information about an end effector.-->
36-
<end_effector name="moveit_ee" parent_link="ee_link" group="endeffector" />
36+
<end_effector name="moveit_ee" parent_link="flange" group="endeffector" />
3737
<!--VIRTUAL JOINT: Purpose: this element defines a virtual joint between a robot link and an external frame of reference (considered fixed with respect to the robot)-->
3838
<virtual_joint name="fixed_base" type="fixed" parent_frame="world" child_link="base_link" />
3939
<!--DISABLE COLLISIONS: By default it is assumed that any link of the robot could potentially come into collision with any other link in the robot. This tag disables collision checking between a specified pair of links. -->
40-
<disable_collisions link1="base_link" link2="shoulder_link" reason="Adjacent" />
41-
<disable_collisions link1="ee_link" link2="wrist_1_link" reason="Never" />
42-
<disable_collisions link1="ee_link" link2="wrist_2_link" reason="Never" />
43-
<disable_collisions link1="ee_link" link2="wrist_3_link" reason="Adjacent" />
40+
<disable_collisions link1="base_link" link2="base_link_inertia" reason="Adjacent" />
41+
<disable_collisions link1="base_link_inertia" link2="shoulder_link" reason="Adjacent" />
42+
<disable_collisions link1="flange" link2="wrist_1_link" reason="Never" />
43+
<disable_collisions link1="flange" link2="wrist_2_link" reason="Never" />
44+
<disable_collisions link1="flange" link2="wrist_3_link" reason="Adjacent" />
4445
<disable_collisions link1="forearm_link" link2="upper_arm_link" reason="Adjacent" />
4546
<disable_collisions link1="forearm_link" link2="wrist_1_link" reason="Adjacent" />
4647
<disable_collisions link1="shoulder_link" link2="upper_arm_link" reason="Adjacent" />

ur5_moveit_config/launch/run_move_group.launch.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ def generate_launch_description():
3333

3434
# <robot_name> parameters files
3535
joint_limits_params = os.path.join(get_package_share_directory('ur_description'), 'config/' +
36-
robot_name, 'joint_limits.yaml')
36+
robot_name.replace('_', ''), 'joint_limits.yaml')
3737
kinematics_params = os.path.join(get_package_share_directory('ur_description'), 'config/' +
38-
robot_name, 'default_kinematics.yaml')
38+
robot_name.replace('_', ''), 'default_kinematics.yaml')
3939
physical_params = os.path.join(get_package_share_directory('ur_description'), 'config/' +
40-
robot_name, 'physical_parameters.yaml')
40+
robot_name.replace('_', ''), 'physical_parameters.yaml')
4141
visual_params = os.path.join(get_package_share_directory('ur_description'), 'config/' +
42-
robot_name, 'visual_parameters.yaml')
42+
robot_name.replace('_', ''), 'visual_parameters.yaml')
4343

4444
# common parameters
4545
# If True, enable the safety limits controller
@@ -59,7 +59,8 @@ def generate_launch_description():
5959
'visual_params': visual_params,
6060
'safety_limits': str(safety_limits).lower(),
6161
'safety_pos_margin': str(safety_pos_margin),
62-
'safety_k_position': str(safety_k_position)}
62+
'safety_k_position': str(safety_k_position),
63+
'name': robot_name.replace('_', '')}
6364
)
6465

6566
robot_description = {'robot_description': robot_description_config.toxml()}
@@ -106,7 +107,7 @@ def generate_launch_description():
106107
planning_scene_monitor_parameters])
107108

108109
# RViz
109-
rviz_config_file = get_package_share_directory('ur_description') + "/cfg/view_robot.rviz"
110+
rviz_config_file = get_package_share_directory('ur_description') + "/config/rviz/view_robot.rviz"
110111
rviz_node = Node(package='rviz2',
111112
executable='rviz2',
112113
name='rviz2',

0 commit comments

Comments
 (0)