Go to Post First is more than a competition it is a family. - amos229 [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-01-2008, 13:50
wkethman wkethman is offline
Team 118 Former Member
AKA: William Kethman
None #0118 (Robonauts)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2004
Location: New Orleans
Posts: 13
wkethman is on a distinguished road
Send a message via AIM to wkethman
Gyro Heading Correction in Operator Mode

If you set up 4 wheel tank drive in Operator Mode as shown:

void OperatorControl(void)
{

Arcade4(PORT_1, X_AXIS, PORT_1, Y_AXIS, 0, 2, 1, 3, 0, 0, 0, 0);
}

Is there (1) anymore that you have to do if you are just trying to simply drive the robot with one joystick as defined?,(2) can you embed the gyro heading correction?, (3) and is there more information or guidance that you can give for pneumatic control. Thank you
  #2   Spotlight this post!  
Unread 26-01-2008, 15:25
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Gyro Heading Correction in Operator Mode

Quote:
Originally Posted by wkethman View Post
If you set up 4 wheel tank drive in Operator Mode as shown:

void OperatorControl(void)
{

Arcade4(PORT_1, X_AXIS, PORT_1, Y_AXIS, 0, 2, 1, 3, 0, 0, 0, 0);
}

Is there (1) anymore that you have to do if you are just trying to simply drive the robot with one joystick as defined?,(2) can you embed the gyro heading correction?, (3) and is there more information or guidance that you can give for pneumatic control. Thank you
That's close to it. Each time Arcard4 (or any of those functions) is called it gets one set of joystick data and passes it to the motors. So you need to put your code into a loop to repeatedly read the joysticks and set the motors.

Code:
void OperatorControl(void)
{
     while (1)
     {
           Arcade4(...);
           // put other motor/OI control code here
     }
}
On the gyro subject, it depends on exactly what you want the robot to do. This code is driving based on the joystick. What sort of heading correction did you have in mind?

And last, pneumatics is actually control is not too bad. Look at the InitPressureSwitch function. It will automatically turn the compressor on and off based on the currrent pressure value from the pressure sensor.

For operating solonoids, look at the SetRelay function.

These are all described in the documentation on the web site.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Closed Thread


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
Ever use a helicopter heading hold gyro before? seanwitte Electrical 7 16-01-2008 12:59
Gyro Heading always zero, yet operating? marccenter Programming 3 16-01-2008 10:54
Reading gyro before Autonomous mode Doug Leppard Programming 9 06-01-2008 21:02
Keeping a certain heading using a gyro DanDon Programming 12 08-03-2006 14:27
how can you use a gyro in autonomous mode magical hands Programming 3 02-01-2004 13:31


All times are GMT -5. The time now is 23:49.

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