mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
34 lines
1.9 KiB
XML
34 lines
1.9 KiB
XML
<?xml version="1.0"?>
|
|
<launch>
|
|
<!-- Gazebo options -->
|
|
<arg name="gazebo_gui" default="true" doc="Start Gazebo GUI"/>
|
|
<arg name="paused" default="false" doc="Start Gazebo paused"/>
|
|
<arg name="world_name" default="worlds/empty.world" doc="Gazebo world file"/>
|
|
<arg name="world_pose" default="-x 0 -y 0 -z 0 -R 0 -P 0 -Y 0" doc="Pose to spawn the robot at"/>
|
|
<arg name="initial_joint_positions" default=" -J joint1_to_base 0 -J joint2_to_joint1 0 -J joint3_to_joint2 0 -J joint4_to_joint3 0 -J joint5_to_joint4 0 -J joint6_to_joint5 0" doc="Initial joint configuration of the robot"/>
|
|
|
|
<!-- Start Gazebo paused to allow the controllers to pickup the initial pose -->
|
|
<include file="$(find gazebo_ros)/launch/empty_world.launch" pass_all_args="true">
|
|
<arg name="paused" value="true"/>
|
|
</include>
|
|
|
|
<!-- Set the robot urdf on the parameter server -->
|
|
<param name="robot_description" textfile="$(find mycobot_630_moveit)/config/gazebo_firefighter.urdf" />
|
|
|
|
<!-- Unpause the simulation after loading the robot model -->
|
|
<arg name="unpause" value="$(eval '' if arg('paused') else '-unpause')" />
|
|
|
|
<!-- Spawn the robot in Gazebo -->
|
|
<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot $(arg unpause) $(arg world_pose) $(arg initial_joint_positions)"
|
|
respawn="false" output="screen" />
|
|
|
|
<!-- Load the controller parameters onto the parameter server -->
|
|
<rosparam file="$(find mycobot_630_moveit)/config/gazebo_controllers.yaml" />
|
|
<include file="$(dirname)/ros_controllers.launch"/>
|
|
|
|
<!-- Spawn the Gazebo ROS controllers -->
|
|
<node name="gazebo_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="joint_state_controller" />
|
|
|
|
<!-- Given the published joint states, publish tf for the robot links -->
|
|
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />
|
|
</launch>
|