Support Raspberry Pi #366
|
I have a pi set aside to bring in tomorrow anticipating this discussion. I wonder if it would work as a test if we created the directories on the pi so it looks like a roboRIO? Brad
From: Thomas Clark notifications@github.com It would be cool if GRIP ran on a Raspberry Pi. To do this, we need: A Pi build of libntcore A Pi build of JavaCV A more flexible deploy tool Probably with defaults suited to the roborio, but have the username/password/directories customizable GRIP would likely only work in headless mode (I don't think JavaFX is supported on arm/linux) — |
|
Pi 1 will not work for sure, It's Arm v6 whereas the RoboRIO is Arm v7. I did try RoboRIO ntcore builds on a BeagleBoneBlack, and they did not work either. I'm guessing because of the VFP vs HardFloat differences. I'm actually setting up a build server to build ntcore for Armv7 hf and android. The builds I'm building can be found here http://198.199.94.5/ntcore/ if you want to try them out. The arm-linux-gnueabihf should be the builds that work on the Pi 2. They will not work on a Pi 1, but I will look at trying to find a Pi 1 cross compiler, and then can add it really easily. |
|
The deploy script is already incredibly flexible. The UI components are extensible. I could probably get this working in ~1.5 hours. |
|
I wouldn't spend much time on a pi 1 build where the the performance is so much less and a pi 2 is only $40. Maybe I'll have time to play with it over the weekend, but I'm bring a few pi 2 boards if the grip guys want to try. |
|
I just a bit of testing. Running my build on a BeagleBone Black started to load correctly, however then gave an error saying libstdc++.so.6 wasn't right. Spent a while trying to debug that, but couldn't. Don't know enough linux to debug that more. The cross compiler was GCC 4.9.3, but my BBB only had 4.9.2, and I couldn't figure out how to upgrade it. Hopefully it works on a Pi 2, or you can get GCC 4.9.3 onto it. I also retested the RoboRIO image on the BBB. It gave a bad format error when trying to load. So that build will almost certainly not work on a Pi. |
|
I added a zip of the lib folder used for cross compiling to the ntcore folder. That should have all the libraries needed if any more are needed. |
|
Ok. So by preloading the libstdc++.so.6 in the zip folder, the cross compiled version started working on my BeagleBone Black. So the builds should work on Pi 2 either without issues, or require preloading a library before running, which shouldn't be too bad. EDIT: Tested on my brand new CHIP as well, and the builds worked there too, as long as you had the specific libstdc++.so.6. So I put that file alone in the ntcore directory. And all you should need to do is when you run the program set LD_LIBRARY_PATH to whatever folder you put that library in. |
|
Could you elaborate on the process you used to get this working on the BBB/Pi 2? We have been attempting to re-build with some of the suggestions in this thread to no avail. |
|
I didn't test getting the full GRIP suite working. I was only doing testing to see if I could get NetworkTables working properly. |
|
I also got an error message about how the JVM couldn't load the libraries when I tried GRIP on my Beaglebone Black (running Arch Linux). However, ThadHouse's If you want to try it, just scp the this file and a GRIP save file onto your coprocessor, and run with
|
|
You should have been able to use the jar in the Java folder, but maybe it doesn't support Arch. I've only ever tested it on Debian based OS's, and only the actual library, not the jar. I'll try the jar tonight on my BBB and Pi 2. And it's not surprising that the FRC jar does not work. The RIO is is Soft Float, whereas Pi's and BBBs are Hard Float. |
|
It was a journey, but I completed the first two items on your list of what was necessary for Raspberry Pi support. I built NTCore, opencv, and the OpenCV JavaCPP Preset for linux-arm. Not entirely sure about the ABI, these were compiled with GCC 5.3.0 arm-linux-gnueabihf on Arch Linux. I also added the prebuilt natives (which existed for every platform except linux-arm), and edited the build.gradle file to add all of this stuff into the jar. I changed the core project dependencies block to this: dependencies {
compile name: 'javacpp-opencv-preset'
compile name: 'NetworkTables-3.0.0-natives-arm'
compile name: 'opencv-natives-linux-arm-hardfloat'
compile name: 'opencv-natives-linux-x86'
compile name: 'opencv-natives-linux-x86_64'
compile name: 'opencv-natives-macosx-x86_64'
compile name: 'opencv-natives-windows-x86'
compile name: 'opencv-natives-windows-x86_64'
compile group: 'org.bytedeco', name: 'javacpp', version: '1.1'
compile group: 'org.bytedeco', name: 'javacv', version: '1.1'
compile group: 'org.python', name: 'jython', version: '2.7.0'
compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.8'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
compile group: 'com.google.guava', name: 'guava', version: '18.0'
// We use the no_aop version of Guice because the aop isn't avaiable in arm java
// http://stackoverflow.com/a/15235190/3708426
// https://github.com/google/guice/wiki/OptionalAOP
compile group: 'com.google.inject', name: 'guice', version: '4.0', classifier: 'no_aop'
compile group: 'com.google.inject.extensions', name: 'guice-assistedinject', version: '4.0'
compile group: 'edu.wpi.first.wpilib.networktables.java', name: 'NetworkTables', version: '3.0.0-SNAPSHOT', classifier: 'desktop'
}JavaCPP doesn't distinguish between hard and soft float ARM (I assume that's the crucial difference between the RPi and the RoboRIO), and there's no easy way to make it do so. Therefore, natives for the RoboRIO and other Linux boards cannot coexist in the same jar. I think it would make sense to have two jars that are deployable: one with some or all of the above natives, and one with just compile name: 'opencv-linux-arm-roborio'
compile name: 'NetworkTables-3.0.0-natives-roborio'The user could select whether to deploy to a "generic" coprocessor, which would use the multi-native file, or a RoboRIO specifically, which would use the other jar with just those natives. Also, arm-linux does actually have OpenJFX, so using these libraries would allow GRIP's GUI to run on embedded Linux boards. I hope this is useful to you, and I hope we can get this working. You can download the libs here. Things I built: |
|
Did you cross compile any of those? Or were they all compiled natively? If cross, how'd you get GCC5.3 instead of 4.9.3, which is the newest I could find looking around. I would like to get rid of the libstdc++.so requirement of my build if possible. |
|
I cross compiled them with the latest arm-linux-gnueabihf-gcc available from the Arch User Repository. |
|
So I can't get your copy working on raspbian either, without the LD_PRELOAD trick. I end up getting the same error I was getting, where it can't find a libstdc++.so.6 with CXXABI_1.3.9, which it looks like GCC 5 compiles to. Turns out my build was compiling with GCC 5 anyway, so I don't know why you couldn't get it working on yours. It seems like the binaries produced should be identical whether or not the cross compiler is hosted on arch or debian. Also it looks like your NetworkTables-3.0.0-natives-arm.jar does not include any of the java files, and instead just libntcore.so. Is that right? Everytime I've built ntcore, it get a jar that include both the java files and the native library. |
|
Can you check what libstdc++ ABI version your Raspberry Pi is using? It looks like there's a command line option to set it. And yeah, I just built the c++ (cmake) part of ntcore because that is all that's needed to run GRIP on armhf. I was having some issues getting the java (gradle) part to run. |
|
Mines using the one from GCC 4.9. I can't find anywhere to install GCC 5 from for Raspbian currently. Thats why I was just grabbing the libstdc++.so.6 from the cross compiler itself, and preloading that one before running. I tried switching to the GCC 4.9 cross compiler, and it compiled, however it was generating an illegal instruction for some reason, so I need to figure that out. I don't know how easy its going to be to get a universal configuration working unless we do the preloading trick, which should work on any device. I'll install arch on my BBB sometime this week and try and find a universal solution that would work for the most devices. What part of gradle were you having trouble running? Once I got java 8 installed, the only special thing I had to do was set -PcompilerPrefix=arm-linux-gnueabihf-, which changes from the frc prefix to the generic hf prefix. |
|
Can you post raspbian's libstdc++.so so I can see if I can figure out what ABI it's using? |
|
Update: Or just run
on the Pi and post the output. EDIT: sorry for the repeated post, GitHub/Pale Moon was being weird. |
Those are what I get. And that is a fresh install of raspbian jessie with apt-get update and upgrade ran. |
|
OK, so according to this page, anything we compile with GCC 4.9.0 or earlier (not sure about 4.9.3) should be fine. I can also install that older version of libstdc++ into my toolchain. |
|
Oh can I just copy paste that one into the toolchain? or would you need to add other files? I still don't know why the 4.9 cross compiler kept crashing. It compiled correctly, and technically ntcore will compile with GCC 4.8 as well. But I'll try coping in the older libstdc++ into my toolchain too to see if I can fix it. Heres the libstdc++ from my pi if you want to try it. |
|
I don't know if that would work. You can try. The safest way would be to download gcc 4.9.0 and build and install libstdc++ from inside the source tree. I won't have time to try that until Thursday, though. |
|
Alright, try this ntcore library on your Pi. I installed libstdc++ 6.0.20 and used that to build ntcore:
It doesn't seem to require the |
|
You didn't link a library. |
|
Just updated my post. |
|
Ok I'll try it in an hour or so hopefully. We'll want to build with optimizations if we do an official one, but that should hopefully work for testing. |
|
Thanks you guys for taking this on. We have a lot we are trying to fix. This would be an awesome feature to implement if we could get it automated as part of our deployment. |
|
I did some research, and I think the correct optimizations are |
|
Oh and by the way, I still can't build the Java part of ntcore.
|
|
Oh. You want to be using the gradle wrapper ./gradlew. In addition, you want to set the custom compiler prefix by using -PcompilerPrefix=yourcompilerprefixhere. Also did you custom compile your 4.9? If so I might want some help setting it up, as if your build works I want to be able to build it. |
|
I downloaded GCC 4.9.0 and configured only in the libstdc++v3 subdirectory. I figured out I had to copy The commands I ran: cd gcc-4.9.0
cp libgcc/gthr-posix.h libgcc/gthr-default.h
cd libstdc++-v3
mkdir build
cd build
../configure --prefix=/usr/arm-linux-gnueabihf/oldc++ --host=arm-linux-gnueabihf --enable-libstdcxx-threads
make
sudo make installYou still have to patch ntcore, though, because the LLVM headers included with ntcore try to use #if 0
|
|
Oh is it still using GCC 5 only with libstdc++ for 4.9? Interesting. |
|
Using |
|
So with that build, I get an _undefined symbol: ZdlPvj when trying to load it. And I think the gradlew has some custom mods to it to enable some hidden settings. I think thats why you need the wrapper. |
|
So I think if we do it right, the deploy can handle the LD_LOAD_LIBRARY required for a GCC 5 build. With the deploy changes is shouldn't be too difficult. However its going to require a separate GRIP build jar for sure. It will also probably require a button in the UI to switch between the RoboRIO and other devices. I don't know enough about Gradle or JavaFX to enable both of those things. @ThomasJClark would you be able to help with those? If so, I can get the deploy script added to where it should deploy right to the RIO and other ARM devices. |
If I can get a link to whatever native libraries are working and what commands we need to run them, I think I can add it to the project |
|
Just got our Pi. Which linux distro should we use. I thought I read Raspbian over on ChiefDelphi. |
|
I only have the ntcore lib, which is here http://198.199.94.5/ntcore/cb4cc63/arm-linux-gnueabihf/java/ntcore-arm.jar. You should be able to use the OpenCV lib found here, made by multiplemonomials https://www.dropbox.com/s/flmcrzhzjou6b9y/GRIP-linux-arm-libs.zip?dl=0. To make these compatible with most devices, you need to deploy this file http://198.199.94.5/ntcore/libstdc++.so.6 to the same directory you deploy the grip jar to. Then, when you run GRIP, your run command needs to become We'd been trying to get an ntcore build that didn't require the libstdc++.so.6, however everyway we tried it didn't work. We'll keep looking, but for now it looks like thats going to be the required solution. |
|
So I got GRIP to run on my Pi 2 Jessie, however it gives me this error at startup |
|
@EdWard680 Do you have the jar you attempted to deploy? ntcore works with me manually on my Pi, but I've never been able to build grip with the jar. Don't know enough about the Java build system. That's why I was hoping Thomas could get the build system working so I could test it. |
|
Here it is |
|
Btw, I wrote a batch script to automate deploying the GRIP profile and starting GRIP. You guys might find it useful. |
|
Also, I'm pretty sure you're getting that |
|
I wish it were wrong but I've double checked it and it's right. I can ping that address from the Pi and I can open client viewer client on my computer for that address, and the values are successfully pushed from the UI |
|
Actually, you need to run the server at that address. |
|
Wait, I read your post wrong. You're running the server at the publish address, right? And you can access data on it from the client? |
|
I have a roborio running the server on my lan. I have a laptop from which I composed the test grip file on my lan. And I have the Pi 2 to which I deployed that project. |
|
Thanks for all the efforts here! Has anyone got GRIP fully working/capturing on the Raspberry Pi 2? From the .grip file:
Errors:
|
|
Same exact thing happens for me. @vScourge Can you try getting Network Tables to publish? |
|
Does anyone have an Axis Ethernet camera to use for testing? Our team uses them instead of the USB cameras, so I can't help camera capture issues. |
|
I have an mpjeg stream I can generate but I haven't been able to get that to work with GRIP normally, let alone on a Pi |
|
@EdWard680 I had left my publish step out to keep it simple, but putting it back in it now ends with this error:
... which isn't too surprising since I don't have a RoboRio running on this network yet? I can try that but maybe not until tomorrow. |
|
You don't have to, but in order to test it you could start a Network Table server on your computer using Eclipse > WPILib > Outline Viewer and then tell GRIP to connect to that. |
|
We were able to get GRIP capturing images and publishing over networktables using a Beaglebone Black and an Axis M1013. When I tried the only USB camera we had on a Linux desktop, GRIP said it didn't support the color format. |
|
@multiplemonomials Can you upload the core.jar you used? |
|
As I linked in an earlier post, https://www.dropbox.com/s/7iueslu26avp7d6/GRIP-archlinuxarm-deployable.jar?dl=0 This needs the libstdc++.so |
|
Hey, waitaminute!
|
|
Hmm. So I wonder why it couldn't find delete? If I compile something on my pi physically with GCC 4.9.2, it works, and the GCC 5 cross compiler works as log as the libstdc++.so is loaded, so I wonder where delete would be located for the compiler you built. |
|
Looking at the files, I get
In other words, the signature of
|
|
Ah. So it would require a libstdc++.so.6 anyway. So no point in doing the custom GCC 4.9-GCC 5 mix. If we have to have the library, we'll have to provide a custom .so anyway, and can just use the stock arm-linux-gnueabihf gcc. |
|
Looks like this function is called a "placement delete" and is relatively new. See here. I commented its declaration out in the headers and rebuilt ntcore. No change. Still working on it. |
|
One thing that potentially does help us is that the newest ntcore, if it fails to load the library built into the jar, it will attempt to load a libntcore.so from the current directory. So that means we might not have to have separate jars, at least for ntcore. We would have to have them still for OpenCV I think however. |
|
@EdWard680 Awesome. What camera are you using? We're giving up on USB and trying an Axis tonight, see if we have better luck. Are you using any binaries different from what's been posted here earlier? |
|
I posted the jar I compiled and I'm using the libntcore.so and the libstdc++.so posted most recently above. I had the same USB webcam problem you had, which is worth still investigating since I only get that issue on the Pi. I tested it with an mpjeg stream generated from the raspberry pi camera, as well as one generated from the usb camera I'm using (ps3 eye) at the same quality and it worked great. I'm not sure how fast it actually is yet, as I haven't tried a vision algo yet |
|
OK, I think I figured out how to fix the dreaded inline void operator delete(void*, void*) _GLIBCXX_USE_NOEXCEPT { }with inline void operator delete(void*, unsigned int) _GLIBCXX_USE_NOEXCEPT { }Now everything more or less works. I got a libntcore.so that doesn't use |
|
@EdWard680 Were you also running GRIP on the Pi? We're running mjpeg-streamer now (with -b, to run in background) and it seems to be using the USB camera (light is on). We also have GRIP running on the Pi but it can't find the stream. We're using "localhost:8080" but the error says it's expecting the stream at "http://localhost:8080/mjpg/video.mjpg". GRIP fails saying that server is returning response 400. We're looking for an option to change the output address in mjpeg-streamer, but no luck so far. |
|
I was running GRIP on the Pi. |
|
@EdWard680 Great, that did the trick, thank you very much. We're just down to some NetworkTable errors, since the robot isn't connected yet. |
|
@multiplemonomials I still get the same error with that latest library too. |
|
What? How can that be? Are you sure you're trying the right file? According to I rebuilt all of the other libraries as well. The new GRIP jar, with optimizations enabled so it should run much faster, is here. |
|
Hmm. It must have extracted wrong. Now it attempts to load correctly, and nm shows now reference, however it immediately SegFaults on startup. Give me a minute to try and debug why. |
|
Ok it gives the error I received when trying to cross compile with GCC 4.9. |
|
So compiling it native on my Pi with GCC 4.9 does work. I wonder if there's a bug in the GCC 4.9 cross compiler. |
|
Wait, why is that a segfault? |
|
I don't know. When running code without gdb, it just prints |
|
You're just running ntcore, right? Not GRIP? |
|
Yeah thats just getting ntcore working. A super simple program. Just linking to the so, and initializing NetworkTables. |
|
You're using a Pi 2, right? I'm going to try to compile without NEON. |
|
Yeah its a Pi 2. |
|
OK, try this: |
|
Same error. |
|
This one? |
|
That one works! What was the trick? |
|
That was compiled using the optimization flags for a rasberry pi 1. Are you ABSOLUTELY, POSITIVELY SURE that you have a pi 2? |
|
Try running
on the pi. |
|
It's definitely a Pi 2. ArmV7. The Pi 1 was V6. However I know that the raspbian on the Pi 2 was designed to run Pi 1 binaries, so maybe even it requires those flags to work. The GCC 5 library working with only the libstdc++.so makes even less sense if that is the case however. |
|
I could make 2 separate builds: one for the Pi 1 and the Pi 2 on Raspbian, and one for the Pi 2 on any other distro and the Beaglebone |
|
That download brings back the segmentation fault. Testing the builds on my BBB running debian to see if it has the same issue. I'll be able to test that tomorrow on my Pi 1. But getting ntcore and GRIP working on a Pi 1 is going to be a lost cause anyway, as they are guaranteed to be too slow to actually work. |
|
So builds 2 and 4 work properly on my BBB. Build 3 does not. |
|
OK, this one is with
(the one that worked was with |
|
Build 1 was with |
|
Build 5 worked on Pi 2, but not on BBB |
|
Build 1 works on my BBB too, which isn't surprising as I know the BBB supports neon. Thought the Pi 2 did as well. |
|
OK, this one is with Also, what happened when you tried to run build 5 on the BBB? |
|
Build 5 had the Illegal instruction error on the BBB. Build 6 has the Illegal instruction error on the Pi 2, and runs on the BBB. |
|
Something is really weird here. That command comes from the raspberry pi forums. Is your Pi up to date? Maybe you should see if a different distro, like Arch, fixes it. I'll try one more time. |
|
Yeah I agree something is weird. I'll try Arch tomorrow. GCC 4.9 failing but GCC 5 working makes it even more odd. |
|
It might just be what you said, that Raspbian emulates the older architecture to the point where new code won't run. But then what about that forum thread??? Also, try your desktop gcc with Last one, compiled without any CPU flags at all (since whatever the default was, it seemed to work): |
|
That build runs into the same Illegal Instruction issue on my BBB. Works properly on Pi 2. Old builds still have the same issues on the Pi 2 even after upgrading the Pi 2. Also are those commands used when setting up cmake from the ntcore project? Don't know my way much around building with linux, and I've just been using the gradle builds since I don't have to do any configuring with those. |
|
Yeah, those are compiler options supplied with |
|
An interesting alternative to the Raspberry PI that works out of the box with GRIP and other tools, is much faster, and easier to use is called the Kangaroo. It's about $90 with an academic discount and I described using it here: http://wpilib.screenstepslive.com/s/4485/m/50711/l/488429 Still needs a little more exploration, but is looking like a really good solution. |
|
So @multiplemonomials Did the GCC 5 builds ever work for you on arch? I'll be able to test tonight your other builds, but it seems like either way we are going to have two options for Arm devices.
@ThomasJClark and @JLLeitschuh, which option would you guys prefer for GRIP? |
|
I think the first one would be good if the .so can be packaged in the JAR. Do you know if this is possible, or does it have to be preloaded when the Java command line is run? |
|
I'm pretty sure it's not possible to package it in the JAR. Java loads the existing one on startup, and we can't load another one on top op that. Its possible to push a shell script to the device that would run it with the correct commands however. |
|
Another option that you haven't mentioned is to separate the native libraries from the GRIP jar. Both ntcore and JavaCPP fall back to I definitely prefer this option over the other two, it seems a bit cleaner. |
|
What is the status of the Raspberry Pi port of GRIP (JavaCV & libntcore)? I think I have most of everything working, but I am getting a lot of Java exceptions when I launch the grip.jar file. I can't go into detail what the errors are until this evening. If the project is working (this thread has been rather quiet), can we get some sort of guide as to the steps that need to be performed? |
|
This page was recently created, and covers all the steps. Post details on your java exceptions when you can, maybe we can help. |
|
Awesome work! I'll add details on our Java exceptions if we have them after following the guide. |
|
Okay. I followed the instructions but I'm still having trouble. Here's what works: Unforuntatly, I haven't figured out how to connect GRIP to mjpg-streamer (currently using the address above). I'm also getting a few exceptions:
|
|
If you're running with a static image it only runs the pipeline once, and the first run of the pipeline usually throws an exception at every step. If they merge #392 into the next release I think it fixes that. The mjpg error is another issue a lot of teams have been having if they run it on Win7 which should be fixed in #456 this pull request I believe. @ThomasJClark @JLLeitschuh Can you confirm that these pull requests will likely fix these issues? |
|
I believe #392 will fix this, although I'm not sure if @JLLeitschuh is done working on it |
|
Just so this is documented. I have GRIP running on our RPi2. As @EdWard680 stated, it throws an error on each part of the pipeline, but just once. Not sure why, but if I set the address in the IP camera, close GRIP, and reopen it, it will display the image correctly. I know there is a fix for the IP camera in the next release. While it runs, I wouldn't say it works. I'm seeing 100% utilization on one core of the RPi2 CPU and the vision processing results are delayed by 2 or 3 seconds when processing a 320x240 pixel image. My pipeline is identical to the 2016 tutorial, minus the image resize. To avoid more CPU usage, I removed the image resize function from GRIP and I provide the source image from mjpg_streamer at the reduced 320x240 resolution. I can try running at 160x120, but at this point, we will start losing a lot of resolution from what GRIP provides in the contour report. I've seen a commit that is supposed to run each pipeline step in its own process. This may help divide up the resources better rather than relying on one core to compute everything. |
|
Will the core-1.1.1-all.jar need to be recompiled for the RPi to support GRIP 1.2.0? (core-1.2.0-all.jar) |
|
The native libraries have not changed at all between v1.1.1 and v1.2.0, you should just need the new Java .class files and other resources from the JAR |
|
So what JVM arguments should be passed in in order to mitigate the need for having |
|
Okay I realized that I had omitted the -D, but I still can't emulate the correct behavior with this setup |
|
What errors are you getting? The LD_LIBRARY_PATH is not a JVM thing, and its at the native level, so you can't really get rid of it. |
|
Actually, GRIP runs with the JVM args |
|
Hmm we'd have to look at the opencv code on why thats happening. |
|
@ThomasJClark If the script which is deployed just did |
|
EDIT: I now have GRIP working on the Pi. The trick was switching to GRIP version 1.1.1. Strange thing is, I still get the It appears that GRIP 1.2 isn't allowing enough time for the camera to connect, and just gives up when it doesn't see it immediately. Whatever the case, thanks everyone for all the help especially in the Gitter chat.
|
|
I have followed the install instructions. I'm running on a Pi 2+ with Raspian. mjpg-streamer is working fine, but when I launch GRIP, I'm getting the following shared object link errors: Feb 14, 2016 6:27:38 PM java.util.logging.LogManager$RootLogger log
|
|
What version of raspbian are you running?
|
|
When you deploy GRIP to the Pi, it never launches correctly. Try using env LD_LIBRARY_PATH=/home/pi/vision/grip:LD_LIBRARY_PATH java -jar On 2/15/2016 7:52 PM, Robert Palmer Jr wrote:
|
|
@EdWard680 I'm running: |
|
@CraigJSmith yep, I'm doing that - I set up the script for launching GRIP. I'm running it from an ssh session. |
|
The error is due to running an outdated libc. Easiest solution is to update
|
|
@EdWard680 Thanks for the pointer. Updated today and I'm back to the point I was last night. It appears that GRIP will now start, but I'm getting the following: Loading Dependency Injection Framework This is kind of strange - most people were reporting connection refused and I get Address already in use. I have done the following: manually start mjpg-streamer Grip is configured to with the deploy address of 'raspi2.local.' NetworkTable server address is set to 10.38.24.21 (my computer). The RPi is connected directly to my computer via ethernet cable. I'm running the NetworkTable viewer in server mode on my laptop. Unfortunately, the exception does not specify what address (or port) is being requested. The grip process I'm running contains only two modules - IP camera (connected to the mjpg-streamer) and publish video |
|
Issue solved - I looked at the GRIP code and found the solution: Publish video attempts to create a connection socket on port 1180 I changed the mjpg-streamer port to 1179 and now it launches successfully and starts the pipeline |
|
Is anyone working on fixing the USB Camera support? Using the mjpg-streamer works, but you're adding delay, which I would like to eliminate. Does anyone know what the issue is? I might have some time to dig into it if someone can sum up the issue. |
|
So, for the record, in case anyone else has these problems:
and no data appeared on the Outline Viewer. I puzzled for a bit, and then realized that my Beaglebone, running Arch Linux, did not have the mDNS package (avahi) installed, so it couldn't resolve the roborio. I installed the avahi package, and enabled it.
After the first reboot, I could no longer ping my BBB via its hostname, so I took it off the robot, and it turned out that its memory was completely full. I freed up some space and rebooted, and things were working again. But, GRIP still couldn't talk to the roboRIO. SSHed into the Beaglebone, I discovered that I could not ping the roboRIO by its ipv6 or ipv4 addresses, either. It turns out that, since I was using the D-Link bridge in router mode, the D-Link wasn't handing out IP addresses, and unlike the roborio or my laptop, the BBB did not auto-assign itself one, apparently breaking networking. So I configured it to have a static IP (which involved disabling netctl, the method using it didn't seem to work), and I was finally able to ping the roboRIO by its ip address, and resolve it with TL;DR: the notorious |
|
Hi, I would like to report success with a Raspberry Pi v3 Model B One hiccup. I used GRIP grip-1.3.0-rc2-x86_64.exe but since the replacement file corresponds to rc1, the ran into some problems with one of the pipelines (Specifically: Step name="Filter Contours" only goes to Socket 7 in RC1, but goes to Socket 11 on RC2). Installing core-1.3.0-rc1.exe to build the pipeline resolved the issues. Suggestion: Keep the original core-1.3.0-rc1-all.jar file in the "development" box so you can utilize the mjpg-streamer source while developing your pipeline. But instead, after you deploy to the RP, copy the core-1.3.0-rc1-9-g48dd139-all.jar over the grip.jar. Suggestion 2: You may want to edit the project.grip and change the address of the mjpg-streamer source to localhost ( ). YMMV. @multiplemonomials Thanks All..... |
|
Funilly enough, I gave up on this because when I finally got it to run on my beaglebone, there was about a 45 second delay between input frames and output data. libstdc++-6.so - I built (an older version of) the source code. It is distributed with the GCC compiler. Just go into the GCC source directory and run something like
Make sure to build a version as old or older than what is in use on your coprocessor, or it won't work. ABIs are annoying. NetworkTables -- built from the source from the NetworkTables github repository |
|
If anyone wants to build some simple installer that we can use to ship GRIP on a Raspberry PI I'm happy to host it on our release page. |
|
Maybe a Dockerfile or something would be nice. On 9/6/2016 4:16 PM, Jonathan Leitschuh wrote:
|
|
The GRIP jar -- merged the GRIP core jar from the release with the libraries I'd built: OpenCV is easy. You just have to tell CMake the cross compiler command and the compiler flags. It's (I think) The JavaCV OpenCV bindings, however , reek of an arcane evil. They're using a maven plugin to build and generate C++ code. If that's not evil I don't know what is. To get it to compile properly, you have to edit the pom.xml file and add some magic undocumented xml elements to set the compiler and flags. I don't remember what they are, but I do remember looking through the Compiler class to find them. I'll fire up the VM when I get home and post them. |
|
Ah, got it. It didn't require any XML edits. The command line to build the JavaCPP presets for OpenCV is
Replace the text in <>brackets with the correct stuff for your system. Multiple paths can be given to the include and like paths separated by semicolons. You'll want to set the paths to point to your C++ library and OpenCV installation (if it's not in the system path). My command was
|
|
Is this information something that should live here: ? |
|
Hi, I'm just getting started with this and trying to use the Raspberry Pi Camera. So far I have successfully streamed the camera to grip, applied the filters. Fighting through deployment right now but seeing as most of this is written to 1.1 or 1.2, have there been updates for ver 1.4 that obviate any part of the general guide? |

It would be cool if GRIP ran on a Raspberry Pi. To do this, we need:
GRIP would likely only work in headless mode (I don't think JavaFX is supported on arm/linux)