Skip to content

Commit bb31bcc

Browse files
committed
added a floating link with name prefix (#189)
1 parent 27fcbd4 commit bb31bcc

File tree

14 files changed

+79
-73
lines changed

14 files changed

+79
-73
lines changed

lbr_bringup/config/gazebo.rviz

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ Visualization Manager:
6767
Expand Link Details: false
6868
Expand Tree: false
6969
Link Tree Style: Links in Alphabetic Order
70+
lbr_floating_link:
71+
Alpha: 1
72+
Show Axes: false
73+
Show Trail: false
7074
lbr_link_0:
7175
Alpha: 1
7276
Show Axes: false
@@ -111,10 +115,6 @@ Visualization Manager:
111115
Alpha: 1
112116
Show Axes: false
113117
Show Trail: false
114-
world:
115-
Alpha: 1
116-
Show Axes: false
117-
Show Trail: false
118118
Mass Properties:
119119
Inertia: false
120120
Mass: false

lbr_bringup/config/hardware.rviz

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ Visualization Manager:
6868
Expand Link Details: false
6969
Expand Tree: false
7070
Link Tree Style: Links in Alphabetic Order
71+
lbr_floating_link:
72+
Alpha: 1
73+
Show Axes: false
74+
Show Trail: false
7175
lbr_link_0:
7276
Alpha: 1
7377
Show Axes: false
@@ -112,10 +116,6 @@ Visualization Manager:
112116
Alpha: 1
113117
Show Axes: false
114118
Show Trail: false
115-
world:
116-
Alpha: 1
117-
Show Axes: false
118-
Show Trail: false
119119
Mass Properties:
120120
Inertia: false
121121
Mass: false

lbr_bringup/config/mock.rviz

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ Visualization Manager:
6767
Expand Link Details: false
6868
Expand Tree: false
6969
Link Tree Style: Links in Alphabetic Order
70+
lbr_floating_link:
71+
Alpha: 1
72+
Show Axes: false
73+
Show Trail: false
7074
lbr_link_0:
7175
Alpha: 1
7276
Show Axes: false
@@ -111,10 +115,6 @@ Visualization Manager:
111115
Alpha: 1
112116
Show Axes: false
113117
Show Trail: false
114-
world:
115-
Alpha: 1
116-
Show Axes: false
117-
Show Trail: false
118118
Mass Properties:
119119
Inertia: false
120120
Mass: false

lbr_bringup/launch/gazebo.launch.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from launch import LaunchDescription
2-
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
2+
from launch.substitutions import LaunchConfiguration, PythonExpression
33
from lbr_bringup.description import LBRDescriptionMixin
44
from lbr_bringup.gazebo import GazeboMixin
55
from lbr_bringup.ros2_control import LBRROS2ControlMixin
@@ -15,13 +15,15 @@ def generate_launch_description() -> LaunchDescription:
1515
LBRROS2ControlMixin.arg_ctrl()
1616
) # Gazebo loads controller configuration through lbr_description/gazebo/*.xacro from lbr_ros2_control/config/lbr_controllers.yaml
1717

18-
# static transform world -> robot_name/world
18+
# static transform world -> <robot_name>_floating_link
1919
world_robot_tf = [0, 0, 0, 0, 0, 0] # keep zero
2020
ld.add_action(
2121
LBRDescriptionMixin.node_static_tf(
2222
tf=world_robot_tf,
2323
parent="world",
24-
child=PathJoinSubstitution([LaunchConfiguration("robot_name"), "world"]),
24+
child=PythonExpression(
25+
["'", LaunchConfiguration("robot_name"), "' + '_floating_link'"]
26+
),
2527
)
2628
)
2729

lbr_bringup/launch/hardware.launch.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from launch import LaunchDescription
22
from launch.actions import RegisterEventHandler
33
from launch.event_handlers import OnProcessStart
4-
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
4+
from launch.substitutions import LaunchConfiguration, PythonExpression
55
from lbr_bringup.description import LBRDescriptionMixin
66
from lbr_bringup.ros2_control import LBRROS2ControlMixin
77

