Go to Post So every 3 years robots have to lift robots? There's yet another pattern to consider. :p - ruacubfan2 [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #181   Spotlight this post!  
Unread 01-14-2018, 10:06 AM
NewtonCrosby NewtonCrosby is offline
Registered User
FRC #1895 (LamdaCorps)
Team Role: Mentor
 
Join Date: Jan 2018
Rookie Year: 2012
Location: Virginia
Posts: 24
NewtonCrosby is an unknown quantity at this point
Re: JeVois Smart Machine Vision

My team this past weekend was experimenting with the Jevois, trying to follow the guide from:
https://www.chiefdelphi.com/media/papers/3408?

We kept running into two major errors, that are not quite intuitive to me.

1) They would get a pipeline in GRIP that worked well, with a high framerate. Generate the corresponding python, put it on the Jevois, and then when they'd run the pipeline on the Jevois it would output something like 1.5 FPS. Any good ideas on how to troubleshoot that?


2) We would get random Python import errors where the CV2 imports wouldn't actually work. I checked all the python source files I could find from the stock Jevois 1.6.3 image, and they all had the same imports our generated code had. Weird.

Any help here would be appreciated.
Reply With Quote
  #182   Spotlight this post!  
Unread 01-14-2018, 10:33 AM
NewtonCrosby NewtonCrosby is offline
Registered User
FRC #1895 (LamdaCorps)
Team Role: Mentor
 
Join Date: Jan 2018
Rookie Year: 2012
Location: Virginia
Posts: 24
NewtonCrosby is an unknown quantity at this point
Re: JeVois Smart Machine Vision

Quote:
Originally Posted by AllenGregoryIV View Post
I'd be interested in this as well. Tracking the
  • cubes
  • portals
  • exchange station

Would all possibly be very useful.
I was thinking this same thing this morning. It seems like we'd be able to use the ObjectDetect sample module as a basis for locating the PNG versions of the field elements, however I don't think I understand the architecture well enough to pipeline it.

The documentation in the module warns that the object detection code is slow, but there's nothing I can really find that talks about how to optimize. There's the NEON demo that shows certain things are 6 times faster on the NEON instructions vice the CPU, but I don't know if by default these samples are using NEON instructions or not when they get compiled.

I'm very new to image processing and the Jevois, so I feel like I'm swimming in mud, but this year's game is so software reliant (and in my opinion vision reliant) I feel like it's paramount to get it put in and well tested.
Reply With Quote
  #183   Spotlight this post!  
Unread 01-15-2018, 11:24 AM
laurentitti's Avatar
laurentitti laurentitti is offline
Registered User
no team
 
Join Date: Dec 2017
Location: Los Angeles
Posts: 12
laurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud of
Re: JeVois Smart Machine Vision

Quote:
Originally Posted by myedinak View Post
Earlier you had mentioned that we could utilize all four cores. How would one go about setting this up? If we had different detection methods running on each core, how could we quickly and easily switch between the detection method we currently want to be active. Basically, if we have different ways we want to use the vision (track items on the field to assist robot motion, target detection, identify the exchange port, etc) how would we switch between our desired target detection and have them essentially running in parallel and switch on the fly?
Multicore in C++ is very easy using std::async(), see, eg, the EdgeDetectionX4 module of jevois. Now python has a global interpreter lock which limits its multicore abilities it seems. The “threading” python module does not seem to achieve true concurrency, and the “multiprocessing” python module may work better. We have not used it yet but will try it and post an example if it works well and is easy to use.

In your case, however, to switch between several modes would not necessarily require that you always run all modes in parallel. Instead, you could have 3 different python functions, one for each mode. Then implement parseSerial() in your jevois python module and come up with custom command names to trigger each mode, eg, when user sends serial command “exchangeMode” you want to switch to tracking the exchange. As you receive these custom commands from your controller in parseSerial(), just remember which mode the user last selected using a class member variable. In your process() function you would then check that variable and call the appropriate processing function.
Reply With Quote
  #184   Spotlight this post!  
Unread 01-15-2018, 11:59 AM
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,604
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: JeVois Smart Machine Vision

