Go to Post When I see stuff like that, sometimes I say, "That's BRILLIANT, why didn't I think of that?" But I never like the answer. - dtengineering [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
  #1   Spotlight this post!  
Unread 03-13-2015, 06:12 PM
jfitz0807 jfitz0807 is offline
Registered User
FRC #2877 (Ligerbots)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Newton, MA
Posts: 65
jfitz0807 is an unknown quantity at this point
HELP! CommandGroup not working

We're at competition. We had a number of autonomous command groups coded, but we didn't get to test them on the competition bot until this morning. We're using the SmartDashboard chooser to select one for each match. At least, that was the plan.

It turns out that no matter what we try, even defining just a single commandGroup and not using the chooser, our robot runs through autonomousInit() and then goes into autonomousPeriodic(), but it never returns form the call to Scheduler::GetInstance()->Run(); We can't figure out what's going wrong. A printf right after the call never appears in the log, but the code is still running. The DriverStation still shows "Robot Code" green and we can still transition into and out of Teleop and even back into Auto. It's just that nothing happens on the robot. None of our Teleop commands from the joystick work and our camera feed doesn't work either.

If we change our autonomousCommand from a CommandGroup to a Command, it works.

Full disclosure: We used java last year and switched to C++ this year since we had more C++ mentors and our java programmers graduated last year. Since we didn't use C++ last year, we don't have a CommandBase class from which our Commands inherit. According to the documentation, this is not necessary this year.

I'm going to try to make a number of commands that explicitly chain other commands together by having one call the next it it's end() method as a workaround, but if anyone has any thoughts on how to make the CommandGroups work, that would be greatly appreciated.
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 09:23 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