@@ -18,12 +18,14 @@ def generate_launch_description() -> LaunchDescription:
1818
ld.add_action(LBRROS2ControlMixin.arg_ctrl_cfg())
1919
ld.add_action(LBRROS2ControlMixin.arg_ctrl())
2020

21-
# static transform world -> robot_name/world
21+
# static transform world -> <robot_name>_floating_link
2222
ld.add_action(
2323
LBRDescriptionMixin.node_static_tf(
2424
tf=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
2525
parent="world",
26-
child=PathJoinSubstitution([LaunchConfiguration("robot_name"), "world"]),
26+
child=PythonExpression(
27+
["'", LaunchConfiguration("robot_name"), "' + '_floating_link'"]
28+
),
2729
)
2830
)
2931

lbr_bringup/launch/mock.launch.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from launch import LaunchDescription
22
from launch.actions import RegisterEventHandler
33
from launch.event_handlers import OnProcessStart
4-
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
4+
from launch.substitutions import LaunchConfiguration, PythonExpression
55
from lbr_bringup.description import LBRDescriptionMixin
66
from lbr_bringup.ros2_control import LBRROS2ControlMixin
77

@@ -16,12 +16,14 @@ def generate_launch_description() -> LaunchDescription:
1616
ld.add_action(LBRROS2ControlMixin.arg_ctrl_cfg())
1717
ld.add_action(LBRROS2ControlMixin.arg_ctrl())
1818

19-
# static transform world -> robot_name/world
19+
# static transform world -> <robot_name>_floating_link
2020
ld.add_action(
2121
LBRDescriptionMixin.node_static_tf(
2222
tf=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
2323
parent="world",
24-
child=PathJoinSubstitution([LaunchConfiguration("robot_name"), "world"]),
24+
child=PythonExpression(
25+
["'", LaunchConfiguration("robot_name"), "' + '_floating_link'"]
26+
),
2527
)
2628
)
2729

lbr_description/urdf/iiwa14/iiwa14.xacro

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
name="system_config_path"
1313
default="$(find lbr_description)/ros2_control/lbr_system_config.yaml" />
1414

15-
<!-- fixed to world, see http://classic.gazebosim.org/tutorials?tut=ros_urdf&cat=connect_ros -->
16-
<link name="world" />
15+
<!-- KDL requires a link without inertia -->
16+
<link name="$(arg robot_name)_floating_link" />
1717

1818
<!--joint
19-
between world and link_0-->
20-
<joint name="world_joint" type="fixed">
21-
<parent link="world" />
19+
between <robot_name>_floating_link and robot_name_link_0-->
20+
<joint name="$(arg robot_name)_floating_joint" type="fixed">
21+
<parent link="$(arg robot_name)_floating_link" />
2222
<child link="$(arg robot_name)_link_0" />
2323
</joint>
2424

lbr_description/urdf/iiwa7/iiwa7.xacro

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
name="system_config_path"
1313
default="$(find lbr_description)/ros2_control/lbr_system_config.yaml" />
1414

15-
<!-- fixed to world, see http://classic.gazebosim.org/tutorials?tut=ros_urdf&cat=connect_ros -->
16-
<link name="world" />
15+
<!-- KDL requires a link without inertia -->
16+
<link name="$(arg robot_name)_floating_link" />
1717

1818
<!--joint
19-
between world and link_0-->
20-
<joint name="world_joint" type="fixed">
21-
<parent link="world" />
19+
between <robot_name>_floating_link and robot_name_link_0-->
20+
<joint name="$(arg robot_name)_floating_joint" type="fixed">
21+
<parent link="$(arg robot_name)_floating_link" />
2222
<child link="$(arg robot_name)_link_0" />
2323
</joint>
2424

lbr_description/urdf/med14/med14.xacro

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
name="system_config_path"
1313
default="$(find lbr_description)/ros2_control/lbr_system_config.yaml" />
1414

15-
<!-- fixed to world, see http://classic.gazebosim.org/tutorials?tut=ros_urdf&cat=connect_ros -->
16-
<link name="world" />
15+
<!-- KDL requires a link without inertia -->
16+
<link name="$(arg robot_name)_floating_link" />
1717

1818
<!--joint
19-
between world and link_0-->
20-
<joint name="world_joint" type="fixed">
21-
<parent link="world" />
19+
between <robot_name>_floating_link and robot_name_link_0-->
20+
<joint name="$(arg robot_name)_floating_joint" type="fixed">
21+
<parent link="$(arg robot_name)_floating_link" />
2222
<child link="$(arg robot_name)_link_0" />
2323
</joint>
2424

lbr_description/urdf/med7/med7.xacro

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
name="system_config_path"
1313
default="$(find lbr_description)/ros2_control/lbr_system_config.yaml" />
1414

15-
<!-- fixed to world, see http://classic.gazebosim.org/tutorials?tut=ros_urdf&cat=connect_ros -->
16-
<link name="world" />
15+
<!-- KDL requires a link without inertia -->
16+
<link name="$(arg robot_name)_floating_link" />
1717

1818
<!--joint
19-
between world and link_0-->
20-
<joint name="world_joint" type="fixed">
21-
<parent link="world" />
19+
between <robot_name>_floating_link and robot_name_link_0-->
20+
<joint name="$(arg robot_name)_floating_joint" type="fixed">
21+
<parent link="$(arg robot_name)_floating_link" />
2222
<child link="$(arg robot_name)_link_0" />
2323
</joint>
2424

lbr_moveit_config/iiwa14_moveit_config/config/moveit.rviz

+8-8
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ Visualization Manager:
6666
Expand Link Details: false
6767
Expand Tree: false
6868
Link Tree Style: Links in Alphabetic Order
69+
lbr_floating_link:
70+
Alpha: 1
71+
Show Axes: false
72+
Show Trail: false
6973
lbr_link_0:
7074
Alpha: 1
7175
Show Axes: false
@@ -110,10 +114,6 @@ Visualization Manager:
110114
Alpha: 1
111115
Show Axes: false
112116
Show Trail: false
113-
world:
114-
Alpha: 1
115-
Show Axes: false
116-
Show Trail: false
117117
Loop Animation: true
118118
Robot Alpha: 0.5
119119
Robot Color: 150; 50; 150
@@ -160,6 +160,10 @@ Visualization Manager:
160160
Expand Link Details: false
161161
Expand Tree: false
162162
Link Tree Style: Links in Alphabetic Order
163+
lbr_floating_link:
164+
Alpha: 1
165+
Show Axes: false
166+
Show Trail: false
163167
lbr_link_0:
164168
Alpha: 1
165169
Show Axes: false
@@ -204,10 +208,6 @@ Visualization Manager:
204208
Alpha: 1
205209
Show Axes: false
206210
Show Trail: false
207-
world:
208-
Alpha: 1
209-
Show Axes: false
210-
Show Trail: false
211211
Robot Alpha: 1
212212
Show Robot Collision: false
213213
Show Robot Visual: true

lbr_moveit_config/iiwa7_moveit_config/config/moveit.rviz

