View Single Post
  #8   Spotlight this post!  
Unread 14-01-2009, 07:59
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: Using LabView to make Robot track the trailer

Quote:
Originally Posted by rsisk View Post
Our image tracking algorithim gives us two outputs, how much the image is off of center and how much larger/smaller the image is.

For example

So when the image moves slightly to the right, we would send a +.2 to both motors to make it move slightly to the right.

If the image becomes smaller (moving slightly away) we would send a +.2 to one motor and a -.2 to another motor to move the robot towards the target.

My question, if the robot move slightly to the right and slightly further away in one motion, what signal would we send to the motors to move the robot both forward and to the right in one motion?

And, how do I calculate that mathematically.
The simple answer is "just add the two values together for each side".

In your example this will send .4 to one motor and 0 to the other, which will give to a rotation with forward motion.

You may need to clip the final sums to prevent them from exceeding 1.0, but it really is that easy.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote