View Single Post
  #3   Spotlight this post!  
Unread 11-01-2017, 10:45
AriMindell AriMindell is offline
Registered User
FRC #1389 (The Body Electric)
Team Role: Programmer
 
Join Date: May 2016
Rookie Year: 2015
Location: Maryland
Posts: 27
AriMindell will become famous soon enoughAriMindell will become famous soon enough
So you are correct that running cv on the roborio is an easy option thanks to the changes in WPIlib 2017, but it isn't the only way. There are many options for where your camera stream can come from, and where it can be processed.
1) Mjpeg feed from RoboRIO, GRIP on Driver station, Contours report returned to the RoboRIO via network tables. I would say this was the easiest way to use GRIP before the 2017 update. Pros: lots of processing power from the laptop, easy to debug by watching the GRIP pipeline. Cons: relatively high latency because the camera stream has to go over through radio.
2) Mjpeg from the roborio, OpenCV running on a coprocessor. Deploying was the way to do this before, but now you can write a Java/C++ program to run the exported GRIP code. Pros: lower latency than Driver station without sacrificing processing power on the roboRIO. Cons: debugging is harder because you can only see the end result of the GRIP code, but not the pipeline. You can use a laptop to tune your GRIP code before you put it on the coprocessor.
3) All vision processing done on the roboRIO, as you mentioned. Pros: 0 network latency, very easy to integrate the results of the vision processing with motion control. Cons: takes a lot of processing power away from robot control ( we haven't tested this with the new GRIP code generation yet, so I don't know how bad it is)
When I talk about an Mjpeg stream, that can come from one of two places: if you have an axis camera, it creates an Mjpeg stream that's available anywhere on the network it's connected to. If you have a USB camera, you can use the new WPILib cameraServer to convert it to an Mjpeg stream.
Good luck! I think people will really benefit from a beginners guide like this.


Sent from my iPhone using Tapatalk
Reply With Quote