Go to Post Anything that promotes science and technology is okay in my book. - Dan Richardson [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 10-17-2013, 07:38 PM
Darkseer54's Avatar
Darkseer54 Darkseer54 is offline
Controls Captain and Driver
AKA: Zach Kaplan
FRC #1086 (Blue Cheese)
Team Role: Programmer
 
Join Date: Nov 2012
Rookie Year: 2013
Location: Richmond, VA
Posts: 132
Darkseer54 is a glorious beacon of lightDarkseer54 is a glorious beacon of lightDarkseer54 is a glorious beacon of lightDarkseer54 is a glorious beacon of lightDarkseer54 is a glorious beacon of lightDarkseer54 is a glorious beacon of light
How do I use Robotdrive.h?

Salutations from Team 1086! I am a new programmer and I am trying to set up Cartesian Mecanum code for our robot. I am trying to set up halo drive. In other words, I want to have one joystick control the forward/backward movement and strafing, while another joystick controls rotation. My question is, how can I use the WPI Library's Robotdrive.h? What can I use from this?
Thanks!
Zach
1086 Blue Cheese
Reply With Quote
  #2   Spotlight this post!  
Unread 10-17-2013, 09:18 PM
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: How do I use Robotdrive.h?

Let's say you have the leftDriveStick and the rightDriveStick. The right stick X and Y will be the forward/backward and strafe. The left stick X will be the rotate.
Code:
Joystick leftStick;
Joystick rightStick;
RobotDrive robotDrive;
 
float x = DEAD_BAND(rightStick.GetX());
float y = DEAD_BAND(rightStick.GetY());
float rot = DEAD_BAND(leftStick.GetX());
 
robotDrive.MecanumDrive_Cartesian(x, y, rot);
__________________

Last edited by mikets : 10-17-2013 at 09:21 PM.
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


All times are GMT -5. The time now is 09:54 AM.

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