Giter Site home page Giter Site logo

car_demo's Introduction

Autonomy Example added by Amir

Change log

I've modifed this car demo code to instead use only nvidia-docker2 and use a ".devcontainer" folder allowing instant configuration of the Docker container by using Microsoft VSC. This still requires you to be running Ubuntu 18/16 however, due to the restrictions of nvidia-docker2.

I have also added a Purepursuit example algortihm, which was based on on the Python Robotics library.

Purepursuit Demo

Demo of Prius in ROS/GAZEBO

This is a simulation of a Prius in gazebo 9 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)

  • An X server
  • Docker - I also think you should not get the snap version of docker if running 18.04
  • nvidia-docker2
  • The current user is a member of the docker group or other group with docker execution rights.
  • rocker not needed anymore
  • Microsoft Visual Studio Code with Remote Workspace Library (WSL)

Recommended

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

This has been tested with the Logitech F710 in Xbox mode. If you have a different joystick you may need to adjust the parameters for the very basic joystick_translator node: https://github.com/osrf/car_demo/blob/master/car_demo/nodes/joystick_translator

Building

Ensure that you have the nvidia-docker2 package installed, and open this folder with a MS VSC. It should automatically prompt you to reopen this folder in a .devcontainer

Running

Using a terminal inside the docker container (MS VSC should allow you to create these easy):

roslaunch car_demo car_demo.launch
roslaunch wp_control lateralControl.launch

If something complains about not being able to connect to a display, run xhost +local: on the local machine terminal. This may cause security concerns so this should not be used in a production machine.

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

car_demo's People

Contributors

amirx96 avatar angelja avatar chapulina avatar danieljeswin avatar esteve avatar iche033 avatar jbrookshire avatar nkoenig avatar ozzdemir avatar pushkalkatara avatar scpeters avatar sloretz avatar tfoote avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.