|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Porportional rotation using gyro
Hello,
I haven't been here in a while, but searching the forums didn't turn up anything relating to this topic. My team has been tying to correct for problems in our drivetrain (caused by uneven weight distribution and improperly mounted wheels) in programming while the build team tries to fix issues with the mechanical part, and everything we've tried has been relatively unsuccessful. What we have in mind is a system that would force the robot to keep at it's current angle of rotation (using the gyro) if the operator isn't currently trying to turn the robot. We've tried to use bang-bang style control (we knew this was a bad idea from the start) and take back half (which seems better suited for other purposes), and have yet to try PID. We reset the gyro and attempt to initiate our closed-loop control system every time we stop deliberately rotating. Does anyone have any suggestions for a proper way to do this (other than fixing the weight distribution and whatnot)? Thanks! Last edited by mrklempae : 31-01-2014 at 19:23. |
|
#2
|
||||
|
||||
|
Re: Porportional rotation using gyro
The right way to do this is to fix the robot itself.
I would start by just trying proportional control. You don't actually need to use the PID controller class. If you're using java/c++ with arcade drive, I'd do something like this to travel in a straight line. drive.arcadeDrive(stick.getY(), kP*gyro.get()). Make sure to have your code zero the gyro so that when the robot is on target, gyro.get() returns 0. |
|
#3
|
|||
|
|||
|
Re: Porportional rotation using gyro
For some reason I edited out a few important details... It has a robot-centric mecanum drive train, which from what I hear, will probably never strafe perfectly straight without gyro intervention. We spent about an hour working on it today and (for the moment) are using a series basic statements to determine the rotation speed (which overshoots and is a bit jittery).
Last edited by mrklempae : 01-02-2014 at 10:07. |
|
#4
|
||||
|
||||
|
Re: Porportional rotation using gyro
Quote:
In my experience, we have had many a prototype drivetrain put together by newbies without any care given to weight distribution and very little care to how perfect a rectangle the frame is. It was just a visually all 4 wheels are on the ground, check. There was a good amount of care given to how well the rollers can spin when they were assembled and this is verified periodically. We've never tried to quantify the amount of deviation from expected travel, but I've never seen a robot deviate so much that we HAD to implement gyro control. We just did so to open the possibility for better driver control. I believe 2 years ago we didn't use a gyro during the competition at all... so, check your rollers spin nice and smooth, and for big obvious mechanical problems (the wheel mounting? you mentioned, 1 gearbox assembled incorrectly, etc...), but if you are just trying to get a prototype drivetrain moving, you shouldn't need to spend a lot of time on weight distribution. You might post some video in the mechanical section and get some feedback from folks on that side. As far as the gyro implementation goes, have you tried this? |
|
#5
|
||||
|
||||
|
Re: Porportional rotation using gyro
Quote:
For skid-steer vehicles, here's another way to use a gyro. Last edited by Ether : 31-01-2014 at 23:00. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|