0
$\begingroup$

I have a circle of radius 300 cm on whose circumference robots stop after moving in the environment. The robots only have a communication radius of 10 cm such that they can fit 6 robots along the diameter of the communication circle. Robots can only communicate i.e. receive and transmit messages from robots within their communication radius. Now I want to keep track of how many robots are present on the circumference of the 300 cm circle at any instant t.

What I was doing is this :

  1. If robot_1 stops on the circumference on circle then echo "counter=1". Counter is initialized with counter=0

  2. Another robot_2 stops on the circumference and within the comm. radius of robot_1 and recieves the echoed "Counter=1"

  3. It checks its own counter value and if (recived_counter_value > own_counter_value) then own_counter_value=recived counter value+1

  4. Robot_2 then send its counter value to robot_1

  5. Similarly the counter value propogates as robots keep stopping within comm. radius of each other.

But it doesn't seem to work. Robots also have unique IDs so I can keep the track of IDs from which the current robot is receiving messages from but the memory is limited so I'm trying to avoid using the IDs but if you have an algorithm that makes use of ID then please feel free to help.

$\endgroup$
4
  • $\begingroup$ what is your question? $\endgroup$ – jsotola Mar 19 at 6:58
  • $\begingroup$ @jsotola My question, as stated in the post, is that how do I keep count of the robots which as stopping on the circumference $\endgroup$ – sevebebe Mar 19 at 18:25
  • $\begingroup$ your post does not ask that ... it describes the project ... it says that you need help, but does not say what you need help with specifically ... there are no question marks in the post that would identify the specific sentence that is the question ... please add a specific, answerable question to your post $\endgroup$ – jsotola Mar 19 at 19:17
  • $\begingroup$ I’m not sure I understand your problem/question. Are you trying to count how many robots are within communication range of each robot? Can robots communicate with multiple robots at each time? $\endgroup$ – Ralff Mar 23 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.