Go to Post Don't you know anything about programming? It's a black box; you don't need to know how it works. - Chriszuma [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: 7 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 04-02-2015, 16:37
cmastudios's Avatar
cmastudios cmastudios is offline
Registered User
AKA: Connor Monahan
FRC #1706 (Ratchet Rockers)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Missouri
Posts: 10
cmastudios is an unknown quantity at this point
1706 Vision Solution: Tracking totes in depth-map, color, and infrared

The Ratchet Rockers team 1706 has been hard at work this build season to bring you the public release of our vision solution.

INTRODUCTORY VIDEO: http://youtu.be/HYWgS2M8Zy4

Source code at: https://rr1706.github.io/vision2015/

Specifications:
- C++ code
- Intended for a coprocessor (ODROID / Raspberry Pi)
- Uses the OpenCV library
- Written on Ubuntu 14.04 linux
- Designed for Xbox 360 Kinect (could be used by any color, IR, or depth-map camera)

The program has the ability to track the field totes in three different modes: depth map, infrared light, and color. The use of a depth map to aid in tracking was used by the team for the first time in a competition. It allows the retrieval of more features

Explanation of Depth logic: https://github.com/rr1706/vision2015...th-Explanation

Explanation of IR logic: https://github.com/rr1706/vision2015...IR-Explanation

A few items still are being worked on: better color thresholds, an edge detector to replace the calibration image, transmitting camera images, multithreading, and so on.

To get the program working, you will need:
- Ubuntu 14.04 linux
- Xbox 360 kinect
- C++ knowledge

Steps to get the program working:
1. Install the dependencies: sudo apt-get install build-essential libfreenect-dev qtcreator libopencv-dev
2. Clone the repository to your computer.
3. Open the vision2015.pro file with Qt Creator.
4. Configure Qt Creator to build the project for Desktop.
5. Visit the source code file demo.cpp in the Qt Creator sidebar to change your basic options.

