- Run
git clone https://github.com/suchetanrs/gz-sim-environment -b rolling && cd gz-sim-environment
echo "xhost +" >> ~/.bashrc && source ~/.bashrc
you can ignore if done already.sudo chmod +x install-nvidia-container-toolkit.sh
./install-nvidia-container-toolkit.sh
- Pull the latest image
sudo docker pull osrf/ros:rolling-desktop-full
sudo docker build -t gazebo-vehicle-ros2-gpu-ionic:rolling .
sudo docker compose run vehicle_simulator_gz_sim
sudo chmod +x launch_simulation.sh
./launch_simulation.sh
- This will build the packages in the top-right terminal.
- After the build is complete you can run what was inputted in the top-left terminal. This will launch gazebo and spawn the robot.
- The GUI is disabled by default.
- You should be able to teleop the robot through the teleop window.
- You can run the default simulation RViz from the bottom-right terminal. As long as you are able to see the lidar pointcloud, the rgb and depth images on RViz, you can safely ignore the texture error messages on the simulation terminal window.
- If you wish to launch cave world, you can do run the following in the top right terminal:
ros2 launch vehicle_bringup unirobot.launch.py world:=cave_world.sdf
- If you wish to launch the corridor world, you can do run the following in the top right terminal:
ros2 launch vehicle_bringup unirobot.launch.py world:=indoor.sdf
If you would like to install the dependencies of your custom package to use with the simulation, place your custom package in other_ws and build the docker image using step 5 again.
The ROS_DOMAIN_ID
is set to 55 in the .bashrc
There are currently two model types. More will be available soon! (Drones, Legged Robots, Multi-Robot Simulations)
You can modify the spawn_robot.launch.py
in the vehicle_packages
to select your desired model.
Edit the robot_model_type
variable.