Robobuilder

(Difference between revisions)
Jump to: navigation, search
m (Using the RBC controller)
(Added video of interactive Robot demo)
Line 3: Line 3:
 
|[[Image:Robobuilder-huno.jpg|thumb|240px|Assembled Robobuilder "Huno"]]
 
|[[Image:Robobuilder-huno.jpg|thumb|240px|Assembled Robobuilder "Huno"]]
 
|-
 
|-
|[[Image:Robobuilder-kit.jpg|thumb|240px|The Robobuilder Kit contains components for assembling a humanoid robot]]
+
|[[Image:Robobuilder-kit.jpg|thumb|320px|The Robobuilder Kit contains components for assembling a humanoid robot]]
 +
|-
 +
|<html>
 +
  <div class="thumb tright">
 +
    <div style="width:320px;">
 +
      <embed style="width:320px; height:240px;" id="VideoPlayback" type="application/x-shockwave-flash"
 +
        src="http://vision.eng.shu.ac.uk/mypath/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"
 +
        pluginspage="http://www.macromedia.com/go/getflashplayer"/>
 +
      <div class="thumbcaption" >
 +
        One can control the Robobuilder from within an interactive Ruby session (also available as <a href="http://vision.eng.shu.ac.uk/jan/robobuilder1.avi">15.5 MByte DivX3 video</a> and available on <a href="http://www.youtube.com/watch?v=3w34KPsjQlc">Youtube</a>)
 +
      </div>
 +
    </div>
 +
  </div>
 +
</html>
 
|-
 
|-
 
|}
 
|}
Line 43: Line 57:
 
robot.close
 
robot.close
 
</pre>
 
</pre>
 +
 +
=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=
 
=External Links=

Revision as of 21:37, 3 October 2009

Assembled Robobuilder "Huno"
The Robobuilder Kit contains components for assembling a humanoid robot
One can control the Robobuilder from within an interactive Ruby session (also available as 15.5 MByte DivX3 video and available on Youtube)

Working.gif

Contents

Ruby Examples

Using the RBC controller

New.gif You can download the Ruby-extension for controlling the Robobuilder using a GNU+Linux PC here:

robobuilder-0.2.1.tar.bz2

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

Bookmark and Share

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox