Open jcarn opened 7 years ago
Actually we could use len(main.our_robots()) if we wanted
len(main.our_robots)
gives us the current number of robots we have (which we usually want) but the c++ constant gives us the max number of robots on a team (which is what a few plays, like stopped, need). I think we could make a function for len(our_robots)
but we can't make it a constant since the number of robots we have might change in a match.
@mmurley3 Are you still working on this? Robots_Per_Team would be the only constant exposed to python that (to my knowledge) doesn't belong to any specific class in C++. Which can be done but seems to go against the convention already established in robocup-py.cpp.
Nah, I haven't had the time to make much progress on it. Feel free to tackle it if you want.
@jcarn Which files should we be looking at?
This was more of an intro issue I had in mind
On Tue, Jul 17, 2018 at 7:25 PM, Jason Chan notifications@github.com wrote:
@jcarn https://github.com/jcarn Which files should we be looking at?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RoboJackets/robocup-software/issues/957#issuecomment-405759586, or mute the thread https://github.com/notifications/unsubscribe-auth/AQP1-oiqYokgVnvybvSoHBko48aIf2qlks5uHnKEgaJpZM4MzjA2 .
@tjones320 this is a must-have before competition this year.
Right now we just use "6" in a few places. Magic numbers are bad, and we should replace them. There is a constant called "Robots_Per_Team" in Constants.hpp that would be perfect for this, but it is in the C++ section of the code. Use the robocup-py.ccp stuff to get that constant into python, and then change all 6s to that constant