Skip to content

Commit

Permalink
added a floating link with name prefix (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhubii committed Oct 21, 2024
1 parent 27fcbd4 commit bb31bcc
Show file tree
Hide file tree
Showing 14 changed files with 79 additions and 73 deletions.
8 changes: 4 additions & 4 deletions lbr_bringup/config/gazebo.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -111,10 +115,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Mass Properties:
Inertia: false
Mass: false
Expand Down
8 changes: 4 additions & 4 deletions lbr_bringup/config/hardware.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -112,10 +116,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Mass Properties:
Inertia: false
Mass: false
Expand Down
8 changes: 4 additions & 4 deletions lbr_bringup/config/mock.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -111,10 +115,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Mass Properties:
Inertia: false
Mass: false
Expand Down
8 changes: 5 additions & 3 deletions lbr_bringup/launch/gazebo.launch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from launch import LaunchDescription
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch.substitutions import LaunchConfiguration, PythonExpression
from lbr_bringup.description import LBRDescriptionMixin
from lbr_bringup.gazebo import GazeboMixin
from lbr_bringup.ros2_control import LBRROS2ControlMixin
Expand All @@ -15,13 +15,15 @@ def generate_launch_description() -> LaunchDescription:
LBRROS2ControlMixin.arg_ctrl()
) # Gazebo loads controller configuration through lbr_description/gazebo/*.xacro from lbr_ros2_control/config/lbr_controllers.yaml

# static transform world -> robot_name/world
# static transform world -> <robot_name>_floating_link
world_robot_tf = [0, 0, 0, 0, 0, 0] # keep zero
ld.add_action(
LBRDescriptionMixin.node_static_tf(
tf=world_robot_tf,
parent="world",
child=PathJoinSubstitution([LaunchConfiguration("robot_name"), "world"]),
child=PythonExpression(
["'", LaunchConfiguration("robot_name"), "' + '_floating_link'"]
),
)
)

Expand Down
8 changes: 5 additions & 3 deletions lbr_bringup/launch/hardware.launch.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from launch import LaunchDescription
from launch.actions import RegisterEventHandler
from launch.event_handlers import OnProcessStart
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch.substitutions import LaunchConfiguration, PythonExpression
from lbr_bringup.description import LBRDescriptionMixin
from lbr_bringup.ros2_control import LBRROS2ControlMixin

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

# static transform world -> robot_name/world
# static transform world -> <robot_name>_floating_link
ld.add_action(
LBRDescriptionMixin.node_static_tf(
tf=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
parent="world",
child=PathJoinSubstitution([LaunchConfiguration("robot_name"), "world"]),
child=PythonExpression(
["'", LaunchConfiguration("robot_name"), "' + '_floating_link'"]
),
)
)

Expand Down
8 changes: 5 additions & 3 deletions lbr_bringup/launch/mock.launch.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from launch import LaunchDescription
from launch.actions import RegisterEventHandler
from launch.event_handlers import OnProcessStart
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch.substitutions import LaunchConfiguration, PythonExpression
from lbr_bringup.description import LBRDescriptionMixin
from lbr_bringup.ros2_control import LBRROS2ControlMixin

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

# static transform world -> robot_name/world
# static transform world -> <robot_name>_floating_link
ld.add_action(
LBRDescriptionMixin.node_static_tf(
tf=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
parent="world",
child=PathJoinSubstitution([LaunchConfiguration("robot_name"), "world"]),
child=PythonExpression(
["'", LaunchConfiguration("robot_name"), "' + '_floating_link'"]
),
)
)

Expand Down
10 changes: 5 additions & 5 deletions lbr_description/urdf/iiwa14/iiwa14.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
name="system_config_path"
default="$(find lbr_description)/ros2_control/lbr_system_config.yaml" />

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

<!--joint
between world and link_0-->
<joint name="world_joint" type="fixed">
<parent link="world" />
between <robot_name>_floating_link and robot_name_link_0-->
<joint name="$(arg robot_name)_floating_joint" type="fixed">
<parent link="$(arg robot_name)_floating_link" />
<child link="$(arg robot_name)_link_0" />
</joint>

Expand Down
10 changes: 5 additions & 5 deletions lbr_description/urdf/iiwa7/iiwa7.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
name="system_config_path"
default="$(find lbr_description)/ros2_control/lbr_system_config.yaml" />

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

<!--joint
between world and link_0-->
<joint name="world_joint" type="fixed">
<parent link="world" />
between <robot_name>_floating_link and robot_name_link_0-->
<joint name="$(arg robot_name)_floating_joint" type="fixed">
<parent link="$(arg robot_name)_floating_link" />
<child link="$(arg robot_name)_link_0" />
</joint>

Expand Down
10 changes: 5 additions & 5 deletions lbr_description/urdf/med14/med14.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
name="system_config_path"
default="$(find lbr_description)/ros2_control/lbr_system_config.yaml" />

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

<!--joint
between world and link_0-->
<joint name="world_joint" type="fixed">
<parent link="world" />
between <robot_name>_floating_link and robot_name_link_0-->
<joint name="$(arg robot_name)_floating_joint" type="fixed">
<parent link="$(arg robot_name)_floating_link" />
<child link="$(arg robot_name)_link_0" />
</joint>

Expand Down
10 changes: 5 additions & 5 deletions lbr_description/urdf/med7/med7.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
name="system_config_path"
default="$(find lbr_description)/ros2_control/lbr_system_config.yaml" />

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

<!--joint
between world and link_0-->
<joint name="world_joint" type="fixed">
<parent link="world" />
between <robot_name>_floating_link and robot_name_link_0-->
<joint name="$(arg robot_name)_floating_joint" type="fixed">
<parent link="$(arg robot_name)_floating_link" />
<child link="$(arg robot_name)_link_0" />
</joint>

Expand Down
16 changes: 8 additions & 8 deletions lbr_moveit_config/iiwa14_moveit_config/config/moveit.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -110,10 +114,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Loop Animation: true
Robot Alpha: 0.5
Robot Color: 150; 50; 150
Expand Down Expand Up @@ -160,6 +160,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -204,10 +208,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Robot Alpha: 1
Show Robot Collision: false
Show Robot Visual: true
Expand Down
16 changes: 8 additions & 8 deletions lbr_moveit_config/iiwa7_moveit_config/config/moveit.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -110,10 +114,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Loop Animation: true
Robot Alpha: 0.5
Robot Color: 150; 50; 150
Expand Down Expand Up @@ -160,6 +160,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -204,10 +208,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Robot Alpha: 1
Show Robot Collision: false
Show Robot Visual: true
Expand Down
16 changes: 8 additions & 8 deletions lbr_moveit_config/med14_moveit_config/config/moveit.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -110,10 +114,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Loop Animation: true
Robot Alpha: 0.5
Robot Color: 150; 50; 150
Expand Down Expand Up @@ -160,6 +160,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -204,10 +208,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Robot Alpha: 1
Show Robot Collision: false
Show Robot Visual: true
Expand Down
16 changes: 8 additions & 8 deletions lbr_moveit_config/med7_moveit_config/config/moveit.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -110,10 +114,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Loop Animation: true
Robot Alpha: 0.5
Robot Color: 150; 50; 150
Expand Down Expand Up @@ -160,6 +160,10 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
lbr_floating_link:
Alpha: 1
Show Axes: false
Show Trail: false
lbr_link_0:
Alpha: 1
Show Axes: false
Expand Down Expand Up @@ -204,10 +208,6 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Robot Alpha: 1
Show Robot Collision: false
Show Robot Visual: true
Expand Down

0 comments on commit bb31bcc

Please sign in to comment.