NAO
2

Foot bumper : 2 or 4 ?

Hi,

How many foot bumper could we use ? In the following documentation it's written there are 4 foot bumper (2 per foot) : http://doc.aldebaran.com/2-1/family/robots/contact-sensors_robot.html#ro... sensors

And in the launch trigger conditions I use to write : ('LeftBumperPressed' == 1) && ('Launchpad/PreviousActivity'... or ('RightBumperPressed' == 1) && ('Launchpad/PreviousActivity'...

How to use specific one of the both right/left foot bumper, in such a case ?

Thanks,

Fred

Answers

Read here

http://doc.aldebaran.com/2-1/family/nao_dcm/actuator_sensor_names.html#l...

if you want to use specific right or left then you have to read the sensor value which name is in the doc.

The events that you use are for each foot global. If the right or left sensor is pressed on say the left foot then the LeftBumperPressed will fire.

There is no event for the specific right left sensors, but you can create one name it, subscribe to it and then use it as you use the LeftBumperPressed event.

Another way is to program a python script that will check for the sensor signal, a very short and simple example:

def onInput_onStart(self): memory = ALProxy("ALMemory") while memory.getData("Device/SubDeviceList/LFoot/Bumper/Right/Sensor/Value") < 0.5: time.sleep(0.5) self.onStopped() pass

This small script polls the sensor value every half second and if the sensor is pressed the onStopped output is fired.

1 comment
  • Thank you very much Fabio. I will try to do such a python script.

    But, if I want to use the right Sensor of the left foot to launch my behaviour, is it really possible ? (in order to have 4 foor trigger in total to launch my programm).

    From now, tu launch a behavior I use two different way : - in a collaborative dialog (to launch the behaviour if NAO has got bleu eyes) : topic: ~SensorEvents() language: frf u:(e:RightBumperPressed) ^switchFocus(toto-7da937/Photocall) u:(e:LeftBumperPressed) ^switchFocus(tot-7da937/Introduction)

    • in Launch Trigger condition/Project Propertise (to launch the behaviour if NAO has white eyes).

    I'm note sure if my explanation/request is clear to undertand. Wink

    Fred

Hello,

concretely it's very difficult to activate only one side of one bumper, so a nice test to do is:

if( "Device/SubDeviceList/LFoot/Bumper/Right/Sensor/Value" or "Device/SubDeviceList/LFoot/Bumper/Left/Sensor/Value" ): say( "someone press my left foot"

Conclusion: it's as there's only one logical bumper per foot.

Good luck,

Alexandre

Back to top