Giter Site home page Giter Site logo

aws-deepracer-gamepad-control's Introduction

AWS-Deepracer-Gamepad-Control

Control the AWS Deepracer wirelessly and directly with a gamepad. This was tested with a Logitech F710 but it should work with any joystick or game controller. If using a different controller, you may want to change the indices in lines 10 and 11 of file joy_cntl.py. A map of the controls for different joysticks can be found here. A lot of the info in this readme came from Mark Wolfe's Blog

Overview

The AWS Deepracer can be operated using the virtual joystick on the web interface but the lag in response time is horrendous. I recommend bypassing the web interface and controlling the racer directly and remotely with a gamepad. You can even watch the video stream from the front mounted camera while using the gamepad. It is not difficult to get up and running.

Details

This repository will add two ROS nodes to control the AWS Deepracer directly using the Logitech F710 Gamepad thereby bypassing the web interface control.

The AWS Deepracer can be powered up directly by using the same USB-C power adapter that is used to charge the computer battery. The HDMI connector is full size but the USB is a micro port so an adapter must be used to connect a USB mouse, keyboard, and gamepad dongle.

This setup uses the Logitech F710 Gamepad. This gamepad is rock solid and requires no bluetooth setup. Just plug the included gamepad dongle and go. It also works great with the Raspberry Pi. It appears that the deepracer has no bluetooth which is another reason to use this gamepad.

Pre-installed AWS startup files load ROS components at boot time. This setup does not mess with the pre-installed components, it only adds additional ROS nodes. Not all of the original ROS nodes are used so you may eventually want to comment out unessential nodes in the file "/opt/aws/deepracer/share/deepracer_launcher/launch/deepracer.launch".

Installation

Install the ROS joystick package.

sudo apt-get install ros-kinetic-joy

Follow the instructions in section "Configuring the Joystick" to verify the joystick is working and accessible.

If you have not already created a catkin workspace in your home directory you can follow the instructions to create one.

cd ~/catkin_ws
git clone https://github.com/cmasenas/AWS-Deepracer-Gamepad-Control.git src

Make the python file executable and editable.

chmod +rwx ~/catkin_ws/src/deepracer_cntl/src/joy_cntl.py

Starting the ROS gamepad control

To start the ROS nodes "joy" and "joy_cntl" navigate to the launch directory and use the launch file.

cd ~/catkin_ws/src/deepracer_cntl/launch
roslaunch deepracer_cntl joy_cntl.launch

All of the AWS pre-installed ROS code load at boot time so starting the joy_cntl launcher is the only thing necessary once the installation is done.

Driving Untethered

You can drive the deepracer remotely using only the gamepad and you can also view the camera feed on a network connected computer.

The deepracer hostname can be found on the underside of the deepracer.

ssh [email protected]
cd ~/catkin_ws/src/deepracer_cntl/launch
roslaunch deepracer_cntl joy_cntl.launch

To view the camera feed the firewall must first be stopped.

sudo ufw disable

Then the video stream can be viewed in a web browser.

http://HOSTNAME.local:8080/stream_viewer?topic=/video_mjpeg

aws-deepracer-gamepad-control's People

Contributors

cmasenas avatar hoooon89 avatar

Watchers

James Cloos 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.