Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/setup-robot-description.bash
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ cp -n "$ROBOT_DESCRIPTION_TEMPLATES/materials.xacro" urdf/common/materials.xacro
# Copy launch files for testing the description
for file_type in "${LAUNCH_FILE_TYPES[@]}"; do
mkdir -p launch
ROBOT_DESCRIPTION_LAUNCH="launch/${ROBOT_NAME}.launch.xml"
cp -n "$ROBOT_DESCRIPTION_TEMPLATES/robot_description.launch.xml" $ROBOT_DESCRIPTION_LAUNCH
VIEW_ROBOT_LAUNCH="launch/view_${ROBOT_NAME}.launch${file_type}"
cp -n "$ROBOT_DESCRIPTION_TEMPLATES/view_robot.launch${file_type}" $VIEW_ROBOT_LAUNCH

# sed all needed files
FILES_TO_SED=($ROBOT_URDF_XACRO $ROBOT_MACRO $ROBOT_MACRO_ROS2_CONTROL $VIEW_ROBOT_LAUNCH)
FILES_TO_SED=($ROBOT_URDF_XACRO $ROBOT_MACRO $ROBOT_MACRO_ROS2_CONTROL $VIEW_ROBOT_LAUNCH $ROBOT_DESCRIPTION_LAUNCH)

for SED_FILE in "${FILES_TO_SED[@]}"; do
sed -i "s/\\\$PKG_NAME\\\$/${PKG_NAME}/g" $SED_FILE
Expand Down
49 changes: 49 additions & 0 deletions templates/robot_description/robot_description.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
Copyright (c) 2025, b»robotized

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


Source of this file are templates in https://github.com/b-robotized/ros_team_workspace repository.

Author: Dr. Denis
-->

<launch>
<arg name="description_package"
default="$PKG_NAME$"
description="Description package of the $robot_name$. Usually the argument is not set, it enables use of a custom description."/>
<arg name="robot_name"
default="$ROBOT_NAME$"
description="Name of the robot which description should be loaded."/>
<arg name="prefix"
default=""
description="Prefix of the joint names, useful for multi-robot setup. If changed than also joint names in the controllers' configuration have to be updated."/>
<arg name="use_mock_hardware"
default="false"
description="Start robot with mock hardware mirroring command to its states."/>
<arg name="mock_sensor_commands"
default="true"
description="Enable mock command interfaces for sensors used for simple simulations. Used only if 'use_mock_hardware' parameter is true."/>
<arg name="launch_rviz"
default="false"
description="Launch RViz?"/>

<let name="robot_description_content" value="$(command '$(find-exec xacro) $(find-pkg-share $(var description_package))/urdf/$(var $ROBOT_NAME$).urdf.xacro prefix:=$(var prefix) use_mock_hardware:=$(var use_mock_hardware) mock_sensor_commands:=$(var mock_sensor_commands)')" />

<node pkg="robot_state_publisher" exec="robot_state_publisher" output="both">
<param name="robot_description" value="$(var robot_description_content)" />
</node>

<node pkg="rviz2" exec="rviz2" output="log" args="-d $(find-pkg-share $(var description_package))/rviz/$ROBOT_NAME$.rviz"/>
</launch>
4 changes: 2 additions & 2 deletions templates/robot_description/test_urdf_xacro.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt) (template)
# Copyright (c) 2025, b»robotized
# Copyright (c) 2022 FZI Forschungszentrum Informatik
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -28,7 +28,7 @@
# POSSIBILITY OF SUCH DAMAGE.

#
# Source of this file is https://github.com/StoglRobotics/ros_team_workspace repository.
# Source of this file is https://github.com/b-robotized/ros_team_workspace repository.
# Modified from tests in https://github.com/UniversalRobots/Universal_Robots_ROS2_Description
#
# Author: Lukas Sackewitz
Expand Down
4 changes: 2 additions & 2 deletions templates/robot_description/view_robot.launch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt)
# Copyright (c) 2025, b»robotized
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
# limitations under the License.

#
# Source of this file is https://github.com/StoglRobotics/ros_team_workspace repository.
# Source of this file is https://github.com/b-robotized/ros_team_workspace repository.
#
# Author: Dr. Denis
#
Expand Down
32 changes: 13 additions & 19 deletions templates/robot_description/view_robot.launch.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!--
Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt)
Copyright (c) 2025, b»robotized

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -14,24 +14,18 @@ See the License for the specific language governing permissions and
limitations under the License.


Source of this file are templates in https://github.com/StoglRobotics/ros_team_workspace repository.
Source of this file are templates in https://github.com/b-robotized/ros_team_workspace repository.

Author: Dr. Denis
-->

<launch>
<arg name="description_package"
default="$PKG_NAME$"
description="Description package of the dte_ea_1000. Usually the argument is not set, it enables use of a custom description."/>
<arg name="prefix"
default=""
description="Prefix of the joint names, useful for multi-robot setup. If changed than also joint names in the controllers' configuration have to be updated."/>

<let name="robot_description_content" value="$(command '$(find-exec xacro) $(find-pkg-share $(var description_package))/urdf/$ROBOT_NAME$.urdf.xacro prefix:=$(var prefix)')" />

<node pkg="joint_state_publisher_gui" exec="joint_state_publisher_gui"/>

