![]() |
Limit speed of 4 chassis CIM motors
Hi there,
I'm from team 4939 and for this year's competition, our robot turned out quite tall. So in order to decrease tipping of the robot, I was wondering if it was possible to limit the speed of the 4 chassis CIM motors. Thank you, Uday Sharma |
Re: Limit speed of 4 chassis CIM motors
You could certainly do this in software by setting a multiplier for the speed to 0.5 or something like that. I do not know of any electrical way to achieve the same result.
|
Re: Limit speed of 4 chassis CIM motors
What language?
|
Re: Limit speed of 4 chassis CIM motors
You have a few ways to do this:
One way would to just multiply your inputs from the joystick by a constant, less than 1, and pass that value to your motor.Set() function. Another way, would be to limit the actual speed of your robot. For this to work, you would need encoders on each side of the robot, to monitor your speed. Then you have an if statement, comparing the current speed of your robot, to a predefined "maximum" speed. If you are approaching your maximum speed, lower the output of the motors by a certain amount. I would suggest, for either solution, you have a toggle to turn it on and off. Maybe you will want to go full speed for some reason? Who knows. |
Re: Limit speed of 4 chassis CIM motors
Quote:
|
Re: Limit speed of 4 chassis CIM motors
http://thinktank.wpi.edu/article/140
If you are underweight, you can also lower the center of gravity by adding ballast low in the robot. |
Re: Limit speed of 4 chassis CIM motors
we are using java and we are underweight but by about 2 pounds
|
Re: Limit speed of 4 chassis CIM motors
http://www.chiefdelphi.com/media/papers/2211 could be translated to Java fairly straightforwardly.
|
Re: Limit speed of 4 chassis CIM motors
What motor controllers are you using for your drivetrain motors? CAN or PWM? |
Re: Limit speed of 4 chassis CIM motors
Quote:
http://www.chiefdelphi.com/forums/sh...22&postcount=2 |
Re: Limit speed of 4 chassis CIM motors
Quote:
Quote:
Quote:
On the other, hand, limiting the maximum value you send to the motors will reduce acceleration by itself. You can improve stability a bit more by combining this with a throttle change limiter - and that's rather easier. All you have to do is to determine what the maximum acceptable change in the throttle is for each poll of the joysticks and update of the motors. In java it would look like: Code:
//in initializer |
Re: Limit speed of 4 chassis CIM motors
Quote:
Code:
double time = GetTime();The "shift" object was a solenoid, that shifted the pnuematic shifter in the gearbox. While there probably isn't a library to do that, writing the code for it shouldn't be too difficult. (You could probably just modify that to do what you need it to...) |
Re: Limit speed of 4 chassis CIM motors
I'm driving this year and so we made a button that while held places the max output of all drive motors at 25% you could do something similar and keep you ability to use all power and the ability to go slow at the same time... The other thought I would have is possibly removing a 2 cims from your drivetrain If you are running 4 already. We dropped from 4 to 2 and still have more than enough speed. We also have a build up in acceleration and deceleration too.
|
Re: Limit speed of 4 chassis CIM motors
Oh, duh!
If you really want to limit acceleration, you can use the accelerometers built into the RoboRIO; just select the one oriented along the axis that you're driving, or a vector sum of them that points you that way. For example, if your RIO is laid out on a board 30 degrees from horizontal, with the USB end towards the front and elevated, your acceleration in the drive direction would be Code:
driveAccel = accelYaxis.getAcceleration() * .866 + accelZaxis.getAcceleration() * 0.5; |
Re: Limit speed of 4 chassis CIM motors
Also, what might help is limiting deceleration. I would make sure my motor controllers are set to coast and not brake, this way you don't decelerate as rapidly so that you have less tipping issues when stopping.
|
Re: Limit speed of 4 chassis CIM motors
Quote:
Personally I would remove a motor per side if it can be done w/o major disassembly. |
Re: Limit speed of 4 chassis CIM motors
Quote:
Quote:
|
Re: Limit speed of 4 chassis CIM motors
Quote:
If you have wheel encoders and you want to create smooth accel/decel-controlled pre-planned motion in auto, you might try something like this: http://www.chiefdelphi.com/media/papers/download/4312 |
Re: Limit speed of 4 chassis CIM motors
Quote:
|
Re: Limit speed of 4 chassis CIM motors
You using Joysticks or gamepads for control?
|
Re: Limit speed of 4 chassis CIM motors
Quote:
![]() |
Re: Limit speed of 4 chassis CIM motors
Quote:
Going to have to disagree in regards to gamepads or typical console controllers you can gain more control over movement (provided they are bound to the thumb sticks) by increasing the height of the thumbstick you need to accidentally make much larger movements. If you are using a joystick your out of luck though. |
Re: Limit speed of 4 chassis CIM motors
Thank you so much for the help guys, I just ended up doing this:
Code:
double rot = -stick.getX(); |
Re: Limit speed of 4 chassis CIM motors
Quote:
I would suggest you throw that in a if-else statement though, making the half-speed your default speed: Code:
if(stick.getRawButton(1))Just a suggestion. Of course, you may already have it that way in the rest of your code! |
Re: Limit speed of 4 chassis CIM motors
Thanks for the idea, would the throttle work for that as well?
|
Re: Limit speed of 4 chassis CIM motors
Quote:
I'm on my phone so I can't format this correctly and can only give some pseudo code. If(stick.getThrottle () > 0) myRobot.Drive (halfSpeedValues); else if(stick.getThrottle <= 0) myRobot.Drive (fullSpeedValues); Remember the throttle on the joystick ranges from -1 to 1, so 0 will be in the middle. |
Re: Limit speed of 4 chassis CIM motors
Just remember, by implementing that throttle (we refer to it as a software shift), you lose both speed and torque. This shouldn't be an issue driving around on an open field, but things like noodles or carrying large stacks while driving with the throtte enabled could cause very poor drive performance.
|
Re: Limit speed of 4 chassis CIM motors
Quote:
|
Re: Limit speed of 4 chassis CIM motors
Quote:
Code:
double rot = -stick.getX(); |
| All times are GMT -5. The time now is 09:56. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi