Closed boranseckin closed 4 years ago
The docs are out of date, you need to use variable annotations instead of equal signs.
Also, for creating multiple objects of the same type, see https://robotpy.readthedocs.io/en/stable/frameworks/magicbot.html#variable-injection starting at "Sometimes, it’s useful to use multiple instances of the same class"
While using MagicRobot,
createObjects()
at robot.py initializes all the objects and the injection works correctly. I can access modules from swervedrive.py. However, after the injection,setup()
andexecute()
do not get called. When running the simulation, I can only getinit
printed.I cannot get the excepted behaviour that is explained in the docs.
robot.py:
components/swervedrive.py:
components/swervemodule.py