NovoG93 / car_demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo of Prius in ROS/GAZEBO

CI CD

This is a simulation of a Prius in gazebo 11 with sensor data being published using ROS 2 humble The car's throttle, brake, steering, and gear shifting are controlled by publishing a ROS message. A ROS node allows driving with a gamepad/joystick (not yet tested) or keyboard (also directly in gazebo when mcity.world is loaded).

Video + Pictures

A video and screenshots of the demo can be seen in this blog post: https://www.osrfoundation.org/simulated-car-demo/

Sensor data of Prius in rviz2 (left), and gazebo simulation (right)

Requirements

This demo has been tested on Ubuntu Xenial (20.04) with ROS2 humble and inside docker.

  1. Using ROS2 humble installation:

  2. Using Docker:

    • An X server
    • Docker
    • nvidia-docker2 [optional]
    • The current user is a member of the docker group or other group with docker execution rights.
    • rocker [optional]

Building

First clone the repo, then run the script build_demo.bash.

  1. From source using ROS2 Humble installation:
$ cd ~/ros2_ws/
$ vcs import --input https://raw.githubusercontent.com/NovoG93/car_demo/humble/rosinstall.yaml src
$ colcon build  --packages-up-to car_demo  --symlink-install 
  1. Using Docker:
$ cd car_demo
$ ./build_demo.bash

Running

  1. Using ROS2 humble installation
$ source ~/ros2_ws/install/setup.bash
$ ros2 launch car_demo demo.launch.py
  1. Using Docker Use the script run_demo.bash to run the demo.
$ ./run_docker.bash
  1. Using Rocker
$ ./run_rocker.bash

In all cases an RVIZ window will open showing the car and sensor output. A gazebo window will appear showing the simulation. Either use the controller to drive the prius around the world, or click on the gazebo window and use the WASD keys to drive the car or use the teleop window that opens in xterm.

About


Languages

Language:C++ 71.5%Language:Python 18.9%Language:CMake 5.5%Language:Shell 2.6%Language:Dockerfile 1.6%