+8-8
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ Visualization Manager:
6666
Expand Link Details: false
6767
Expand Tree: false
6868
Link Tree Style: Links in Alphabetic Order
69+
lbr_floating_link:
70+
Alpha: 1
71+
Show Axes: false
72+
Show Trail: false
6973
lbr_link_0:
7074
Alpha: 1
7175
Show Axes: false
@@ -110,10 +114,6 @@ Visualization Manager:
110114
Alpha: 1
111115
Show Axes: false
112116
Show Trail: false
113-
world:
114-
Alpha: 1
115-
Show Axes: false
116-
Show Trail: false
117117
Loop Animation: true
118118
Robot Alpha: 0.5
119119
Robot Color: 150; 50; 150
@@ -160,6 +160,10 @@ Visualization Manager:
160160
Expand Link Details: false
161161
Expand Tree: false
162162
Link Tree Style: Links in Alphabetic Order
163+
lbr_floating_link:
164+
Alpha: 1
165+
Show Axes: false
166+
Show Trail: false
163167
lbr_link_0:
164168
Alpha: 1
165169
Show Axes: false
@@ -204,10 +208,6 @@ Visualization Manager:
204208
Alpha: 1
205209
Show Axes: false
206210
Show Trail: false
207-
world:
208-
Alpha: 1
209-
Show Axes: false
210-
Show Trail: false
211211
Robot Alpha: 1
212212
Show Robot Collision: false
213213
Show Robot Visual: true

lbr_moveit_config/med14_moveit_config/config/moveit.rviz

+8-8
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ Visualization Manager:
6666
Expand Link Details: false
6767
Expand Tree: false
6868
Link Tree Style: Links in Alphabetic Order
69+
lbr_floating_link:
70+
Alpha: 1
71+
Show Axes: false
72+
Show Trail: false
6973
lbr_link_0:
7074
Alpha: 1
7175
Show Axes: false
@@ -110,10 +114,6 @@ Visualization Manager:
110114
Alpha: 1
111115
Show Axes: false
112116
Show Trail: false
113-
world:
114-
Alpha: 1
115-
Show Axes: false
116-
Show Trail: false
117117
Loop Animation: true
118118
Robot Alpha: 0.5
119119
Robot Color: 150; 50; 150
@@ -160,6 +160,10 @@ Visualization Manager:
160160
Expand Link Details: false
161161
Expand Tree: false
162162
Link Tree Style: Links in Alphabetic Order
163+
lbr_floating_link:
164+
Alpha: 1
165+
Show Axes: false
166+
Show Trail: false
163167
lbr_link_0:
164168
Alpha: 1
165169
Show Axes: false
@@ -204,10 +208,6 @@ Visualization Manager:
204208
Alpha: 1
205209
Show Axes: false
206210
Show Trail: false
207-
world:
208-
Alpha: 1
209-
Show Axes: false
210-
Show Trail: false
211211
Robot Alpha: 1
212212
Show Robot Collision: false
213213
Show Robot Visual: true

lbr_moveit_config/med7_moveit_config/config/moveit.rviz

+8-8
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ Visualization Manager:
6666
Expand Link Details: false
6767
Expand Tree: false
6868
Link Tree Style: Links in Alphabetic Order
69+
lbr_floating_link:
70+
Alpha: 1
71+
Show Axes: false
72+
Show Trail: false
6973
lbr_link_0:
7074
Alpha: 1
7175
Show Axes: false
@@ -110,10 +114,6 @@ Visualization Manager:
110114
Alpha: 1
111115
Show Axes: false
112116
Show Trail: false
113-
world:
114-
Alpha: 1
115-
Show Axes: false
116-
Show Trail: false
117117
Loop Animation: true
118118
Robot Alpha: 0.5
119119
Robot Color: 150; 50; 150
@@ -160,6 +160,10 @@ Visualization Manager:
160160
Expand Link Details: false
161161
Expand Tree: false
162162
Link Tree Style: Links in Alphabetic Order
163+
lbr_floating_link:
164+
Alpha: 1
165+
Show Axes: false
166+
Show Trail: false
163167
lbr_link_0:
164168
Alpha: 1
165169
Show Axes: false
@@ -204,10 +208,6 @@ Visualization Manager:
204208
Alpha: 1
205209
Show Axes: false
206210
Show Trail: false
207-
world:
208-
Alpha: 1
209-
Show Axes: false
210-
Show Trail: false
211211
Robot Alpha: 1
212212
Show Robot Collision: false
213213
Show Robot Visual: true

0 commit comments

Comments
 (0)