|
|
|
| My love spiders out in a web of emotions when I think of you. |
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#16
|
|||
|
|||
|
Re: OpenCV for RoboRio - Release
Quote:
Main.o is an object file and is not human readable... it is not corrupt. The file named 2168_Vision in that folder is the binary that you can transfer to the arm7 embedded device and run it. I dont see any obvious problems in your posted images. If you have any probs, please repprt back. Regards, Kevin |
|
#17
|
|||
|
|||
|
Re: OpenCV for RoboRio - Release
Quote:
Take a look at the build settings in the Sample Project we supplied, and modify the WPI build settings to include the OpenCV specific changes, such as adding the OpenCV _Libraries path to your WPILib project, and adding the -rpath command to the linker misc settings. The build settings in the Sample Project should be all that you need to get this up and running in your own project. Last edited by NotInControl : 19-01-2015 at 18:28. |
|
#18
|
||||
|
||||
|
Re: OpenCV for RoboRio - Release
Quote:
In the WPILib.h file on line 8 you will find the following. Code:
#define REAL Code:
enum
{
NONE=0, //!< empty node
INT=1, //!< an integer
REAL=2, //!< floating-point number
FLOAT=REAL, //!< synonym or REAL
STR=3, //!< text string in UTF-8 encoding
STRING=STR, //!< synonym for STR
REF=4, //!< integer of size size_t. Typically used for storing complex dynamic structures where some elements reference the others
SEQ=5, //!< sequence
MAP=6, //!< mapping
TYPE_MASK=7,
FLOW=8, //!< compact representation of a sequence or mapping. Used only by YAML writer
USER=16, //!< a registered object (e.g. a matrix)
EMPTY=32, //!< empty structure (sequence or mapping)
NAMED=64 //!< the node has a name (i.e. it is element of a mapping)
};
The best I can tell the #define REAL in WPILib is only used in examples provided for the simulator to distinguish between simulation and real mode so it shouldn't cause a problem to remove it. Thanks, Team 2481 |
|
#19
|
||||
|
||||
|
Re: OpenCV for RoboRio - Release
Quote:
As for what I've done thus far, I've already stated it, I've installed it like the official version and run some test code on it that works fine with the main version. I believe the version that's up for download just hasn't been properly packaged. Last edited by Corvo : 20-01-2015 at 21:04. |
|
#20
|
||||
|
||||
|
Re: OpenCV for RoboRio - Release
I wonder the same but in C++. What would be the best way to do something similar to imshow() but on the driver station's dashboard?
|
|
#21
|
||||
|
||||
|
Re: OpenCV for RoboRio - Release
tl;dr of this thread (copied from http://www.reddit.com/r/FRC/comments...or_roborio_on/) Credit goes to u/ironmig
|
|
#22
|
||||
|
||||
|
Re: OpenCV for RoboRio - Release
I have also confirmed that the Java version works if you make the fixes to the build.xml. Great work, Team 2168!
|
|
#23
|
||||
|
||||
|
Re: OpenCV for RoboRio - Release
My apologies for not being used to linux development nor C++ (Windows + Java almost exclusively for the past 10 years) but the first time I tried to build, it gave me an error that it couldn't find libc++.so.6 (and another one that I don't remember). Now, when I try to build, I get this message
"Info: Nothing to build for 2168_Vision_Example" I thought it might be because the builder uses a diff scanner and it's already built, but I tried to modify the source code and it still refused to build. E/ deleting the Rio-Beagle folder re-gave me the first error Code:
c:/frc/bin/../lib/gcc/arm-frc-linux-gnueabi/4.9.1/../../../../arm-frc-linux-gnueabi/bin/ld.exe: warning: libstdc++.so.6, needed by D:\Miscellaneous Documents\CDT Code\2168_Vision_Example\_Libraries\softFP\lib_OpenCV/libopencv_highgui.so, not found (try using -rpath or -rpath-link) c:/frc/bin/../lib/gcc/arm-frc-linux-gnueabi/4.9.1/../../../../arm-frc-linux-gnueabi/bin/ld.exe: warning: libffi.so.6, needed by D:/Miscellaneous Documents/CDT Code/2168_Vision_Example/_Libraries/softFP/lib_OpenCV/libgio-2.0.so.0, not found (try using -rpath or -rpath-link) Last edited by Arhowk : 24-01-2015 at 13:47. |
|
#24
|
|||
|
|||
|
Re: OpenCV for RoboRio - Release
Has there been any developments with the Tegra TK1 as suggested in the original post?
|
|
#25
|
||||
|
||||
|
Re: OpenCV for RoboRio - Release
One thing I do not understand is the whole downloading process. Okays I have the library's set up on the robRIO (I think). Anyways here are my questions.
I ask the second question is because the provided example I eclipse does not provide an option to deploy to the roboRIO, only an option to run as a local application or something like that. |
|
#26
|
||||
|
||||
|
Re: OpenCV for RoboRio - Release
Quote:
Quote:
Edit the source code, and it will build again. Quote:
Quote:
To download the code all you need to do is Transfer the binary using FTP, winSCP, or any other method you like. Follow the instructions on the readme to get this running as a standalone project. This project is not apart of WPILib, it is standalone, which is why there is no deploy. It can be deployed to any Arm7 device, including a beagle bone without any changes. |
|
#27
|
|||
|
|||
|
Re: OpenCV for RoboRio - Release
Quote:
So I'm trying to do the same in C++. I'd like to capture/process the stream on the roborio, but then send the processed image back to the driver station. As far as I can tell, you need to get a JPEG image and send that back. The capture gives me a cv::Mat object back, I manipulate it, but then how to I send that cv::Mat data back to the driver station? Is it already in JPEG format? or do I need to convert it. And where do I access a JPEG stream within the cv::Mat ? I know, I know, this is a CV question, but this is the first time working with CV. edit - found my answer... Just need to convert the Mat to an array using cv::imencode() and send that back to the DS. Last edited by brk : 30-01-2015 at 15:10. Reason: found answer |
|
#28
|
|||
|
|||
|
Re: OpenCV for RoboRio - Release
Greetings!
I attempted to get OpenCV working with Java. However, once I pushed the Java code to the roboRio, I get the following error on the driver station: Code:
ERROR Unhandled exception: java.lang.UnsatisfiedLinkError: no opencv_java2410 in java.library.path at [java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857), java.lang.Runtime.loadLibrary0(Runtime.java:870), java.lang.System.loadLibrary(System.java:1119), org.team1515.pastabot.Robot.robotInit(Robot.java:41), edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:76), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:234)] Code:
System.load("/usr/local/lib/lib_OpenCV/java/opencv_java2410.so");
|
|
#29
|
||||
|
||||
|
Re: OpenCV for RoboRio - Release
Quote:
You can put the System.load(PATH); line inside of a static initialization block in the main robot class. It should look something like this, but with CV_PATH replaced by the path you installed to. It can be inserted above your robotInit() method. Code:
static {
System.load(CV_PATH);
}
|
|
#30
|
||||
|
||||
|
Re: OpenCV for RoboRio - Release
A small code snippet would be very appreciated. What parameters do you use for cv::imencode? Do you use CameraServer class to send the image to the DS? Thank you.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|