How is the navX used in YAGSL?

link to github: GitHub - FRC4418/2023_Offseason_Swerve

Im trying to set up our swerve with YAGSL but Im having trouble defining the navX in it. More specifically, the swerve will drive relatively fine in teleop; and it can follow pathplanner paths, but the heading of the robot pose will never change despite the path telling it to.

My first question would be what id would a navX plugged into the imu port on the rio have? In the past I’ve used the usual navX constructor with no arguments and its worked. I’ve tried a couple numbers including the default 13 and 0 with no success.

Secondly, what is the canbus field for and how should it be used? Is it exclusive to certain IMUs?

Thank you in advance

In general in YAGSL the can bus field is used to identify what bus you’ve assigned if using a carnivore. IF you are not using one then you set that to null in your config json. I believe the author has a web version to generate the configs ( you should use this ).

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.