View Single Post
  #13   Spotlight this post!  
Unread 01-27-2015, 09:25 AM
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
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,712
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: Command Based Programming (Threads?)

Quote:
Originally Posted by nathanzentner08 View Post
Our thought was to have an image processing Command, that would have taken a bit more time and processing power, that ran in a parallel Command Group, but since it isn't really parallel, then the main thread would be stuck in the Image Processing command until it returned.

This non-threaded functionality could affect our driving (Essentially Everything) because if the thread is working on image processing then it is not available to change speed on our motors. (This is just a simple example.)

Im coaching the team and talking about parallel processing and trying to show an example based on the API that is given. The more I work with it, the more I find it isn't really there.

It's alright that it is not in there, but the documentation says:

"... instead of waiting for the child to finish, a CommandGroup will have it run at the same time as the subsequent Commands. ..."
It will run it similar to how commands for different subsystems would run at the "same time". If you execute method takes a long time to execute it will slow everything else down.

Last night we created a separate thread that will run our vision processing so it doesn't slow down the processing of commands. I can assist you with this if you'd like.
Reply With Quote