Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Tower Tracker 1.0 (http://www.chiefdelphi.com/forums/showthread.php?t=142173)

pnitin 25-01-2016 15:09

Re: Tower Tracker 1.0
 
you can do this on $35 Raspberry pi and save critical RoboRio resources

see this

Look here for tracking shronghold goalpost
http://www.mindsensors.com/blog/how-...our-frc-robot-

Fauge7 25-01-2016 15:17

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by pnitin (Post 1529880)
you can do this on $35 Raspberry pi and save critical RoboRio resources

see this

Look here for tracking shronghold goalpost
http://www.mindsensors.com/blog/how-...our-frc-robot-

if your trying to advertise atleast make sure the link works...

FleventyFive 25-01-2016 16:47

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by Fauge7 (Post 1529620)
why are you trying to run it on a jetson or something else...

I'm still gonna try to see what I can do with the Rio. I just have no idea what I'm doing when it comes to cross compiling huge C++ projects and make files and shared libraries and all of that stuff.

FleventyFive 25-01-2016 16:58

Re: Tower Tracker 1.0
 
Quote:

FYI, anyone looking for a precompiled version of opencv 3.1 for the roboRIO, the robotpy project has had one available since before build season. Works with C++, Java, and Python 2/3 -- very easy to install the shared libraries on the roboRIO through our opkg repo.

https://github.com/robotpy/roborio-opencv
You, sir, just made my day. Been trying to figure out how to build a more up-to-date version of OpenCV for two days now, and realized I have no idea what I'm doing. You RobotPy people really rock.

Now, would you be willing to help me setup my build environment for cross compiling an OpenCV program in C++ that will use the shared libs on the RoboRio (preferably in Eclipse)?


EDIT: Information on setting up build environment is avaible on the latest release on gituhub. Wow, that was easy!

1024Programming 25-01-2016 17:30

Re: Tower Tracker 1.0
 
Can this work with usb cameras?

Turing'sEgo 25-01-2016 18:36

Re: Tower Tracker 1.0
 
*My java opencv is a little rusty*

Here is how you use a use camera with the opencv libraries and store the image in the data type Mat.

VideoCapture camera = new VideoCapture(0);

Mat frame = new Mat();
camera.read(frame);

instead of

videoCapture = new VideoCapture();
//replaces the ##.## with your team number videoCapture.open("http://10.##.##.11/mjpg/video.mjpg");

Fauge7 25-01-2016 19:18

Re: Tower Tracker 1.0
 
Yes, if you are going to use a usb webcam I would recommend mjpeg streamer and running it off of the driverstation.

pnitin 26-01-2016 18:54

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by Fauge7 (Post 1529883)
if your trying to advertise atleast make sure the link works...

http://www.mindsensors.com/blog/how-...our-frc-robot-

MekhiThomas 02-02-2016 19:04

Re: Tower Tracker 1.0
 
My team is trying to use your code to test our vision but every time we run the executable JAR file we get two errors-
"Error opening file </build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:578>" and when we try to use the network table, we get the error "NT: Error: could not resolve roborio-3929.local address <TCPConnecotr.cpp:93>". We've installed opencv 3.1 and we are able to stream camera output to the dashboard. We are using the microsoft livecam 3000. Any help would be appreciated. Thanks!

KaiFukuyama 03-02-2016 18:29

Re: Tower Tracker 1.0
 
1 Attachment(s)
My robotics team is also getting the same error that everyone else is. When we try and run it in the command prompt is gives us the error that it is having a hard time with having Open CV in the library. It can't find it but it is in there. Any ideas on how to fix it? We followed the directions as it said and nothing works. We also added the DLL file in Open CV folder to system 32. I included a screenshot of the error we were getting. Please help.

Fauge7 03-02-2016 18:36

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by MekhiThomas (Post 1534131)
My team is trying to use your code to test our vision but every time we run the executable JAR file we get two errors-
"Error opening file </build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:578>" and when we try to use the network table, we get the error "NT: Error: could not resolve roborio-3929.local address <TCPConnecotr.cpp:93>". We've installed opencv 3.1 and we are able to stream camera output to the dashboard. We are using the microsoft livecam 3000. Any help would be appreciated. Thanks!

If its having problems with the ffmpeg you need to download opencv and follow my instructions at the top of this thread. I decribe what you have to do after installing it. As for the microsoft usb camera you have to use whats called mjpeg streamer. It takes a usb webcam and outputs the feed to a web page in which you can call later.

Quote:

Originally Posted by KaiFukuyama (Post 1534627)
[font="Times New Roman"]When we try and run it in the command prompt is gives us the error that it is having a hard time with having Open CV in the library. It can't find it but it is in there. Any ideas on how to fix it? We also added the DLL file in Open CV folder to system 32.

Did you extract the program into a runnable jar and then put it in a folder with the files similar to the screenshot i included?

KaiFukuyama 04-02-2016 07:41

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by Fauge7 (Post 1534633)
If its having problems with the ffmpeg you need to download opencv and follow my instructions at the top of this thread. I decribe what you have to do after installing it. As for the microsoft usb camera you have to use whats called mjpeg streamer. It takes a usb webcam and outputs the feed to a web page in which you can call later.



Did you extract the program into a runnable jar and then put it in a folder with the files similar to the screenshot i included?

We figured out what the problem was with why it won't run. We needed to put the Open CV jar file in with system 32.

Fauge7 05-02-2016 01:01

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by KaiFukuyama (Post 1534849)
We figured out what the problem was with why it won't run. We needed to put the Open CV jar file in with system 32.

that or you put it in the same folder like i have...Cheers on getting it to work!

SlittyEyes 05-02-2016 16:18

Re: Tower Tracker 1.0
 
I modified the code to output distance values to the network table. When I add code to put the distance value on the dashboard, no values show up. Also, when I use the OutlineViewer to check any networktable values (with the localhost as "roboRIO-3929-FRC.local"), nothing shows up except the Root folder. Did you get the network table to work?

Fauge7 08-02-2016 21:33

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by SlittyEyes (Post 1535643)
I modified the code to output distance values to the network table. When I add code to put the distance value on the dashboard, no values show up. Also, when I use the OutlineViewer to check any networktable values (with the localhost as "roboRIO-3929-FRC.local"), nothing shows up except the Root folder. Did you get the network table to work?

Before checking you need to make sure your program connects to the network tables on the robot. Here is what you can do to ensure that it will connect before it does the vision processing.

Code:

while(!NetworkTable.isConnected()){}


All times are GMT -5. The time now is 22:01.

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