One footbot periodically sends a message, the other (should) receive it. The problem is that the receiver footbot is not receiving any messages.
I have made several changes to the .argos file with no success.
Can someone help me, please?
This is the code for the sender:
Code: Select all
function step()
print("Sender")
robot.range_and_bearing.set_data(1, 1)
end
And, this is the code for the receiver:
Code: Select all
STEPS = 15
steps = 0
function random_walk()
left_v = robot.random.uniform(0, 10)
right_v = robot.random.uniform(0, 10)
robot.wheels.set_velocity(left_v, right_v)
end
function step()
for i=1, #robot.range_and_bearing do
log("message: ", i)
log("distance: ", robot.range_and_bearing[i].range)
log("direction: ", robot.range_and_bearing[i].horizontal_bearing)
end
if steps % STEPS == 0 then
random_walk()
end
steps = steps + 1
end
I have also attached the main snippet of the arena configuration.