Go to Post If your goal is to win matches... Pick the most capable candidate. If your goal is to change lives... Sometimes you pick those that need the most change. - IKE [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 03-12-2014, 13:39
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is online now
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,722
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Running two commands at once, but both commands use the same motors.

Quote:
Originally Posted by jreneew2 View Post
We are doing a field oriented drive system on our robot this year and have been coding the IMU and other commands for field oriented driving. One of these commands is a RotateToAngle command. When you press a button on the controller it will rotate back to zero (or whatever you pass into it). This works fine when in a separate command, but when you run the command, you can't drive normally while it is rotating.

My question is: Is there a way you can run both commands in parallel but able to drive forward and rotate to zero at the same time. Would a command group work? Would I have to implement the rotate to angle command into the driveCommand file?

Thanks,
Team 2053
I'm not sure this is doable in two commands because both commands need to be controlling the same type of behavior. I think you'll need to combine these behaviors into one command and run it when the button is pressed.

You might be able to store the last sets of drive values in the subsystem and control the separate parts with the two different commands, but I think you're better off combining them.
Reply With Quote
 


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 14:06.

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