Robobuilder
(Difference between revisions)
(Added video of interactive Robot demo) |
m |
||
Line 9: | Line 9: | ||
<div style="width:320px;"> | <div style="width:320px;"> | ||
<embed style="width:320px; height:240px;" id="VideoPlayback" type="application/x-shockwave-flash" | <embed style="width:320px; height:240px;" id="VideoPlayback" type="application/x-shockwave-flash" | ||
− | src="http://vision.eng.shu.ac.uk/ | + | src="http://vision.eng.shu.ac.uk/jan/flv/flvplayer.swf" width="320" height="240" |
flashvars="file=http://vision.eng.shu.ac.uk/jan/flv/robobuilder1.flv&image=http://vision.eng.shu.ac.uk/jan/flv/robobuilder1.jpg&displayheight=240" | flashvars="file=http://vision.eng.shu.ac.uk/jan/flv/robobuilder1.flv&image=http://vision.eng.shu.ac.uk/jan/flv/robobuilder1.jpg&displayheight=240" | ||
pluginspage="http://www.macromedia.com/go/getflashplayer"/> | pluginspage="http://www.macromedia.com/go/getflashplayer"/> |
Revision as of 21:37, 3 October 2009
|
Contents |
Ruby Examples
Using the RBC controller
You can download the Ruby-extension for controlling the Robobuilder using a GNU+Linux PC here:
Here is a small example program which makes the robot get up if it's lying on its back or its front.
#!/usr/bin/env ruby require 'robobuilder' require 'matrix' class Vector def norm Math.sqrt inner_product( self ) end end robot = Robobuilder.new '/dev/ttyUSB0' puts "Robobuilder" puts "Serial number: #{robot.serial_number}" acceleration = Vector[ *robot.accelerometer ] if acceleration.inner_product( Vector[ 0, 0, 1 ] ) > acceleration.norm * 0.97 robot.basic robot.a elsif acceleration.inner_product( Vector[ 0, 0, 1 ] ) < -acceleration.norm * 0.97 robot.basic robot.b end acceleration = Vector[ *robot.accelerometer ] if acceleration.inner_product( Vector[ 0, 1, 0 ] ) > acceleration.norm * 0.97 robot.run 1 end robot.close
Todo
- Implement various commands of direct mode
- Implement commands for uploading motion sequences
- Add support for Bluetooth communication
- Port serial communication module to Windows
External Links
- Robobuilder Ltd. (Korean manufacturer)
- Robosavvy (UK distributor)