The main function near the bottom of the file selects which mode to use. Select color for basic color tracking, or any other function available in the program by changing the line to call a function available. Check tracker.hpp for the classes that contain the various vision tracker programs. You may need to change the thresholding values for your current lighting conditions (your environment or day/night cycle). You can use my program multithresh (https://github.com/rr1706/multithresh) to select proper threshold values (stored in tracker.hpp).


Last edited by cmastudios : 04-02-2015 at 16:40. Reason: add githublink
  #2   Spotlight this post!  
Unread 04-02-2015, 16:49
AustinH's Avatar
AustinH AustinH is offline
Registered User
FRC #4918 (The Roboctopi)
Team Role: Coach
 
Join Date: Apr 2013
Rookie Year: 2013
Location: Port Townsend
Posts: 85
AustinH is a splendid one to beholdAustinH is a splendid one to beholdAustinH is a splendid one to beholdAustinH is a splendid one to beholdAustinH is a splendid one to beholdAustinH is a splendid one to behold
Re: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

Fantastic work. We'll be sure to give this a try.

Have you tried it on a Jetson by chance?
__________________
3826: 2013 Seattle Regional Industrial Design Award & Semi-Finalists
4918: 2014 PNW Glacier Peak District Event Rookie Inspiration Award & Quarter-Finalists, 2014 PNW Mount Vernon District Event Highest Rookie Seed Award, Rookie All Star & Semi-Finalists, 2015 PNW West Valley District Event Engineering Excellence Award & Semi-Finalists, 2015 PNW Mount Vernon District Event Semi-Finalists





Visit us on the web at www.team4918.org
  #3   Spotlight this post!  
Unread 04-02-2015, 16:59
cmastudios's Avatar
cmastudios cmastudios is offline
Registered User
AKA: Connor Monahan
FRC #1706 (Ratchet Rockers)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Missouri
Posts: 10
cmastudios is an unknown quantity at this point
Re: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

Quote:
Originally Posted by AustinH View Post
Fantastic work. We'll be sure to give this a try.

Have you tried it on a Jetson by chance?
Haven't tried to get it running on anything but my laptop and an ODROID-XU. We were thinking of looking into getting one to potentially improve the performance in comparison to the ODROID but haven't focused on it yet. We may.
  #4   Spotlight this post!  
Unread 05-02-2015, 12:24
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

have you thought about using the i2c communication to the roborio from the odroid c1 instead of sending a udp message?
  #5   Spotlight this post!  
Unread 05-02-2015, 13:41
Cinnamon Toast's Avatar
Cinnamon Toast Cinnamon Toast is offline
Registered User
FRC #3641 (The Flying Toasters)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Michigan
Posts: 32
Cinnamon Toast is an unknown quantity at this point
Re: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

This looks exceptional. I have access to a Jetson, and once I get some time, I'll see if I can get it working on the system. I'll definitely reply back with performance stats.
  #6   Spotlight this post!  
Unread 05-02-2015, 17:33
baumgartensam's Avatar
baumgartensam baumgartensam is offline
Registered User
AKA: Sam Baumgarten
FRC #0751 (Barn2Robotics)
Team Role: Alumni
 
Join Date: Apr 2014
Rookie Year: 2013
Location: United States
Posts: 42
baumgartensam will become famous soon enough
Re: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

If I get a chance I'll see if I can get a GPU optimized version working to take full advantage of the Jetson's GPU.
  #7   Spotlight this post!  
Unread 07-02-2015, 18:31
cameronr2980 cameronr2980 is offline
Registered User
FRC #2980
 
Join Date: Feb 2015
Location: Washington State
Posts: 4
cameronr2980 is an unknown quantity at this point
Re: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

Hello,
I have been trying to get this program running on an nvidia Jetson TK1 for the past few hours. I can't seem to get some of the dependencies to install. apt comes back with an error saying that every package except for build-essential cannot be located. "Unable to locate package x." I have looked around on the internet for a solution and tried a few but none of them have worked. This may be more of a linux question but does anyone see an easy solution to this? I'm thinking about reflashing linux and trying again.
  #8   Spotlight this post!  
Unread 07-02-2015, 20:15
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: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

did you try sudo apt-get install libopencv-dev?
__________________
"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."
  #9   Spotlight this post!  
Unread 07-02-2015, 21:21
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: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

Quote:
Originally Posted by cameronr2980 View Post
Hello,
I have been trying to get this program running on an nvidia Jetson TK1 for the past few hours. I can't seem to get some of the dependencies to install. apt comes back with an error saying that every package except for build-essential cannot be located. "Unable to locate package x." I have looked around on the internet for a solution and tried a few but none of them have worked. This may be more of a linux question but does anyone see an easy solution to this? I'm thinking about reflashing linux and trying again.
Try:
Code:
sudo apt-get update
Apt-get gives those errors all the time when the repos aren't up-to-date. What is the command you are running?

Also, I suggest that you compile OpenCV manually for the Jetson because it supports a crapload more of optimizations than other boards. I don't have a Jetson, but I'm sure that it uses the same repository as the other boards, like the ODROID.
The Jetson has CUDA support, one thing that should used to it's max for it's glory! It'll make your code run just a lot faster!
  #10   Spotlight this post!  
Unread 08-02-2015, 01:27
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: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

I would love to see the performance of our code on the Jetson. Please someone deliver. I'm willing to thread it and optimize it if someone wants to bench mark it for me.
__________________
"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 08-02-2015, 13:39
cameronr2980 cameronr2980 is offline
Registered User
FRC #2980
 
Join Date: Feb 2015
Location: Washington State
Posts: 4
cameronr2980 is an unknown quantity at this point
Re: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

Quote:
Originally Posted by yash101 View Post
Try:
Code:
sudo apt-get update
Apt-get gives those errors all the time when the repos aren't up-to-date. What is the command you are running?

Also, I suggest that you compile OpenCV manually for the Jetson because it supports a crapload more of optimizations than other boards. I don't have a Jetson, but I'm sure that it uses the same repository as the other boards, like the ODROID.
The Jetson has CUDA support, one thing that should used to it's max for it's glory! It'll make your code run just a lot faster!
I've tried apt-get update and apt-get upgrade, both completed just fine and I still had the same error. I get the error from running:
sudo apt-get install libavcodec-dev
I get the error for a couple more packages too, that is just an example. I think that all the problems i'm having are with open CV so i think i will reflash ubuntu and try again, this time compiling openCV myself.
  #12   Spotlight this post!  
Unread 08-02-2015, 14:35
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: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

Quote:
Originally Posted by cameronr2980 View Post
I've tried apt-get update and apt-get upgrade, both completed just fine and I still had the same error. I get the error from running:
sudo apt-get install libavcodec-dev
I get the error for a couple more packages too, that is just an example. I think that all the problems i'm having are with open CV so i think i will reflash ubuntu and try again, this time compiling openCV myself.
Please try running apt-cache search libavcodec > out.txt and upload out.txt to this forum. That'll search through the repo and possibly output a ton of text! If the package is found, you're golden.
  #13   Spotlight this post!  
Unread 08-02-2015, 18:35
cmastudios's Avatar
cmastudios cmastudios is offline
Registered User
AKA: Connor Monahan
FRC #1706 (Ratchet Rockers)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Missouri
Posts: 10
cmastudios is an unknown quantity at this point
Re: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

Quote:
Originally Posted by cameronr2980 View Post
I've tried apt-get update and apt-get upgrade, both completed just fine and I still had the same error. I get the error from running:
sudo apt-get install libavcodec-dev
I get the error for a couple more packages too, that is just an example. I think that all the problems i'm having are with open CV so i think i will reflash ubuntu and try again, this time compiling openCV myself.
It could be a factor of the repositories you have enabled... check /etc/apt/sources.list
  #14   Spotlight this post!  
Unread 08-02-2015, 18:57
cameronr2980 cameronr2980 is offline
Registered User
FRC #2980
 
Join Date: Feb 2015
Location: Washington State
Posts: 4
cameronr2980 is an unknown quantity at this point
Re: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

Quote:
Originally Posted by yash101 View Post
Please try running apt-cache search libavcodec > out.txt and upload out.txt to this forum. That'll search through the repo and possibly output a ton of text! If the package is found, you're golden.
That returns:
"libavcodec-dev - Development files for libavcodec"
as well as several more lines like it describing other packages. I'm really confused now because this means that it found the package, right? But when I use apt-get to try and install it it says it can't be found.

It might be because I'm on the school network now think of it. I'll keep trying.
  #15   Spotlight this post!  
Unread 08-02-2015, 19:03
cameronr2980 cameronr2980 is offline
Registered User
FRC #2980
 
Join Date: Feb 2015
Location: Washington State
Posts: 4
cameronr2980 is an unknown quantity at this point
Re: 1706 Vision Solution: Tracking totes in depth-map, color, and infrared

Now it found every one of the dependencies no problem. No idea what was wrong but thank you all for the help.
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 12:14.

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