<node pkg="robot_state_publisher" exec="robot_state_publisher" output="both">
<param name="robot_description" value="$(var robot_description_content)" />
</node>

<node pkg="rviz2" exec="rviz2" output="log" args="-d $(find-pkg-share $(var description_package))/rviz/$ROBOT_NAME$.rviz"/>
<launch>
<include file="$(find-pkg-share bdl_description)/launch/$ROBOT_NAME$.launch.xml" >
<arg name="use_mock_hardware" value="false" />
<arg name="launch_rviz" value="true" />
</include>

<node pkg="joint_state_publisher_gui" exec="joint_state_publisher_gui"/>
</launch>
</launch>
4 changes: 2 additions & 2 deletions templates/ros2_control/robot_ros2_control.launch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt)
# Copyright (c) 2025, b»robotized
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@

#
# Source of this file are templates in
# [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository.
# [RosTeamWorkspace](https://github.com/b-robotized/ros_team_workspace) repository.
#
# Author: Dr. Denis
#
Expand Down
29 changes: 11 additions & 18 deletions templates/ros2_control/robot_ros2_control.launch.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!--
Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt)
Copyright (c) 2025, b»robotized

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.


Source of this file are templates in
[RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository.
Source of this file are templates in https://github.com/b-robotized/ros_team_workspace repository.

Authors: Riyan Jose, Manuel Muth, Dr. Denis
-->
Expand Down Expand Up @@ -49,30 +48,24 @@ Authors: Riyan Jose, Manuel Muth, Dr. Denis
default="forward_position_controller"
description="Robot controller to start inactive. Choices are: [forward_position_controller, joint_trajectory_controller]."/>

<let name="robot_description_content" value="$(command '$(find-exec xacro) $(find-pkg-share $(var description_package))/urdf/$(var description_file).urdf.xacro prefix:=$(var prefix) use_mock_hardware:=$(var use_mock_hardware) mock_sensor_commands:=$(var mock_sensor_commands)')"/>


<!--robot_state_pub_node-->
<node pkg="robot_state_publisher" exec="robot_state_publisher" output="both">
<param name="robot_description" value="$(var robot_description_content)"/>
</node>
<include file="$(find-pkg-share $(var description_package))/launch/$ROBOT_NAME$.launch.xml">
<arg name="prefix" value="$(var prefix)" />
<arg name="use_mock_hardware" value="$(var simulation)" />
<arg name="launch_rviz" value="true" />
</include>

<!--control_node-->
<node pkg="controller_manager" exec="ros2_control_node" output="both">
<param name="robot_description" value="$(var robot_description_content)" />
<param from="$(find-pkg-share $(var runtime_config_package))/config/$(var controllers_file).yaml"/>
</node>

<!--rviz_node-->
<node pkg="rviz2" exec="rviz2" output="log" args="-d $(find-pkg-share $(var description_package))/rviz/$ROBOT_NAME$.rviz"/>

<!--joint_state_braodcaster_spawner-->
<!--joint_state_braodcaster spawner-->
<node pkg="controller_manager" exec="spawner" args="joint_state_broadcaster"/>

<!--robot_controller_spawner-->
<!--robot_controller spawner-->
<node pkg="controller_manager" exec="spawner" args="$(var robot_controller)"/>

<!--robot_controller_spawner-->
<!--robot_controller spawner-->
<node pkg="controller_manager" exec="spawner" args="$(var inactive_robot_controller) --inactive"/>

</launch>
4 changes: 2 additions & 2 deletions templates/ros2_control/robot_ros2_control_sim.launch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt)
# Copyright (c) 2025, b»robotized
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@

#
# Source of this file are templates in
# [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository.
# [RosTeamWorkspace](https://github.com/b-robotized/ros_team_workspace) repository.
#
# Author: Dr. Denis
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt)
# Copyright (c) 2025, b»robotized
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@

#
# Source of this file are templates in
# [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository.
# [RosTeamWorkspace](https://github.com/b-robotized/ros_team_workspace) repository.
#
# Author: Dr. Denis
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!--
Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt)
Copyright (c) 2025, b»robotized

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.


Source of this file are templates in
[RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository.
Source of this file are templates in https://github.com/b-robotized/ros_team_workspace repository.

Authors: Riyan Jose, Dr. Denis
-->
Expand Down
4 changes: 2 additions & 2 deletions templates/ros2_control/test_goal_publishers_config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 20224 Stogl Robotics Consulting UG (haftungsbeschränkt)
# Copyright (c) 2025, b»robotized
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@

#
# Source of this file are templates in
# [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository.
# [RosTeamWorkspace](https://github.com/b-robotized/ros_team_workspace) repository.
#

publisher_forward_position_controller:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt)
# Copyright (c) 2025, b»robotized
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@

#
# Source of this file are templates in
# [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository.
# [RosTeamWorkspace](https://github.com/b-robotized/ros_team_workspace) repository.
#
# Author: Dr. Denis
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!--
Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt)
Copyright (c) 2025, b»robotized

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.


Source of this file are templates in
[RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository.
Source of this file are templates in https://github.com/b-robotized/ros_team_workspace repository.

Authors: Riyan Jose, Dr. Denis
-->
Expand Down
Loading