-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Redundancy: getSwarmBots()
and getAllPose()
#10
Comments
Yeah, they both are same. The original motivation behind this was the getSwarmBots() in Swarmbot.h will retrieve the pose data of all bots, that was last stored, while the getAllPose() will be the pose data, that is available from the communication network at that moment. The difference between the data could be used to know, the state of the bot (dead/down/alive) or error in network. But since, this was a simple simulator, I just copied the same function. Anyway, since, the simulator is simple enough, and this feature is a bit far-fetched, we can remove the getSwarmBots() under Swarmbot.h |
Also, in case of other types of bots joining, we will get data of all bots, irrespective of the type, from the communication. But if we specifically want to access only SwarmBots, this might be the way. |
If you are building this to test distributed code, then I see the point of having this, otherwise, if you are just going to be testing it on one system only, you can close this issue with the changes. |
The file
Swarmbot.h
containsgetSwarmBots()
whileCommunication.h
containsgetAllPose()
. On looking closely into both the methods, I think they do the exact same thing. Am I wrong? If not, then we should just stick to one.The text was updated successfully, but these errors were encountered: