forked from osrf/car_demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request osrf#5 from osrf/readme
Add build script and instructions for running the demo
- Loading branch information
Showing
3 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Demo of Prius in ROS/GAZEBO | ||
|
||
This is a simulation of a Prius in [gazebo 8](http://gazebosim.org) with sensor data being published using [ROS kinetic](http://wiki.ros.org/kinetic/Installation) | ||
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. | ||
|
||
|
||
# Requirements | ||
|
||
This demo has been tested on Ubuntu Xenial (16.04) | ||
|
||
* An X server | ||
* [Docker](https://www.docker.com/get-docker) | ||
* [nvidia-docker](https://github.com/NVIDIA/nvidia-docker/wiki/Installation) | ||
|
||
# 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](http://wiki.ros.org/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
sudo docker build -t osrf/car_demo $DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters