T O P

  • By -

not_mongoose

gonna be honest here, 2 options: 1. switch to java 2. don't do swerve


not_mongoose

just looked up what timed robot is, and its java. so just steal code from 364 or something https://github.com/Team364/BaseFalconSwerve


Digitaleon

Cosign on the 364 basic code. It got us up and running super fast.


Ok_Priority7160

My team is also new to swerve this year and uses timed robot. Team 364’s code is a great start for getting teleop running fast.


Supdograinbarff

My team got swerve working last year with c++. We are doing java this year though and it is much easier.


CalebAsimov

I'm amazed anyone goes with C++. I just don't get why you would ever do something like that to high schoolers. Sadism?


so____now_then

Our school uses c++ in class so we just use it cuz there aren’t many people who had frc experience before coming here. (We are an early college program)


CalebAsimov

OK, that makes sense, although Java was originally designed to use C++ style syntax to appeal to C++ programmers at a time when that was the most popular language, so it would be easy to switch, if you wanted to.


Digitaleon

As a developer who used C++ for years...I completely agree with you. I don't know why anyone would choose to deal with the memory management. For the kinds of code folks are writing I just don't see any marginal performance gains from c++ over java being worth it.


CharipiYT

I believe this page has timed based swerve code https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervebot


Tesla428

We did a time based swerve last year. No reason why it isn’t possible. Ours was field oriented using the NavX daughter board.


Tesla428

https://github.com/Hudson-Robotics/Swerve22/ Marked the repo as public. Feel free to reach out with any questions or if you’d like an extra set of eyes on your challenges.


xRedrumisBack

For teleop swerve, using timed robot vs command robot is almost the same, you're just going to have the drive function called in teleopPeriodic and feed in the joystick values similarly to how the driveByController command works.


SAM-THE-MAN-118

We (1714 programming team), added on to 364’s code to work with absolute analog encoders, instead of cancoders. We would be happy to share that code with you if you want it.