Hi
We've discovered that the robots show a different behavior when executing the same program from vpl or from the studio.
Imagine the following very simple program:
If the robot stands on the edge of a table (not detecting the ground), then drive backwards. Now given that program, what happens, when the robot does not stand on the edge when starting the program?
I cannot attach images, so I describe the program:
VPL in simple mode:
- as the event select the ground sensor, set both sensors to black
- as the action select the motor and set both wheels to backwards
The code looks as follows:
# reset outputs
call sound.system(-1)
call leds.top(0,0,0)
call leds.bottom.left(0,0,0)
call leds.bottom.right(0,0,0)
call leds.circle(0,0,0,0,0,0,0,0)
onevent prox
when prox.ground.delta[0] <= 400 and prox.ground.delta[1] <= 400 do
motor.left.target = -500
motor.right.target = -500
emit pair_run 0
end
Place the robot slightly over the edge of a table and run the program:
The robot instantly drives backwards: ok, thats intended.
Now place the robot in the middle of the table and start the program again:
The robot begins to drive backwards even though he should detect the table and remain still.
Copy the code and execute it from aseba studio (you have to remove the line "emit pair_run 0" of course): The robot acts as expected in both situations…
Why this strange behavior when running programs from vpl?
Regards
Tom