-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Description/Bringup] Update scripts and templates for generating *.l…
…aunch.xml files (#160) * XML launch generator-> robot description + bringup * Add options for choosing the generated files --------- Co-authored-by: Dr. Denis <[email protected]> Co-authored-by: Manuel M <[email protected]>
- Loading branch information
1 parent
b5ec9da
commit 540cb5f
Showing
6 changed files
with
247 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<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="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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!-- | ||
Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt) | ||
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/StoglRobotics/ros_team_workspace repository. | ||
Authors: Riyan Jose, Manuel Muth, Dr. Denis | ||
--> | ||
|
||
<launch> | ||
<arg name="runtime_config_package" | ||
default="$RUNTIME_CONFIG_PKG_NAME$" | ||
description="Package with the controller's configuration in 'config' folder. Usually the argument is not set, it enables use of a custom setup."/> | ||
<arg name="controllers_file" | ||
default="$ROBOT_NAME$_controllers" | ||
description="YAML file (without extension) with the controllers configuration."/> | ||
<arg name="description_package" | ||
default="$DESCR_PKG_NAME$" | ||
description="Description package with robot URDF/xacro files. Usually the argument is not set, it enables use of a custom description."/> | ||
<arg name="description_file" | ||
default="$ROBOT_NAME$" | ||
description="URDF/XACRO description file (without extension) with the robot."/> | ||
<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="true" | ||
description="Start robot with mock hardware mirroring command to its states."/> | ||
<arg name="mock_sensor_commands" | ||
default="false" | ||
description="Enable mock command interfaces for sensors used for simple simulations. Used only if 'use_mock_hardware' parameter is true."/> | ||
<arg name="robot_controller" | ||
default="forward_position_controller" | ||
description="Robot controller to start. 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> | ||
|
||
<!--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--> | ||
<node pkg="controller_manager" exec="spawner" args="joint_state_broadcaster"/> | ||
|
||
<!--robot_controller_spawner--> | ||
<node pkg="controller_manager" exec="spawner" args="$(var robot_controller)"/> | ||
|
||
</launch> |
31 changes: 31 additions & 0 deletions
31
templates/ros2_control/test_forward_position_controller.launch.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!-- | ||
Copyright (c) 2024, Stogl Robotics Consulting UG (haftungsbeschränkt) | ||
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/StoglRobotics/ros_team_workspace repository. | ||
Authors: Riyan Jose, Dr. Denis | ||
--> | ||
|
||
<launch> | ||
|
||
<node pkg="ros2_controllers_test_nodes" | ||
exec="publisher_forward_position_controller" | ||
name="publisher_forward_position_controller" | ||
output="screen"> | ||
<param from="$(find-pkg-share '$PKG_NAME$')/config/test_goal_publishers_config.yaml"/> | ||
</node> | ||
|
||
</launch> |
Oops, something went wrong.