Skip to content

ecward/car_demo

 
 

Repository files navigation

Demo of Prius in ROS/GAZEBO

This is a simulation of a Prius in gazebo 8 with sensor data being published using ROS kinetic The car's throttle, brake, steering, and gear shifting are controlled by publishing a ROS message. A ROS node allows driving with a gamepad or joystick.

Video + Pictures

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

Prius Image

Requirements

This demo has been tested on Ubuntu Xenial (16.04)

Recommended

  • A joystick
  • A joystick driver which creates links to /dev/input/js0 or /dev/input/js1

Building

First clone the repo, then run the script build_demo.bash. It builds a docker image with the local source code inside.

$ cd car_demo
$ ./build_demo.bash

Running

Connect a game controller to your PC. Use the script run_demo.bash to run the demo.

$ ./run_demo.bash

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.

If using a Logitech F710 controller:

  • Make sure the MODE status light is off
  • Set the swtich to XInput mode
  • The right stick controls throttle and brake
  • The left stick controls steering
  • Y puts the car into DRIVE
  • A puts the car into REVERSE
  • B puts the car into NEUTRAL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 92.8%
  • Python 3.1%
  • CMake 2.6%
  • Shell 1.5%