Refer to turtlebot gazebo package turtlebot3_gazebo
, in order to spawn the environment, we usually run
roscore # T1
roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch # T2
From the launch file, you can see it calls and spawns the target objects, one world and one robot.
gazebo
.my_package/worlds/wall.world
gazebo wall.world
turtlebot3_gazebo/launch/turtlebot3_empty_world.launch
to your launch folder as turtlebot3_wall.launch
.
<arg name="world_name" value="$(find turtlebot3_gazebo)/worlds/empty.world"/>
to
<arg name="world_name" value="$(find my_package)/worlds/wall.world"/>
roscore # T1
roslaunch my_package turtlebot3_wall.launch # T2
rostopic pub -r 10 /cmd_vel geometry_msgs/Twist '{linear: {x: 1.0, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}' # T3
rosservice call /gazebo/reset_simulation "{}" # T3 to reset
wall.world
<model name="unit_box_0">
<static>1</static>