Log in

View Full Version : Setting Max Speed?


Straberrie
11-06-2010, 15:04
Hey!

My team is using a four-wheeled holonomic drive. We are using four Victors.



RobotDrive myRobot;
Victor VictorFrontLeft;
Victor Victor RearLeft;
Victor VictorFrontRight;
Victor VictorRearRight;
Joystick Joystick;

.....
......

myRobot(4,1,3,2);
Joystick(3);
VictorFrontLeft (4),
VictorRearLeft (1),
VictorFrontRight(3),
VictorRearRIght (2)
......

......

In Operated Control:

myRobot.HolonomicDrive( Joystick.GetMagnitude (), JoyStick.GetDirectionDegrees (), JoyStick.GetTwist());

.....



The drive itself works. I attempted using:


myRobot.SetLeftRightMotorSpeeds (0.1, 0.1);


to set max speed that Victors can operate the motors at so that the drive would be more controllable, but it didn't work.

How would I set max speed of a Victor?

Thank you very much!

JamesCH95
11-06-2010, 15:38
Gear down your motors more, clearly this is a mechanical problem :yikes: from a competition standpoint it would be better to utilize the higher pushing force and acceleration that are gained by gearing the motors to a higher reduction.

Alternatively you could try scaling the output to each victor by a constant, like 0.8, and/or add an if statement that caps the maximum speed sent to each victor.

Dkt01
11-06-2010, 15:51
Your code may be working fine. I know that we tried something similar in LabVIEW with Jaguars. Our only problem was that the wheels (attached to CIMs) wouldn't turn at any noticeable speed until we set the speed to at least .2. Try increasing your maximum speed by increments of .05, it worked for us.

Straberrie
11-06-2010, 16:00
Gear down your motors more, clearly this is a mechanical problem :yikes: from a competition standpoint it would be better to utilize the higher pushing force and acceleration that are gained by gearing the motors to a higher reduction.

Alternatively you could try scaling the output to each victor by a constant, like 0.8, and/or add an if statement that caps the maximum speed sent to each victor.

Thank you! lol I cant believe it was this simple >< I feel a lil stupid lol
We just did it and it workedddd! Thanks againn

JamesCH95
11-06-2010, 16:27
Good deal :)

Don't worry, my team's programmers get lost on the simple things too ;)

theprgramerdude
11-06-2010, 17:48
Not to point out the obvious, but if you actually tried setting the max victor speed to .1, this would be 10%. This is wayyyyyyy too little power to do anything. .5-.6 would be a far more reasonable limit to start with, especially for a holonomic drive with potentially quite a bit of resistance.