🔖 renaming robot
This commit is contained in:
parent
50ee38c5ad
commit
9ad9e6c031
30 changed files with 50 additions and 67 deletions
49
rasms_moveit_config/launch/rasms_simulation.launch.py
Normal file
49
rasms_moveit_config/launch/rasms_simulation.launch.py
Normal file
|
@ -0,0 +1,49 @@
|
|||
from launch.launch_description import LaunchDescription
|
||||
from launch.actions import IncludeLaunchDescription, DeclareLaunchArgument
|
||||
from launch.substitutions import PathJoinSubstitution, LaunchConfiguration
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
from launch_ros.actions import Node
|
||||
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
|
||||
# Launch arguments
|
||||
launch_args = []
|
||||
|
||||
launch_args.append(DeclareLaunchArgument(
|
||||
name="robot_name",
|
||||
default_value="rasms_description",
|
||||
description="Set robot name."
|
||||
))
|
||||
|
||||
# Launch Gazebo
|
||||
gazebo = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
PathJoinSubstitution([
|
||||
FindPackageShare("gazebo_ros"),
|
||||
"launch",
|
||||
"gazebo.launch.py"
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
# Note: Environment variable GAZEBO_MODEL_PATH is extended as in
|
||||
# ROS2 control demos via environment hook https://github.com/ros-controls/ros2_control_demos/tree/master/ros2_control_demo_description/rrbot_description
|
||||
# Also see https://colcon.readthedocs.io/en/released/developer/environment.html#dsv-files
|
||||
# Gazebo launch scripts append GAZEBO_MODEL_PATH with known paths, see https://github.com/ros-simulation/gazebo_ros_pkgs/blob/ab1ae5c05eda62674b36df74eb3be8c93cdc8761/gazebo_ros/launch/gzclient.launch.py#L26
|
||||
spawn_entity = Node(
|
||||
package="gazebo_ros",
|
||||
executable="spawn_entity.py",
|
||||
arguments=[
|
||||
"-topic", "robot_description",
|
||||
"-entity", LaunchConfiguration("robot_name")
|
||||
],
|
||||
output="screen"
|
||||
)
|
||||
|
||||
return LaunchDescription(
|
||||
launch_args + [
|
||||
gazebo,
|
||||
spawn_entity
|
||||
])
|
Loading…
Add table
Add a link
Reference in a new issue