mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
32 lines
1.7 KiB
XML
32 lines
1.7 KiB
XML
<?xml version="1.0"?>
|
|
<launch>
|
|
<arg name="paused" default="false"/>
|
|
<arg name="gazebo_gui" default="true"/>
|
|
<arg name="initial_joint_positions" doc="Initial joint configuration of the robot"
|
|
default=" -J base_link1 0 -J joint1_L 0 -J joint1_R 0 -J joint2_L 0 -J joint2_R 0 -J joint3_L 0 -J joint3_R 0 -J joint4_L 0 -J joint4_R 0 -J joint5_L 0 -J joint5_R 0 -J joint6_L 0 -J joint6_R 0"/>
|
|
|
|
<!-- startup simulated world -->
|
|
<include file="$(find gazebo_ros)/launch/empty_world.launch">
|
|
<arg name="world_name" default="worlds/empty.world"/>
|
|
<arg name="paused" value="true"/>
|
|
<arg name="gui" value="$(arg gazebo_gui)"/>
|
|
</include>
|
|
|
|
<!-- send robot urdf to param server -->
|
|
<param name="robot_description" textfile="$(find mycobot_description)/urdf/mybuddy/mybuddy.urdf" />
|
|
|
|
<!-- unpause only after loading robot model -->
|
|
<arg name="unpause" value="$(eval '' if arg('paused') else '-unpause')" />
|
|
<!-- push robot_description to factory and spawn robot in gazebo at the origin, change x,y,z arguments to spawn in a different position -->
|
|
<arg name="world_pose" value="-x 0 -y 0 -z 0" />
|
|
<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 joint controller parameters for Gazebo -->
|
|
<rosparam file="$(find mybuddy_moveit)/config/gazebo_controllers.yaml" />
|
|
<!-- Spawn Gazebo ROS controllers -->
|
|
<node name="gazebo_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="joint_state_controller" />
|
|
<!-- Load ROS controllers -->
|
|
<include file="$(dirname)/ros_controllers.launch"/>
|
|
|
|
</launch>
|