Go to Post By the way why do all american's spell Colour wrong?!?!?!?!?!?!?!? - akoscielski3 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-03-2010, 20:47
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Question Target tracking/centering converted to tank drive: help?

Since our robot is driven with tank drive, we had to convert NI's robot centering code from arcade drive to tank drive. It is not working right now, so we would appreciate if you could help us out...

The code uses the camera and gyro to center the robot with the camera, as you may know. But it sends out one value for the X axis of an arcade drive robot. So I took that value and made 2 out of it for each side of the drive. See my logic for negating one of them in the picture of my code.

Unfortunately this doesn't seem to work, as it turns in the wrong direction. When I negated the other side of the drive instead, it still turned in the wrong direction.

By the way, I multiplied the initial value by .5 because the robot was turning too fast, kept overshooting, and swaying side to side. But after this, it started acting weird.

Thanks for any of your help!
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW
Reply With Quote
  #2   Spotlight this post!  
Unread 04-03-2010, 21:23
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Target tracking/centering converted to tank drive: help?

You didn't actually have to convert the self-centering code to Tank Drive.

You can mix the two driving modes as long as you are using Tank Mode in every place you expect the drivers to have direct control of the drive motors.

If the robot is driving on it's own, e.g., self-centering or Autonomous, then you don't really care which method (Tank vs Arcade) is currently active.

In any case, to convert Arcade-style inputs to Tank-style...
Arcade is speed and rotation, so you want to convert the rotation to a differential between the two tank sides then apply speed, keeping everything in proportion.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 04-03-2010 at 21:30.
Reply With Quote
  #3   Spotlight this post!  
Unread 04-03-2010, 23:03
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Re: Target tracking/centering converted to tank drive: help?

I think I see where you're going with not having to convert, meaning that you just control the drive with the Arcade Drive VI when you are driving it autonomously. We would have to switch out some stuff in the code since we are controlling it manually with Motor Set Speed VIs (long story on why we wouldn't use the Tank Drive VI), but I don't think it would be that bad.

With actually converting it, there is no speed because the centering VI always sends out 0 for Y. So it's a simple matter of running the two sides of the drive train at the speed it sends out for X. You just have to negate one to run it backwards, which I reasoned to be the right side one. So why did it still not work?
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Team 39: Target AND Field Oriented Drive (Target tracking) TotalChaos Robot Showcase 13 02-03-2010 15:55
Need help with tank drive nickcvet89 NI LabVIEW 16 02-02-2010 16:35
Tank and Arcade Drive Help? baihooli3022 FRC Control System 2 25-01-2010 22:36
Tank Drive help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Idaman323 Programming 3 18-02-2005 15:17


All times are GMT -5. The time now is 11:00.

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