Anna Pawlicka

Programmer. Hiker. Cook. Always looking for interesting problems to solve.

About | Archive | Talks

How to add a new sensor to Aibo/NAO simulation in Webots

02 Feb 2013 | Aibo, NAO, sensor, Webots

Most of the robot simulations can be modified by adding Nodes directly in Scene Tree in Webots itself. However, to add a new sensor to Aibo (and NAO), we need to modify proto file. Example path on OS X (can differ from system to system): /Applications/Webots/resources/projects/robots/aibo/protos/Aibo_ERS7.proto

As an example, to add a distance sensor we need to paste this into the file:

    DistanceSensor {
                   translation 0 0.03 -0.0146
                   rotation 0 0 1 -1.57
                   name "color_sensor"
                   lookupTable [ 0 0 0,
                                 0.1 500 0.1,
                                 0.2 250 0.1,
                                 0.3 50 0.1,
                                 0.37 30 0 ]

More information on DistanceSensor properties can be found here.

Older · View Archive (25)

A not very successful attempt at red ball fitness function.

I decided to try a very simple genetic algorithm, with my own methods to copy and mutate individuals, and a very basic fitness function that, in theory, should try to minimize the distance between Bazinga and the red ball.


Standing position of Bazinga as a new fitness function.

It turns out that the infra red sensor does not work as I expected. First of all, it interprets lighter shades of various colours as red (e.g. yellow!). I’ve tried to modify the lookup table, but could not find the correct settings. Second, it does not work in fast mode (vital for evolution!). To sum up, it’s not a reliable sensor to be used in fitness function. I will definitely implement the red ball seeking behaviour, but instead of using the infra red sesor, I’ll do some simple camera image processing. However, before I jump into that, I’d like to make the dog move and not jerk in a random manner!