Java: Setting Pigeon Startup Yaw Using CTRE SwerveDriveTrain Project

We just generated a CTRE swerve drivetrain project, and the “front” of the robot is actually the back. I’m assuming a simple setyaw command to change the zero of the pigeon would fix it, however the pigeon is opened in the files that CTRE generates, and we don’t know how to set yaw it from robot init.

Any hints on this one?

Isn’t the front of the robot dependent on the order the swerve modules are initialized, not how the gyro is mounted?

A bandaid fix would be to invert the values fed into .withVelocityX() and .withVelocityY() for your setControl() calls, for robot-centric teleop driving at least.

That was what I thought as well - and I had them go back through the configurator to confirm that they had assigned them correctly. They opened the json they had exported and claimed it was correct…

This is one of those “I’m still learning too” moments, so I can’t contradict them yet.

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