Go to Post Engineering rules of thumb don't form the garbage that goes into the making of the robot. They take the garbage of the real world and turn it into more pure, if slightly diluted, data. - DampRobot [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 12-02-2013, 21:21
eat4fun's Avatar
eat4fun eat4fun is offline
sudoer
AKA: Eric Bryce
FRC #1325 (Inverse Paradox)
Team Role: Leadership
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Mississauga, Canada
Posts: 9
eat4fun is an unknown quantity at this point
Getting final vector from left & right drive encoders

Hey all,

I’ve been racking my brain trying to solve this problem, and despite not being able to find anything with some light searching, I suspect others may have attempted the same things, so I’m looking for input.

This is the first year our team has used encoders at all; nevertheless, I have been successful in wiring them up, and getting the distance traveled in metres. So on the technical side, everything is a-okay.

I have the distanced traveled on the left and right sides for each time the code loops. What I want to do with this is somehow add the vectors so I get the change in robot heading and displacement since the loop last ran. I would then want to add each of the vectors together to get a final displacement/heading of the robot, relative to the start position. With this I want to figure out where on the field the robot is.

From there I would, presumably, set waypoints for the robot to move towards sequentially.

So let’s say the left side has moved 4 arbitrary distance units, and the right side has moved 5 arbitrary distance units. I want to know the direction/heading that the robot has moved along, and the distance that the robot has traveled in that direction. I would then add them (using vector addition, I presume) to know the approximate location of the robot on the field.

I hope I’m explaining myself clearly. Also, we use LabVIEW in production, but I can interpret C++ and JAVA (and pseudocode, of course) so really the question is platform-independent. If it's any help, the 'bot is 6-wheel with a drop-centre off six CIM motors, all controlled by Victor 888s & an FRC cRIO-II.

Thanks,
Eric Bryce

Last edited by eat4fun : 12-02-2013 at 21:24. Reason: Added information
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:57.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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