![]() |
void RobotDrive::SetLeftRightMotorSpeeds?
Hi all-
Our robot drive-train is consisting of a total of 6 motors, meaning 3 motors per side, meaning 3 jaguars per side. After looking through the RobotDrive class, I noticed there is not consturctor for a 6 wheel drive-train. So I made a constructor for 6 wheels, which I think should work... Code:
RobotDrive::RobotDrive(SpeedController *rearLeftMotor, SpeedController *middleLeftMotor,Here is that function Code:
void RobotDrive::SetLeftRightMotorSpeeds(float leftSpeed, float rightSpeed)Edit: Im thinking i can just say m_middleRight/LeftMotor -> Set...., but Im not sure. Thanks- 1771 |
Re: void RobotDrive::SetLeftRightMotorSpeeds?
The simple and obvious solution is to duplicate the lines that control the front motors and change them to control the middle motors.
(But I'm not as strong in C++ as I could be, so keep in mind this adage: For every complex problem, there is usually a solution that is simple, obvious...and wrong.) |
Re: void RobotDrive::SetLeftRightMotorSpeeds?
Yeah, that's why I'm hesitant to do that.
One of those reasons is that first If statement is corresponding to the set command directly below it, but the next Set command is not.... I figure I can just try it, with the motors not hooked up, and just check the Jags. |
Re: void RobotDrive::SetLeftRightMotorSpeeds?
but it is correct:
(change the 1 to -1 to invert the middle motors) Code:
void RobotDrive::SetLeftRightMotorSpeeds(float leftSpeed, float rightSpeed) |
Re: void RobotDrive::SetLeftRightMotorSpeeds?
I believe there is a reason that there is not a six wheel drive train option. To my knowledge, you are only allowed to use 5 CIMs. I would double check the rules on this before spending too much time programming it.
|
Re: void RobotDrive::SetLeftRightMotorSpeeds?
Quote:
|
| All times are GMT -5. The time now is 10:42 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi