|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#16
|
|||||
|
|||||
|
Re: Mecanum Encoders
I found it in the TALON SRX Software Reference Manual, specifically the second paragraph of section 17.1. (Quadrature) Encoder Position.
|
|
#17
|
||||
|
||||
|
Re: Mecanum Encoders
Just as an update, I checked all wheel positions and they are mounted in the proper orientation where the rollers make an "X" towards the center. I also figured out what was wrong with the strafing/rotating. All I had to do was invert 2 motors, both of the left side mecanum wheels and the robot now can strafe, drive foward/backwards and rotate with ease. previously we could only Go forward and backward and rotate or go forward and backward and strafe. This brings up the old problem however...
Upon strafing at higher speeds, the robot spins out since the wheels don't turn at a constant speed. I have everything programmed in, the encoders, accelerometer, and gyro, I just need to know how to implement them into the code. Thanks! |
|
#18
|
||||
|
||||
|
Re: Mecanum Encoders
Quote:
Quote:
|
|
#19
|
|||||
|
|||||
|
Re: Mecanum Encoders
If the problem is mostly with the robot turning when you don't want it to, use the gyro to determine how far you're off heading and derive a "turn" correction to feed into the rotation input of the Mecanum Drive function.
|
|
#20
|
||||
|
||||
|
Re: Mecanum Encoders
Sorry Ether, I forgot to record this but I will do it tonight.
Alan, the problem is I don't understand how to incorporate the gyro back into the code after pulling the value out. |
|
#21
|
||||
|
||||
|
Re: Mecanum Encoders
Quote:
|
|
#22
|
|||||
|
|||||
|
Re: Mecanum Encoders
The value you get out of the Gyro Get represents the direction the robot is currently facing. Can you describe for me, in specific terms, how you think a skilled driver could use that information to keep the robot facing in a particular direction while it was erratically trying to turn on its own? If you can give enough detail about what you want the robot code to do, I can tell you how to wire functions together to do it.
|
|
#23
|
||||
|
||||
|
Re: Mecanum Encoders
The way I envisioned it, and correct me if I'm wrong, is that the gyro will capture the value of the angle that it is currently facing. This would work for any direction so that when you strafe, rather than having part of the robot swing out, the gyro will force the robot to maintain this header.
|
|
#24
|
|||
|
|||
|
Re: Mecanum Encoders
Quote:
|
|
#25
|
||||
|
||||
|
Re: Mecanum Encoders
Quote:
|
|
#26
|
||||
|
||||
|
Re: Mecanum Encoders
|
|
#27
|
||||
|
||||
|
Re: Mecanum Encoders
Thanks so much Ether, after I post this I'm going to look into a "Zero Velocity Reset" and the Kalman Filter to see if these can help me accomplish my goals.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|