Execute AIM 2024 (Automation Setup)
Last updated
Was this helpful?
Last updated
Was this helpful?
Download the following package:
Extract this package at location: ~/cognipilot/cranium/. After extraction your directories should look like the following:
This launcher will take care of the following steps to execute the AIM 2024 simulation setup:
Preparation for clean build: deleting previous build's log, build and install folders
Clean Build: colcon build
Sourcing the setup.bash: source ~/cognipilot/cranium/install/setup.bash
Updating the Raceway_1.sdf world file to include the obstacles, before the build
Launching the simulation: ros2 launch b3rb_gz_bringup sil.launch.py world:=Raceway_1
Auto firing of command: ros2 run b3rb_ros_line_follower vectors
Auto firing of command: ros2 run b3rb_ros_line_follower detect
Auto firing of command: ros2 run b3rb_ros_line_follower runner
To add/remove the obstacle and track models in simulation, using this launcher one doesn't need to manually update the Raceway_1.sdf world file present at ~/cognipilot/cranium/src/dream_world/worlds. To add obstacles using the launcher, one need to open and edit the models_config.json file present inside the launcher directory (~/cognipilot/cranium/AIM_2024_launcher), in the following manner:
"embed_model_1": It is a custom unique identifier given to each entity which allows Gazebo to keep track of each model spawned into the simulation.
"pose": This parameter defines the position and orientation of models in simulation. rIt is represented by "x y z R P Y" where: x is x-coordinate, y is y-coordinate, z is z-coordinate, R is roll, P is pitch and Y is yaw.
"type": This tag will contain name/type of the model to be spawned into the simulation. This represents the name of the desired model that has to be spawned and is stored either in ~/cognipilot/cranium/src/dream_world/models* .
To execute the launcher, open a new terminal in directory: ~/cognipilot/cranium/AIM_2024_launcher.
There are two modes of executing the launcher: start and stop
This mode will do the following steps in mentioned order: - Close the previous running simulation instance - Update the world file in dream_worlds folder - Perform clean build of stack - Sourcing of bash file - Launch the simulation - Execute commands to make buggy move autonomously in simulation
To execute the launcher in start mode, run the following command on terminal:
On executing the above command you will get output similar to:
This mode will only close the running simulation instance
To execute the launcher in stop mode, run the following command on terminal:
On executing the above command you will get output similar to below image and simulation instance will terminate, killing all background process needed by simulation to run and communication between ros2 and gazebo: