-
Notifications
You must be signed in to change notification settings - Fork 44
Launching the Simulation
-
Simple environment single robot, and fake localisation:
roslaunch bacchus_gazebo vineyard_demo.launch world_name:=vineyard_smallThe parameter is also the default, so can be launched also as
roslaunch bacchus_gazebo vineyard_demo.launchThe Gazebo simulator might be on pause after launching so you need to press the 'play' button in the bottom toolbar of Gazebo to start the simulation.
-
More complex environment with different plant stages:
roslaunch bacchus_gazebo vineyard_demo.launch world_name:=<WORLD>with
<WORLD>being one of the following:vineyard_smallvineyard_small_s0_coarsevineyard_small_s1_coarsevineyard_small_s2_coarsevineyard_small_s3_coarsevineyard_small_s4_coarsevineyard_stage0vineyard_stage0_heightmapvineyard_stage0_smallvineyard_stage1vineyard_stage2vineyard_stage3vineyard_stage4vineyard_stage4_small
-
If you intend to run a real localisation system (e.g. amcl) based on maps then set
fake_localisation:=false. -
If you simulation is too slow, you can run the simulation without the Simulation GUI (which is what slows it down a lot), by adding the parameter
gui:=false.
- Consult the roslaunch website (and maybe the tutorial linked from there) to better understand roslaunch files (note: they are used to define the orchestration of a bigger ROS system): http://wiki.ros.org/roslaunch
- open https://github.com/LCAS/bacchus_lcas/blob/teaching/bacchus_gazebo/launch/vineyard_demo.launch and https://github.com/LCAS/bacchus_lcas/blob/teaching/bacchus_gazebo/launch/thorvald.launch and find out when and where
thorvald.launchis included fromvineyard_demo.launch - run
roslaunch --nodes bacchus_gazebo vineyard_demo.launchandroslaunch --files bacchus_gazebo vineyard_demo.launch. What is shown on your screen? - run
roslaunch --ros-args bacchus_gazebo vineyard_demo.launch, look at the argumentworld_namewhich you can use to tell the roslaunch command to start with a different simulation world. You can see all the worlds that exist by runningrosls bacchus_gazebo/worlds/. Then you can set theworld_nameargument, e.g. to something likevineyard_small_s4_coarse(note that the.worldshould be omitted), i.e.roslaunch bacchus_gazebo vineyard_demo.launch world_name:=vineyard_small_s4_coarse(note the:=)
You can also use an RQT plugin called rqt_launchtree and use the Graphical User Interface (GUI) to introspect your launch file configurations (i.e. step 3 from the above)