Quote:
Originally Posted by myedinak View Post
Earlier you had mentioned that we could utilize all four cores. How would one go about setting this up? If we had different detection methods running on each core, how could we quickly and easily switch between the detection method we currently want to be active. Basically, if we have different ways we want to use the vision (track items on the field to assist robot motion, target detection, identify the exchange port, etc) how would we switch between our desired target detection and have them essentially running in parallel and switch on the fly?

Thanks
Laurentitti attempted to post this reply for your question, but for some odd reason it is not showing up. So, as a favor to the community, here is his suggestion.


Quote:
Originally Posted by laurentitti
Multicore in C++ is very easy using std::async(), see, eg, the EdgeDetectionX4 module of jevois. Now python has a global interpreter lock which limits its multicore abilities it seems. The “threading” python module does not seem to achieve true concurrency, and the “multiprocessing” python module may work better. We have not used it yet but will try it and post an example if it works wellsnd is easy to use.

In your case, however, to switch between several modes would not necessarily require that you always run all modes in parallel. Instead, you could have 3 different python functions, one for each mode. Then implement parseSerial() in your jevois python module and come up with custom command names to trigger each mode, eg, when user sends serial command “exchangeMode” you want to switch to tracking the exchange. As you receive these custom commands from your controller in parseSerial(), just remember which mode the user last selected using a class member variable. In your process() function you would then check that variable and call the appropriate processing function..
__________________
CalGames 2009 Autonomous Champion Award winner
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC).
Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
2017 Utah Regional Winner!, Sacramento Finalist, Newton/Carver Innovation in Control, Newton #5 Captain
Reply With Quote
  #185   Spotlight this post!  
Unread 01-24-2018, 03:42 PM
laurentitti's Avatar
laurentitti laurentitti is offline
Registered User
no team
 
Join Date: Dec 2017
Location: Los Angeles
Posts: 12
laurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud oflaurentitti has much to be proud of
Re: JeVois Smart Machine Vision

Quote:
Originally Posted by laurentitti View Post
the “multiprocessing” python module may work better.
Update: the multiprocessing python module works quite well, except that it messes up the JeVois core when it is loaded, so loading it is a terminal action (you will not be able to load another module later until you reboot jevois). We have an experimental python parallel module here: http://jevois.org/moddoc/PythonParallel/modinfo.html

It was released today as part of JeVois 1.7.1, consider it alpha code though, but may give you some ideas to try out.
Reply With Quote
  #186   Spotlight this post!  
Unread 01-24-2018, 04:59 PM
ngreen ngreen is offline
Registered User
AKA: Nelson Green
FRC #1108 (Panther Robotics)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Paola, KS
Posts: 921
ngreen has a brilliant futurengreen has a brilliant futurengreen has a brilliant futurengreen has a brilliant futurengreen has a brilliant futurengreen has a brilliant futurengreen has a brilliant futurengreen has a brilliant futurengreen has a brilliant futurengreen has a brilliant futurengreen has a brilliant future
Re: JeVois Smart Machine Vision

While I'm not so far along with my Jevois, I hope to have more time to explore it in the coming weeks. But I do appreciate all the work and continuing updates in this thread (and others).

Mostly because of my inexperience I haven't tried to decide on a killer game task to pursue. I think I will see what I can achieve and then work backwards from there, although some thoughts would be to be able to pickup a cube in autonomous and the possibility to detecting the exchange for automated delivery are both killer ideas.
Reply With Quote
  #187   Spotlight this post!  
Unread 01-27-2018, 09:24 AM
NewtonCrosby NewtonCrosby is offline
Registered User
FRC #1895 (LamdaCorps)
Team Role: Mentor
 
Join Date: Jan 2018
Rookie Year: 2012
Location: Virginia
Posts: 24
NewtonCrosby is an unknown quantity at this point
Re: JeVois Smart Machine Vision

Has anyone successfully gotten the camera to stream to the smartdashboard?

For some reason our dashboard isn't picking up the USB camera stream, and I can't really figure out why. Any other camera we use Lifecam, axis, etc is working just fine.

Jevois is functioning just fine as well outside of the smart dashboard. I'm sure we're missing something simple, but I'm not sure what.
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 10:16 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi