Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Mecanum Encoders (http://www.chiefdelphi.com/forums/showthread.php?t=133445)

Alan Anderson 26-01-2015 09:40

Re: Mecanum Encoders
 
Quote:

Originally Posted by jman4747 (Post 1434037)
Where was this documented?

I found it in the TALON SRX Software Reference Manual, specifically the second paragraph of section 17.1. (Quadrature) Encoder Position.

Nunez4296 27-01-2015 11:18

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!

Ether 27-01-2015 11:37

Re: Mecanum Encoders
 
Quote:

Originally Posted by Nunez4296 on Jan24 (Post 1433436)
our largest problem right now is that the robot drifts when it drives forward and backwards, and strafes. The turning also seems to be terrible in the Holonomic Drive for Labview.

Quote:

Originally Posted by Nunez4296 on Jan27 (Post 1434637)
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.

For rookie teams who might be reading this thread, you can quickly resolve problems like the above by running the test described here, and posting your results for analysis.



Alan Anderson 27-01-2015 11:43

Re: Mecanum Encoders
 
Quote:

Originally Posted by Nunez4296 (Post 1434637)
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!

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.

Nunez4296 27-01-2015 11:45

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.

Ether 27-01-2015 12:39

Re: Mecanum Encoders
 
Quote:

Originally Posted by Nunez4296 (Post 1434659)
Sorry Ether, I forgot to record this but I will do it tonight.

If it's working fine you don't need to. It's part of a troubleshooting procedure which lets you quickly determine how to correct your code and/or wiring.



Alan Anderson 27-01-2015 13:21

Re: Mecanum Encoders
 
Quote:

Originally Posted by Nunez4296 (Post 1434659)
Alan, the problem is I don't understand how to incorporate the gyro back into the code after pulling the value out.

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.

Nunez4296 27-01-2015 15:27

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.

gpetilli 27-01-2015 15:51

Re: Mecanum Encoders
 
Quote:

Originally Posted by Nunez4296 (Post 1434800)
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.

One minor clarification. A gyro measures rotational velocity and the WPI API provides an integrated version, which is the change in angle from the initial starting orientation. Minor errors in velocity (gyro "drift") become big errors in angle. Usually not a big problem for 15 sec Autonomous, but many teams have added features to address this during Teleop.

Nunez4296 27-01-2015 16:19

Re: Mecanum Encoders
 
Quote:

Originally Posted by gpetilli (Post 1434813)
A gyro measures rotational velocity and the WPI API provides an integrated version, which is the change in angle from the initial starting orientation. Minor errors in velocity (gyro "drift") become big errors in angle... but many teams have added features to address this during Teleop.

So how do I account for this?

Ether 27-01-2015 16:29

Re: Mecanum Encoders
 
Quote:

Originally Posted by Nunez4296 (Post 1434824)
So how do I account for this?

http://www.chiefdelphi.com/forums/sh...60&postcount=2



Nunez4296 27-01-2015 17:11

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.


All times are GMT -5. The time now is 20:17.

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