|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#16
|
||||
|
||||
|
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. |
|
#17
|
|||||
|
|||||
|
Re: Limit speed of 4 chassis CIM motors
Quote:
|
|
#18
|
||||
|
||||
|
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 |
|
#19
|
||||
|
||||
|
Re: Limit speed of 4 chassis CIM motors
Quote:
|
|
#20
|
||||
|
||||
|
Re: Limit speed of 4 chassis CIM motors
You using Joysticks or gamepads for control?
|
|
#21
|
||||
|
||||
|
Re: Limit speed of 4 chassis CIM motors
The interface hardware doesn't get rid of the tall-tippy-robot issue; you can still inadvertently send the robot a command of "full speed ahead" whether you use a joystick, a gamepad, or a DDR dance mat.
![]() |
|
#22
|
||||
|
||||
|
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. Last edited by IronicDeadBird : 06-03-2015 at 14:39. |
|
#23
|
|||
|
|||
|
Thank you so much for the help guys, I just ended up doing this:
Code:
double rot = -stick.getX(); double speed = -stick.getY(); myRobot.arcadeDrive(rot*0.5, speed*0.5); |
|
#24
|
|||
|
|||
|
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))
{
myRobot.arcadeDrive(-stick.getX(),-stick.getY());
}
else
{
double rot = -stick.getX();
double speed = -stick.getY();
myRobot.arcadeDrive(rot*0.5, speed*0.5);
}
Just a suggestion. Of course, you may already have it that way in the rest of your code! |
|
#25
|
|||
|
|||
|
Re: Limit speed of 4 chassis CIM motors
Thanks for the idea, would the throttle work for that as well?
|
|
#26
|
|||
|
|||
|
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. |
|
#27
|
|||
|
|||
|
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.
|
|
#28
|
||||
|
||||
|
Re: Limit speed of 4 chassis CIM motors
Depending on your drive train characteristics, you may have trouble turning. This will be especially prevalent in tight spaces or next to a bump. It is just as bad (or worse, perception-wise) as flopping over on your face every match. Could you describe your drive train from a mechanical perspective?
|
|
#29
|
||||
|
||||
|
Re: Limit speed of 4 chassis CIM motors
Quote:
Code:
double rot = -stick.getX(); double speed = -stick.getRawAxis(drive axis); myRobot.arcadeDrive(rot, speed * Math.abs(speed)); |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|