Go to Post robots like to give you troubles... its like they have a mind of their own. - hayleybayley217 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 02-01-2015, 23:44
Caboose's Avatar
Caboose Caboose is offline
Programmer - LabVIEW, C++, C#, Java
AKA: James Parks
FRC #0900 (Zebracorns)
Team Role: Alumni
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Seattle, WA
Posts: 72
Caboose has a spectacular aura aboutCaboose has a spectacular aura about
Talking Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Hi Everybody!

The student programmers here at Team 900 have done a wonderful job of getting a nVIDIA Jetson TK1 to process images from an HD(Logitech C920) USB camera, detect our Frisbee targets, and send the information to the roboRIO to act on. The code is a tad bit messy in a "few" places, and we could probably speed up the processing, but hey, it works.

We have the Jetson TK1 powered through the VRM(Voltage Regulator Module) on the 12v@2A bus.

nVIDIA Jetson TK1 Code: https://github.com/FRC900/OpenCV-Tes...risbeelocating
roboRIO BETA Code: https://github.com/FRC900/2015Beta

__________________
navX Labview Library

"Robots are aluminum shavings, held together by zip-ties."

myManga

Last edited by Caboose : 02-01-2015 at 23:55. Reason: More information
  #2   Spotlight this post!  
Unread 17-02-2015, 17:06
memyselfandi memyselfandi is offline
Registered User
FRC #3826
 
Join Date: Feb 2015
Location: United States
Posts: 2
memyselfandi is an unknown quantity at this point
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Team 3826 is trying to use the Jetson. We pulled the source code from the link "nVIDIA Jetson TK1 Code:". We've tried to compile it and are getting the following errors:

$ make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mgb/900_opencv/frisbeelocating
Scanning dependencies of target testing
[ 50%] Building CXX object CMakeFiles/testing.dir/gpuTesting.cpp.o
c++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
c++: error: unrecognized command line option ‘-mfpu=neon-vfpv4’
c++: error: unrecognized command line option ‘-mvectorize-with-neon-quad’
make[2]: *** [CMakeFiles/testing.dir/gpuTesting.cpp.o] Error 1
make[1]: *** [CMakeFiles/testing.dir/all] Error 2
make: *** [all] Error 2
[1]- Done emacs Makefile.cmake (wd: ~/900_opencv/frisbeelocating/CMakeFiles)
(wd now: ~/900_opencv/frisbeelocating)
[2]+ Done emacs CMakeCache.txt


I've found the -mcpu can be changed to -mtune using the same parameter to remove the -mcpu error, however, we don't see a work around for the other two errors.

We're compiling on ubuntu on a VirtualBox VM running on Win7 with the Jetson TK1 installed. Have this been seen before? Any suggestions?

Thank you.
  #3   Spotlight this post!  
Unread 18-02-2015, 07:41
KJaget's Avatar
KJaget KJaget is offline
Zebravision Labs
FRC #0900
Team Role: Mentor
 
Join Date: Dec 2014
Rookie Year: 2015
Location: Cary, NC
Posts: 41
KJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud of
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Quote:
Originally Posted by memyselfandi View Post
Team 3826 is trying to use the Jetson. We pulled the source code from the link "nVIDIA Jetson TK1 Code:". We've tried to compile it and are getting the following errors:

$ make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mgb/900_opencv/frisbeelocating
Scanning dependencies of target testing
[ 50%] Building CXX object CMakeFiles/testing.dir/gpuTesting.cpp.o
c++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
c++: error: unrecognized command line option ‘-mfpu=neon-vfpv4’
c++: error: unrecognized command line option ‘-mvectorize-with-neon-quad’
make[2]: *** [CMakeFiles/testing.dir/gpuTesting.cpp.o] Error 1
make[1]: *** [CMakeFiles/testing.dir/all] Error 2
make: *** [all] Error 2
[1]- Done emacs Makefile.cmake (wd: ~/900_opencv/frisbeelocating/CMakeFiles)
(wd now: ~/900_opencv/frisbeelocating)
[2]+ Done emacs CMakeCache.txt


I've found the -mcpu can be changed to -mtune using the same parameter to remove the -mcpu error, however, we don't see a work around for the other two errors.

We're compiling on ubuntu on a VirtualBox VM running on Win7 with the Jetson TK1 installed. Have this been seen before? Any suggestions?

Thank you.
Looks like you're compiling for x86 rather than ARM. Remove those two ARM-specific options and the code should build correctly. Or alternatively, you could push the code to a Jetson board and build there and things should just work.

If you're trying to cross-compile (build ARM binaries on an x86 Linux host machine) you'll need to point to the correct compiler. The compiler name is usually of the form "arm-none-linux-gnueabihf-g++" or the like. Sometimes "none" is called "unknown" instead, but the general idea is the same.

If you are planning to run on x86, be aware that the code is written to run on the GPU. If I remember there are fallbacks to run on the CPU, but the CPU code wasn't the focus of our development effort so it may be different than the GPU code.
  #4   Spotlight this post!  
Unread 20-02-2015, 15:52
memyselfandi memyselfandi is offline
Registered User
FRC #3826
 
Join Date: Feb 2015
Location: United States
Posts: 2
memyselfandi is an unknown quantity at this point
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Thank you for your response and help.

We are compiling for the Jetson, but building on a Ubuntu system. We did take you suggestion and point to the correct compiler, we are not compiling. We are now working through some what I think are link problems and pointing to x86-65 linux libraries instead of ARM libraries.

Thank you again for your help.
  #5   Spotlight this post!  
Unread 20-02-2015, 19:48
weaversam8 weaversam8 is offline
Team Captain
AKA: Sam Weaver
FRC #4534 (Wired Wizards)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Wilmington, North Carolina
Posts: 137
weaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to behold
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

We used a Jetson this year, and compiling OpenCV on the Jetson took about 40 minutes utilizing all 4 CUDA cores. I wouldn't worry too much if you have to do it on the board.
__________________
ORB Haow!

  #6   Spotlight this post!  
Unread 20-02-2015, 20:28
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Quote:
Originally Posted by weaversam8 View Post
We used a Jetson this year, and compiling OpenCV on the Jetson took about 40 minutes utilizing all 4 CUDA cores. I wouldn't worry too much if you have to do it on the board.
40 minutes is insane. Our ODROID X2 is able to compile the latest OpenCV with a gazillion features in about 10-20 minutes. How many jobs are you using? I'd suggest you use at least -j 6 or maybe -j 8 when compiling on the jetson. It's got plenty of power for that!
  #7   Spotlight this post!  
Unread 24-02-2015, 01:08
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 185
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Quote:
Originally Posted by Caboose View Post
We have the Jetson TK1 powered through the VRM(Voltage Regulator Module) on the 12v@2A bus.
How is that working out? The sticker on our Jetson suggests that we need a 4.8A power supply (which seems extremely high for a mobile chip). Have you had any slow-downs or drop-outs from consuming too much power?
  #8   Spotlight this post!  
Unread 24-02-2015, 14:23
sparkytwd's Avatar
sparkytwd sparkytwd is offline
Registered User
FRC #3574
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Seattle
Posts: 96
sparkytwd will become famous soon enough
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Quote:
Originally Posted by Levansic View Post
How is that working out? The sticker on our Jetson suggests that we need a 4.8A power supply (which seems extremely high for a mobile chip). Have you had any slow-downs or drop-outs from consuming too much power?
I can't find the thread, but I believe I've seen someone from NVIDIA mention that 4.8A was way overkill, and they would be refining the requirements later. On my bench setup, I haven't seen the Jetson draw more than 1.5 amps at 12V, and this was during testing of low voltage conditions on the regulator.

The kind folks at elinux.org have benchmarked power consumption for various tasks, looks like nothing draws more than 12 watts of power: http://elinux.org/Jetson/Computer_Vi...r_vision_tasks

