Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Pull request Compare This branch is 3 commits behind tokyorails:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db
doc
lib
log
public
script
test
vendor
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

Rrroomba!

Main files

/lib/roomba.rb
/lib/roomba_simulation.rb
/lib/roomba_serial_simulation.rb

Quickstart

Migrate the db

$ rake db:migrate

Make sure that the tests pass

$ rake test

Jump in console and give the basic simulation a shot.

$ rails c
:001 > x = World.new.robot
:002 > x.move(100)
:003 > x.move(0,120)
:004 > x.move(1000)

You should end up with a bump reading at N:90, X:126 Y:89

X:126 is the center point of Simulated Roomba. Add the radius of Roomba + the radius of the obstacle and it should be the same as the distance between X:126 and the default simulated obstacle.

Or jump into the rails app and play around.

rails s
Something went wrong with that request. Please try again.