UltraSonic sensor is a device that measure distances. Use a SR04 or a SR05.
A value is sent to arduino when requested.
Useful to measure if someone is close from the robot to shake hands. Or what ever you want.
Open InMoov/config/service_I_UltraSonicSensor.config and setup like below.
If you have two UltraSonic sensors, you will set one on each Arduino (left and right)
To check if the UltraSonic is worky, you can type in the python window and execute:
print "ultrasonicRight test is: ", i01.getUltrasonicSensorDistance()
And see the result in the python tab.
By default the ultrasonic is not triggered, you need to tell it to start to get echo.
How to use it :
while (not distanceRight or distanceRight > 100):
print "==Ultrasonic=distanceRight=Distance:", distanceRight
File exemple InMoov/gestures/shakehand.py