Multi Turtlebot3 Gazebo Simulation with Prepared Launch File

Slide Note
Embed
Share

This content provides details about a multi Turtlebot3 simulation in Gazebo, including a prepared launch file for setting up multiple Turtlebot3 robots in a simulated environment. It covers the configuration of robots, their positions, and necessary launch parameters. The content also includes specific launch instructions and images to aid in the setup process.


Uploaded on Oct 10, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Multi Turtlebot3 Gazebo Simulation 26001700935 Hitomi Ohmae EPBL-5 May 31st, 2019

  2. Prepared launch file in turtlebot3_gazebo package $ export TURTLEBOT3_MODEL=waffle_pi $ roslaunch turtlebot3_gazebo multi_turtlebot3.launch

  3. multi_turtlebot3.launch <launch> <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/> <arg name="first_tb3" default="tb3_0"/> <arg name="second_tb3" default="tb3_1"/> <arg name="third_tb3" default="tb3_2"/> <arg name="first_tb3_x_pos" default="-7.0"/> <arg name="first_tb3_y_pos" default="-1.0"/> <arg name="first_tb3_z_pos" default=" 0.0"/> <arg name="first_tb3_yaw" default=" 1.57"/> <arg name="second_tb3_x_pos" default=" 7.0"/> <arg name="second_tb3_y_pos" default="-1.0"/> <arg name="second_tb3_z_pos" default=" 0.0"/> <arg name="second_tb3_yaw" default=" 1.57"/> <arg name="third_tb3_x_pos" default=" 0.5"/> <arg name="third_tb3_y_pos" default=" 3.0"/> <arg name="third_tb3_z_pos" default=" 0.0"/> <arg name="third_tb3_yaw" default=" 0.0"/>

  4. <include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="world_name" value="$(find turtlebot3_gazebo)/worlds/turtlebot3_house.world"/> <arg name="paused" value="false"/> <arg name="use_sim_time" value="true"/> <arg name="gui" value="true"/> <arg name="headless" value="false"/> <arg name="debug" value="false"/> </include> <group ns = "$(arg first_tb3)"> <param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" /> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"> <param name="publish_frequency" type="double" value="50.0" /> <param name="tf_prefix" value="$(arg first_tb3)" /> </node> <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg first_tb3) -x $(arg first_tb3_x_pos) -y $(arg first_tb3_y_pos) -z $(arg first_tb3_z_pos) -Y $(arg first_tb3_yaw) -param robot_description" /> </group> </launch>

  5. 1. Changing the Environment 2. Adding new model

  6. <launch> <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/> <arg name="tb3" default="tb3_0"/> <arg name="tb3_x_pos" default="-1.0"/> <arg name="tb3_y_pos" default="-1.0"/> <arg name="tb3_z_pos" default=" 0.0"/> <arg name="name" default="quadrotor"/> <arg name="model2" default="$(find hector_quadrotor_description)/urdf/quadrotor.gazebo.xacro"/> <arg name="tf_prefix" default="$(optenv ROS_NAMESPACE)"/> <arg name="world_frame" default="/world"/> <arg name="base_link_frame" default="$(arg tf_prefix)/base_link"/> <arg name="x" default="1.0"/> <arg name="y" default="1.0"/> <arg name="z" default="0.3"/> <include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="world_name" value="$(find multi_robot)/worlds/original.world"/> <arg name="paused" value="false"/> <arg name="use_sim_time" value="true"/> <arg name="gui" value="true"/> <arg name="headless" value="false"/> <arg name="debug" value="false"/> </include> <group ns = "$(arg tb3)"> <param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" /> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"> <param name="publish_frequency" type="double" value="50.0" /> <param name="tf_prefix" value="$(arg tb3)" /> </node> <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg tb3) -x $(arg tb3_x_pos) -y $(arg tb3_y_pos) -z $(arg tb3_z_pos) -param robot_description" /> </group> <group ns = "$(arg name)"> <param name="robot_description" command="$(find xacro)/xacro '$(arg model2)' base_link_frame:=$(arg base_link_frame) world_frame:=$(arg world_frame)" /> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"> <param name="publish_frequency" type="double" value="50.0" /> <param name="tf_prefix" value="$(arg name)" /> </node> <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg name) -x $(arg x) -y $(arg y) -z $(arg z) -param robot_description" /> </group> </launch>

  7. Initial Setting <launch> <arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/> <arg name="tb3" default="tb3_0"/> <arg name="tb3_x_pos" default="-1.0"/> <arg name="tb3_y_pos" default="-1.0"/> <arg name="tb3_z_pos" default=" 0.0"/> <arg name="name" default="quadrotor"/> <arg name="model2" default="$(find hector_quadrotor_description)/urdf/quadrotor.gazebo.xacro"/> <arg name="tf_prefix" default="$(optenv ROS_NAMESPACE)"/> <arg name="world_frame" default="/world"/> <arg name="base_link_frame" default="$(arg tf_prefix)/base_link"/> <arg name="x" default="1.0"/> <arg name="y" default="1.0"/> <arg name="z" default="0.3"/>

  8. Environment Setting <include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="world_name" value="$(find multi_robot)/worlds/original.world"/> <arg name="paused" value="false"/> <arg name="use_sim_time" value="true"/> <arg name="gui" value="true"/> <arg name="headless" value="false"/> <arg name="debug" value="false"/> </include>

  9. Turtlebot Setting <group ns = "$(arg tb3)"> <param name="robot_description" command="$(find xacro)/xacro -- inorder $(find turtlebot3_description)/urdf/turtlebot3_$(arg model).urdf.xacro" /> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"> <param name="publish_frequency" type="double" value="50.0" /> <param name="tf_prefix" value="$(arg tb3)" /> </node> <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg tb3) -x $(arg tb3_x_pos) -y $(arg tb3_y_pos) -z $(arg tb3_z_pos) -param robot_description" /> </group>

  10. Drone Setting <group ns = "$(arg name)"> <param name="robot_description" command="$(find xacro)/xacro '$(arg model2)' base_link_frame:=$(arg base_link_frame) world_frame:=$(arg world_frame)" /> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen"> <param name="publish_frequency" type="double" value="50.0" /> <param name="tf_prefix" value="$(arg name)" /> </node> <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -model $(arg name) -x $(arg x) -y $(arg y) -z $(arg z) -param robot_description" /> </group> </launch>

More Related Content