Proximity sensor don't see other Footbot when too close to each other
Posted: Thu Mar 18, 2021 8:32 am
My problem occurs when the FootBots get so close to each other that it seems like the robots overlap in the simulator. (I have added an image of the situation).
I am using the argos3 implementation of FootBot, and I have my own controller for the robots' movement.
In my implementation, the robots notice the block's direction by summing the sensor vectors and normalizing them, just as in the Diffusion example.
However, if there is a block (to the left of the robot), I have a line in my code as follows:
which makes it turn right on the spot.
However, in the next tick in the simulator, the robot does not see anything on any sensor, so it corrects its orientation concerning its destination, making it turn to the left. And I, therefore, have an infinite loop or a livelock.
I have tried to debug print the values of the sensors in this situation, and they are as follows:
Are there any suggestions for how I avoid this livelock?
Is there something I can do in the implementation of the robots that makes sure that they do not overlap?
Thanks in advance!
- Martin Kristjansen
I am using the argos3 implementation of FootBot, and I have my own controller for the robots' movement.
In my implementation, the robots notice the block's direction by summing the sensor vectors and normalizing them, just as in the Diffusion example.
However, if there is a block (to the left of the robot), I have a line in my code as follows:
Code: Select all
m_pcWheels->SetLinearVelocity(turnRate, -turnRate);
However, in the next tick in the simulator, the robot does not see anything on any sensor, so it corrects its orientation concerning its destination, making it turn to the left. And I, therefore, have an infinite loop or a livelock.
I have tried to debug print the values of the sensors in this situation, and they are as follows:
Code: Select all
.
.
.
Lenght of cAccumulator: 0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
(Next tick)
Angle Value:0.000000
Angle Value:0.000000
Angle Value:1.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Angle Value:0.000000
Lenght of cAccumulator: 0.083333
.
.
. (Repeating forever)
Is there something I can do in the implementation of the robots that makes sure that they do not overlap?
Thanks in advance!
- Martin Kristjansen