Skip to content

smellslikeml/LitterBug_donkey

dev
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 21 commits ahead, 1369 commits behind autorope:main.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
car
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

LitterBug: Autonomous Trash Rover

Py versions

The LitterBug is a trash pick up rover built off the Donkeycar platform. It's goal is to help pick up trash in beaches, parks, etc as well as provide a fun and relevant context for which to learn about self-driving vehicles, AI, and robotics.

Read these first!

donkeycar

Build a LitterBug to:

  • Create a version of a real life WALL-E!
  • Experiment with autopilots, mapping, computer vision, and neural networks.
  • Train your rover to pick up trash anywhere (..and have fun while saving the planet)
  • Log sensor data. (images, user inputs, sensor readings)

Start Training!

After building a Litterbug, press the select button on the ps3 controller and get rolling.

Create your own parts.

You can make the LitterBug interact with the environment in new ways by adding a new physical part. For example, this project added a scoop part using an extra servo. Since the LitterBug is built off the Donkeycar platform, you can use their structure to create new parts.

#Define a vehicle to take and record pictures 10 times per second.

from donkeycar import Vehicle
from donkeycar.parts.camera import PiCamera
from donkeycar.parts.datastore import Tub


V = Vehicle()

#add a camera part
cam = PiCamera()
V.add(cam, outputs=['image'], threaded=True)

#add tub part to record images
tub = Tub(path='~/mycar/get_started',
          inputs=['image'],
          types=['image_array'])
V.add(tub, inputs=['image'])

#start the drive loop at 10 Hz
V.start(rate_hz=10)

You can also control your new part by mapping an unused button on your PS3 controller. Modifying the donkeycar/parts/controller.py file:

#AVAILABLE BUTTONS = ['tr', 'tl2', 'tr2', 'mode', 'thumbl', 'thumbr']
#AVAILABLE AXES = ['y', 'z', 'rx']

#In the update() method of the JoystickController class add:

if button == '<AVAILABLE BUTTON HERE>' and button_state == 1:
    #do something!

See LitterBug write-up, donkeycar resources, or join the Donkeycar Slack channel to learn more and share your build.

Packages

No packages published

Languages

  • Python 55.6%
  • JavaScript 36.6%
  • HTML 4.9%
  • Shell 1.4%
  • CSS 1.2%
  • Dockerfile 0.3%