Quote:
Originally Posted by johncap100
my understand is that we need to specify each motor/wheel assembly , ie all four individually as each wheel is connected indepedently to a single motor.
so then do we use the above statements for each motor/wheel assembly?
thanks
have you actually written some code just to move the bot with mechanum wheels?
|
You have 4 individual motors one for each wheel but you don't have to deal with them yourself, the WPI library will take care the rest for you. So when you instantiate the RobotDrive object, you will need to initialize it with four motors in its constructor. Once you define the RobotDrive object with four motors, you can make the MecanumDrive_Polar call to drive it around. The RobotDrive object will figure out the power and direction for each wheel for you.
Code:
Either:
RobotDrive(UINT32 frontLeftMotorChannel, UINT32 rearLeftMotorChannel,
UINT32 frontRightMotorChannel, UINT32 rearRightMotorChannel,
float sensitivity = 0.5);
Or:
RobotDrive(SpeedController *frontLeftMotor, SpeedController *rearLeftMotor,
SpeedController *frontRightMotor, SpeedController *rearRightMotor,
float sensitivity = 0.5);
And yes, we were using Mecanum wheels last year so we did write some code for them.