Wednesday 16 March 2011

Creative Robotics Basic plan for Buridan's Robot a robot that needs help to make choices

Basic plan for Buridan's Robot a robot that needs help to make choices
//we are finally getting somewhere with Urbi in Creative Robotics


var thing =;

function conv(a){

var res = ((a* 3.4/100.0) -1.7);

function gui_stuff()
var window =;//create a window
var layout =;//create the layout to display the
// things in the window
window.setLayout(layout);//set the layout in the window !notice the comment is longer than the line ....

//here you create the sliders
var shoulder_slider =;
var elbow_slider =;
var wrist_slider =;
var hand_slider =;

//here you add the stuff to the layout
layout.addWidget(shoulder_slider, 0, 0, Qt.Alignment.AlignHCenter);
layout.addWidget(elbow_slider, 0, 1, Qt.Alignment.AlignHCenter);
layout.addWidget(wrist_slider, 0, 2, Qt.Alignment.AlignHCenter);
layout.addWidget(hand_slider, 0, 3, Qt.Alignment.AlignHCenter);

//the following is how you catch an event, notice the event?(var msg) construct
at (shoulder_slider.sliderMoved?(var msg))

at (elbow_slider.sliderMoved?(var msg))

at (wrist_slider.sliderMoved?(var msg))

at (hand_slider.sliderMoved?(var msg))
echo(msg);;//here you make the window visible!!!!

//hmm interetsing
this is our simple idea:

react to sound - wants to turn to sound - we have a sound sensor

react to light - wants to turn to light - we have a light sensor

if it detects both it will signal need for our support how - by moving head - signs of panic

we might use attack duck example - simple movements

we activate proximity sensor to give it permision to make a random decision

decision( Tag)

1 comment: