Skip to content

Commit

Permalink
robot name prefix in config files (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhubii committed Oct 19, 2024
1 parent 4c02bef commit 9b65978
Show file tree
Hide file tree
Showing 31 changed files with 487 additions and 491 deletions.
20 changes: 10 additions & 10 deletions lbr_bringup/config/gazebo.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -67,47 +67,47 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
link_0:
lbr_link_0:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_1:
lbr_link_1:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_2:
lbr_link_2:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_3:
lbr_link_3:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_4:
lbr_link_4:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_5:
lbr_link_5:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_6:
lbr_link_6:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_7:
lbr_link_7:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_ee:
lbr_link_ee:
Alpha: 1
Show Axes: false
Show Trail: false
Expand All @@ -119,7 +119,7 @@ Visualization Manager:
Inertia: false
Mass: false
Name: RobotModel
TF Prefix: lbr
TF Prefix: ""
Update Interval: 0
Value: true
Visual Enabled: true
Expand Down
20 changes: 10 additions & 10 deletions lbr_bringup/config/hardware.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -68,47 +68,47 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
link_0:
lbr_link_0:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_1:
lbr_link_1:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_2:
lbr_link_2:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_3:
lbr_link_3:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_4:
lbr_link_4:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_5:
lbr_link_5:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_6:
lbr_link_6:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_7:
lbr_link_7:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_ee:
lbr_link_ee:
Alpha: 1
Show Axes: false
Show Trail: false
Expand All @@ -120,7 +120,7 @@ Visualization Manager:
Inertia: false
Mass: false
Name: RobotModel
TF Prefix: lbr
TF Prefix: ""
Update Interval: 0
Value: true
Visual Enabled: true
Expand Down
20 changes: 10 additions & 10 deletions lbr_bringup/config/mock.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -67,47 +67,47 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
link_0:
lbr_link_0:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_1:
lbr_link_1:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_2:
lbr_link_2:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_3:
lbr_link_3:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_4:
lbr_link_4:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_5:
lbr_link_5:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_6:
lbr_link_6:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_7:
lbr_link_7:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link_ee:
lbr_link_ee:
Alpha: 1
Show Axes: false
Show Trail: false
Expand All @@ -119,7 +119,7 @@ Visualization Manager:
Inertia: false
Mass: false
Name: RobotModel
TF Prefix: lbr
TF Prefix: ""
Update Interval: 0
Value: true
Visual Enabled: true
Expand Down
4 changes: 0 additions & 4 deletions lbr_bringup/lbr_bringup/ros2_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ def node_robot_state_publisher(
parameters=[
robot_description,
{"use_sim_time": use_sim_time},
# use robot name as frame prefix
{
"frame_prefix": PathJoinSubstitution([robot_name, ""])
}, # neat hack to add trailing slash, which is required by frame_prefix
],
namespace=robot_name,
**kwargs,
Expand Down
30 changes: 15 additions & 15 deletions lbr_description/gazebo/lbr_gazebo.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@
</xacro:macro>

<!-- references -->
<xacro:gazebo_link_reference name="link_0" />
<xacro:gazebo_joint_reference name="A1" />
<xacro:gazebo_link_reference name="link_1" />
<xacro:gazebo_joint_reference name="A2" />
<xacro:gazebo_link_reference name="link_2" />
<xacro:gazebo_joint_reference name="A3" />
<xacro:gazebo_link_reference name="link_3" />
<xacro:gazebo_joint_reference name="A4" />
<xacro:gazebo_link_reference name="link_4" />
<xacro:gazebo_joint_reference name="A5" />
<xacro:gazebo_link_reference name="link_5" />
<xacro:gazebo_joint_reference name="A6" />
<xacro:gazebo_link_reference name="link_6" />
<xacro:gazebo_joint_reference name="A7" />
<xacro:gazebo_link_reference name="link_7" />
<xacro:gazebo_link_reference name="${robot_name}_link_0" />
<xacro:gazebo_joint_reference name="${robot_name}_A1" />
<xacro:gazebo_link_reference name="${robot_name}_link_1" />
<xacro:gazebo_joint_reference name="${robot_name}_A2" />
<xacro:gazebo_link_reference name="${robot_name}_link_2" />
<xacro:gazebo_joint_reference name="${robot_name}_A3" />
<xacro:gazebo_link_reference name="${robot_name}_link_3" />
<xacro:gazebo_joint_reference name="${robot_name}_A4" />
<xacro:gazebo_link_reference name="${robot_name}_link_4" />
<xacro:gazebo_joint_reference name="${robot_name}_A5" />
<xacro:gazebo_link_reference name="${robot_name}_link_5" />
<xacro:gazebo_joint_reference name="${robot_name}_A6" />
<xacro:gazebo_link_reference name="${robot_name}_link_6" />
<xacro:gazebo_joint_reference name="${robot_name}_A7" />
<xacro:gazebo_link_reference name="${robot_name}_link_7" />
</xacro:macro>
</robot>
14 changes: 7 additions & 7 deletions lbr_description/ros2_control/lbr_system_interface.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -124,43 +124,43 @@
</joint>
</xacro:macro>

<xacro:joint_interface name="A1"
<xacro:joint_interface name="${robot_name}_A1"
min_position="${joint_limits['A1']['lower'] * PI / 180}"
max_position="${joint_limits['A1']['upper'] * PI / 180}"
max_velocity="${joint_limits['A1']['velocity'] * PI / 180}"
max_torque="${joint_limits['A1']['effort']}"
mode="${mode}" />
<xacro:joint_interface name="A2"
<xacro:joint_interface name="${robot_name}_A2"
min_position="${joint_limits['A2']['lower'] * PI / 180}"
max_position="${joint_limits['A2']['upper'] * PI / 180}"
max_velocity="${joint_limits['A2']['velocity'] * PI / 180}"
max_torque="${joint_limits['A2']['effort']}"
mode="${mode}" />
<xacro:joint_interface name="A3"
<xacro:joint_interface name="${robot_name}_A3"
min_position="${joint_limits['A3']['lower'] * PI / 180}"
max_position="${joint_limits['A3']['upper'] * PI / 180}"
max_velocity="${joint_limits['A3']['velocity'] * PI / 180}"
max_torque="${joint_limits['A3']['effort']}"
mode="${mode}" />
<xacro:joint_interface name="A4"
<xacro:joint_interface name="${robot_name}_A4"
min_position="${joint_limits['A4']['lower'] * PI / 180}"
max_position="${joint_limits['A4']['upper'] * PI / 180}"
max_velocity="${joint_limits['A4']['velocity'] * PI / 180}"
max_torque="${joint_limits['A4']['effort']}"
mode="${mode}" />
<xacro:joint_interface name="A5"
<xacro:joint_interface name="${robot_name}_A5"
min_position="${joint_limits['A5']['lower'] * PI / 180}"
max_position="${joint_limits['A5']['upper'] * PI / 180}"
max_velocity="${joint_limits['A5']['velocity'] * PI / 180}"
max_torque="${joint_limits['A5']['effort']}"
mode="${mode}" />
<xacro:joint_interface name="A6"
<xacro:joint_interface name="${robot_name}_A6"
min_position="${joint_limits['A6']['lower'] * PI / 180}"
max_position="${joint_limits['A6']['upper'] * PI / 180}"
max_velocity="${joint_limits['A6']['velocity'] * PI / 180}"
max_torque="${joint_limits['A6']['effort']}"
mode="${mode}" />
<xacro:joint_interface name="A7"
<xacro:joint_interface name="${robot_name}_A7"
min_position="${joint_limits['A7']['lower'] * PI / 180}"
max_position="${joint_limits['A7']['upper'] * PI / 180}"
max_velocity="${joint_limits['A7']['velocity'] * PI / 180}"
Expand Down
2 changes: 1 addition & 1 deletion lbr_description/urdf/iiwa14/iiwa14.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
between world and link_0-->
<joint name="world_joint" type="fixed">
<parent link="world" />
<child link="link_0" />
<child link="$(arg robot_name)_link_0" />
</joint>

<!-- iiwa -->
Expand Down
Loading

0 comments on commit 9b65978

Please sign in to comment.