Heyo! We are using Motion Profiling with the Talon SRX’s this season during the autonomous period and the basic work concept is that you have to load the trajectory into a top buffer of a Talon before you want to execute the profile - and then while executing, movement from the top to the lower buffer is handled automatically during autonomous. Thing is, you have to load the points before executing such that the Talon won’t run out of points during execution - since from our testing - loading points and running the motion profile at the same time is a bit risky because the roboRIO can sometimes lag a bit an cause a lack of points to execute.
Our thought was to load the trajectory points into the Talons on robot initialization - but the trajectory we load is different for each autonomous mode - so we have to load the set of points required for the current chosen autonomous (We use MagicBot with AutonomousStateMachines for that matter).
So to our question - is there a way in magicbot (or in general that works with magicbot) to execute a function on autonomous select (when the robot is disabled) - that recieves the autonomous mode and can choose to execute something based on that mode (load points in our case)? Or any other suggestion to implement our need?
Thanks in advance,
~ Nick S.