course2_ws/my_robot1_bringup/launch/my_robot1_gazebo.launch.xml
2024-12-18 19:49:29 -05:00

17 lines
770 B
XML

<launch>
<let name="urdf_path" value="$(find-pkg-share my_robot1_description)/urdf/my_robot1.urdf.xacro"/>
<let name="rviz_config_path" value="$(find-pkg-share my_robot1_bringup)/rviz/urdf_config.rviz"/>
<node pkg="robot_state_publisher" exec="robot_state_publisher">
<param name="robot_description" value="$(command 'xacro $(var urdf_path)')"/>
</node>
<include file="$(find-pkg-share gazebo_ros)/launch/gazebo.launch.py">
<arg name="world" value="$(find-pkg-share my_robot1_bringup)/worlds/test_world.world.xml"/>
</include>
<node pkg="gazebo_ros" exec="spawn_entity.py" args="-topic robot_description -entity my_robot1"/>
<node pkg="rviz2" exec="rviz2" output="screen" args="-d $(var rviz_config_path)" />
</launch>