My team is having trouble getting our mecanum drive system to function in auton. We’ve got it to function just fine in teleop, but everything we’ve tried for auton hasn’t worked. We are coding our bot in Java. We aren’t quite sure what coding phrase we should use to get the motors to run. Any help would be greatly appreciated!
If you could post a Github link to what you have other could take a look at what you’ve tried in order to give next steps.
Also, a similar topic which may help:
I am not a programmer but we have used two of these modules in the past when we made a Mecanum drive. Think about these modules like a computer mouse, they do not move the bot at all, the ground moves the wheels and then the encoder can send it’s data back to the Rio for autonomous.
Something like this can be spring loaded with a rubber band or surgical tubing to make good contact with the ground. One is placed on the X axis of your robot and the other on the Y axis. This will give you reliable data and eliminate most, if not all, of the slippage that Mecanum wheels might encounter.
Hopefully you are building on the command framework.
You have 2 basic options:
1 - The easiest thing to do is to create a command that simulates the joystick input by calling the same function that the joystick does. You can use the .withTimeout to have it send this input for a specific amount of time. You can chain a series of this type of movement together. This is a simple “down and dirty” way to get your robot off the “tarmac.”
2 - alternatively, the more robust way to do this it to use path planning and trajectories. Trajectory Tutorial Overview — FIRST Robotics Competition documentation
Hopefully this gets you started!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.