jsimpso81 / PathPlannerLabVIEW

PathPlanner library LabVIEW port. Used for First FRC Robotics
Other
5 stars 2 forks source link

Chance of robot moving different from the intended trajectory during initial execution immidiately after deploying code #8

Closed KimiYang951116 closed 9 months ago

KimiYang951116 commented 9 months ago

Hi, thanks for your dedication to porting PathPlanner and other 3rd party libraries for FRC LabVIEW teams to use. Your libraries are valuable for writing advanced control programs.

I would like to mention an issue our team has encountered, in which our robot seems to be moving in the wrong direction after redeploying our code. The issue was discovered when my team and I recently tested trajectory following on our holonomic drivetrain using the VIs in your library. For the most part, it works fine and achieved great results. However, this problem tends to occur randomly, happening only once in a couple of executions and redeployments. After some examination, I observed that when the issue occurs, the velocity values returned from the "Pathplanner_Ctrl_HolonomicDrvExecute" VI seem to be incorrect, even though the Pathplanner_States provided to it are correct. Due to this, I'm wondering whether or not there's an error in the VI, specifically related to something like the initialization of registers.

Below is the path we are testing on and also the direction our robot was heading when the problem occurred(marked in red). Screenshot 2024-01-31 183047

Best Regards, Kimi

jsimpso81 commented 9 months ago

Can you provide the code that is causing the issue -- and the .path file. The holonomic controller has an initialization input that needs to be set to true upon the first execution of any new path. Also the Odometry or Pose Estimation may be playing into this. To test this set the "auto" to off on the holonomic controller. It will then only be using the generated trajectory. Thanks

jsimpso81 commented 9 months ago

Hi. Just wondering if you can provide any additional details for this issue. If you think this is no longer an issue, feel free to close it. Thanks.

KimiYang951116 commented 9 months ago

Thanks for your advice and sorry for the late response. After some debugging, we've recently discovered that there's an error in our code related to the initialization of our absolute odometry, leading our robot sometimes racing to the initial pose of the trajectory after enabling it. After fixing the issue, it seems that the problem no longer exists.