If you have additional peripherals, that may raise your power budget, but I'm comfortable running it off of the 12V regulated supply.
  #9   Spotlight this post!  
Unread 02-04-2015, 08:42
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,263
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Thought I would take a moment to update this thread with some sample video from Palmetto this year:

https://www.youtube.com/watch?v=w1ZSzxw84So

We're tracking the recycle bins. I can't talk a lot about the technical nitty gritty but I can tell you that it is using OpenCV and it is running on the GPU of the Jetson. There are another couple of folks who can shed more light on the technical details if you are interested.
  #10   Spotlight this post!  
Unread 02-04-2015, 14:04
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

How many of the cuda cores are you using? What's the average fps?
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
  #11   Spotlight this post!  
Unread 02-04-2015, 15:14
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,263
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Quote:
Originally Posted by faust1706 View Post
How many of the cuda cores are you using? What's the average fps?
All of them as far as I know. The FPS is in the video but somewhere between 5 and 10 from what I know about it. Hoping to double that with some upgrades after the season is through and we can put more effort into this.
  #12   Spotlight this post!  
Unread 02-04-2015, 15:37
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

I'd be more than happy to help you optimize the code, as 1706 is going to be getting a jetson board to experiment with.

You must be running some very inefficient code if you're only getting 5-10 fps with gpu accelerated opencv (http://opencv.org/platforms/cuda.html)....We are using a depth camera and are getting 26 fps on the odroid XU, which has the same amount of ram and an older arm based cpu and cannot be gpu accelerated.

Anyways, the video you posted is really cool and seems to work very well. Good job on whoever wrote that. I'm sure many teams would eat up a whitepaper about it.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."

Last edited by faust1706 : 02-04-2015 at 19:17.
  #13   Spotlight this post!  
Unread 03-04-2015, 10:27
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,263
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Quote:
Originally Posted by faust1706 View Post
I'd be more than happy to help you optimize the code, as 1706 is going to be getting a jetson board to experiment with.

You must be running some very inefficient code if you're only getting 5-10 fps with gpu accelerated opencv (http://opencv.org/platforms/cuda.html)....We are using a depth camera and are getting 26 fps on the odroid XU, which has the same amount of ram and an older arm based cpu and cannot be gpu accelerated.

Anyways, the video you posted is really cool and seems to work very well. Good job on whoever wrote that. I'm sure many teams would eat up a whitepaper about it.
Awesome sauce! One of the students has volunteered to work on a white paper but I'm not sure how far along he is on that. I believe he is working on it though. I'll be pestering him about it over the next few months.

I can't speak to the efficiency of the code but it was written largely by students and it is doing what we were aiming for. I suspect there are a lot of improvements we can make but I know the resolution has a lot to do with the lower frame rates. We'll keep perfecting it though and it will get published publicly at some point... likely alongside the white paper.
  #14   Spotlight this post!  
Unread 08-04-2015, 16:21
weaversam8 weaversam8 is offline
Team Captain
AKA: Sam Weaver
FRC #4534 (Wired Wizards)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Wilmington, North Carolina
Posts: 137
weaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to behold
Team 4534 used the same system this year, it might be worth building a library for the Rio. Let us know if you have any questions or want to compare how our systems worked.
__________________
ORB Haow!

  #15   Spotlight this post!  
Unread 28-04-2015, 15:13
Caboose's Avatar
Caboose Caboose is offline
Programmer - LabVIEW, C++, C#, Java
AKA: James Parks
FRC #0900 (Zebracorns)
Team Role: Alumni
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Seattle, WA
Posts: 72
Caboose has a spectacular aura aboutCaboose has a spectacular aura about
Smile Re: Team 900 - nVIDIA Jetson TK1 OpenCV Co-Processor

Hey all,

I just posted links to 900's code, including vision, over here. Ask questions if you have any there please.
__________________
navX Labview Library

"Robots are aluminum shavings, held together by zip-ties."

myManga
Closed Thread


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 19:52.

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