Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Setting Max Speed? (http://www.chiefdelphi.com/forums/showthread.php?t=86072)

Straberrie 11-06-2010 15:04

Setting Max Speed?
 
Hey!

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

Quote:


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:

Quote:

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

Re: Setting Max Speed?
 
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

Re: Setting Max Speed?
 
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

Re: Setting Max Speed?
 
Quote:

Originally Posted by JamesCH95 (Post 966292)
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

Re: Setting Max Speed?
 
Good deal :)

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

theprgramerdude 11-06-2010 17:48

Re: Setting Max Speed?
 
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.


All times are GMT -5. The time now is 03:38.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi