I want to get JointValues in subroutine, following is my code.
The mainRoutine is working fine, but when I try to get subroutine’s JointValue(I changed only one place, marked in red), the value always zero. You can also see my robot program from attached picture.
comp = getComponent()
robotExecutor = comp.findBehavioursByType(“rRobotExecutor”)
robotProgram = robotExecutor.Program
mainRoutine = robotProgram.MainRoutine
subroutines = robotProgram.Routines
for statement in mainRoutine.Statements:
for statement in subroutines.Statements: