Go to Post The future is a dark and mysterious place, and trying to force our current methods on that are patently absurd. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-01-2016, 10:58
2172Stew 2172Stew is offline
"Don't worry, that error is ok."
AKA: Stew
FRC #2172 (Street Legal)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Ohio
Posts: 5
2172Stew is an unknown quantity at this point
USB camera with GRIP or Roborealm

Hello, has anybody who uses c++ been able to get images into a software such as GRIP or roborealm for image processing? If so how have you done it? Currently we here at 2172 are able to output from the camera through the rio to the smart dash but with the normal camera server code are unable to bring the images into GRIP or Roborealm. All of our softwares/firmwares are up to date. Any ideas on what could be wrong?

Thanks!
~Stew
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2016, 02:52
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: USB camera with GRIP or Roborealm

Are you running GRIP on the roboRIO or the driver station?

If you're not running it on the roboRIO, your best bet is probably to either use an Axis camera and connect to it over the network, or (if you're using a vision coprocessor) to connect a USB camera directly to your vision coprocessor. The video protocol used by CameraServer is non-standard, and it eats up a bunch of CPU power on the roboRIO - it's probably better to directly connect the camera to whatever is processing the images.
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
  #3   Spotlight this post!  
Unread 18-01-2016, 18:13
David Lame David Lame is offline
Registered User
FRC #0247
 
Join Date: Feb 2015
Location: Berkley, MI
Posts: 84
David Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the rough
Re: USB camera with GRIP or Roborealm

We have what I think is the same probem, although we are a jave team instead of C++. We are having trouble with getting the image source set up.

We want to plug in a usb camera to USB 0 on the roborio, but run GRIP on the driver station.

We can see the camera image on the smart dashboard. Now we want to process it using GRIP on the smartdashboard. How do we get that image that we are seeing into GRIP.


I've seen several articles saying how to get the output of GRIP back to the Roborio, but how do I get the output of the camera into grip?
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2016, 22:17
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: USB camera with GRIP or Roborealm

Quote:
Originally Posted by David Lame View Post
I've seen several articles saying how to get the output of GRIP back to the Roborio, but how do I get the output of the camera into grip?
GRIP doesn't support the FRC dashboard protocol for inputs. Several people have asked how to do this, so I guess I might add support for it. It shouldn't be too hard.
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
  #5   Spotlight this post!  
Unread 19-01-2016, 23:23
David Lame David Lame is offline
Registered User
FRC #0247
 
Join Date: Feb 2015
Location: Berkley, MI
Posts: 84
David Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the rough
Re: USB camera with GRIP or Roborealm

I am obviously missing the point on something. I am not completely alone in missing the point, but some people seem to have gotten it. I (and the students on my team) haven't.

I have seen lots of references to "running grip on the driver station PC".

We can run GRIP on a plain old PC, not running a driver station at the time, by plugging in a web cam, or just using the build in web cam of the laptop. It works great. However, that doesn't help during a match. During a match, I have the USB web cam on the robot, plugged into the roborio. The roborio will acquire the pictures from the USB webcam, and communicate them to the driver station. The only place I have ever seen those pictures displayed is on the smart dashboard. Is there some other place?

Meanwhile, it seems that somehow on the laptop that the drivers are looking at, we are able to run GRIP. If that's what we do, how do we tell GRIP, "Use the webcam on the Roborio as your source."



Or am I missing the boat entirely? When I see people talking about "running GRIP on the driver station pc", do they mean during testing, like we have been doing on the last few days, with sample images in our lab? I assume that "the drive station PC" is the PC that the drivers are staring at during a match, that is controlling and communicating with the robot. If so, how do I get the image from the robot, process it on the driver station PC, and then send the processed information back to the robot. That last part seems to involve network tables, but where does it get the data to process?
Reply With Quote
  #6   Spotlight this post!  
Unread 20-01-2016, 11:54
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: USB camera with GRIP or Roborealm

Quote:
Originally Posted by David Lame View Post
I am obviously missing the point on something. I am not completely alone in missing the point, but some people seem to have gotten it. I (and the students on my team) haven't.

I have seen lots of references to "running grip on the driver station PC".

We can run GRIP on a plain old PC, not running a driver station at the time, by plugging in a web cam, or just using the build in web cam of the laptop. It works great. However, that doesn't help during a match. During a match, I have the USB web cam on the robot, plugged into the roborio. The roborio will acquire the pictures from the USB webcam, and communicate them to the driver station. The only place I have ever seen those pictures displayed is on the smart dashboard. Is there some other place?

Meanwhile, it seems that somehow on the laptop that the drivers are looking at, we are able to run GRIP. If that's what we do, how do we tell GRIP, "Use the webcam on the Roborio as your source."



Or am I missing the boat entirely? When I see people talking about "running GRIP on the driver station pc", do they mean during testing, like we have been doing on the last few days, with sample images in our lab? I assume that "the drive station PC" is the PC that the drivers are staring at during a match, that is controlling and communicating with the robot. If so, how do I get the image from the robot, process it on the driver station PC, and then send the processed information back to the robot. That last part seems to involve network tables, but where does it get the data to process?
Sorry, maybe we haven't been completely clear on how camera streaming works in GRIP and FRC in general.
  • You can run GRIP on the driver station PC with a USB or builtin webcam for testing
  • You can run GRIP on the driver station PC in actual competition if you use an IP camera (Axis camera), since it can send video over a standard M-JPEG stream. To do this, use the "Add IP Camera" button.
  • You cannot currently run GRIP on a driver station with a USB cam plugged into the roboRIO. This is because the roboRIO uses a non-standard protocol to stream data to the dashboard. This protocol is pretty simple, so we might add support for it soon. The reason we haven't yet is mostly because this method is inefficient and results in lower frame rates, but it's also the cheapest method in terms of hardware.
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
  #7   Spotlight this post!  
Unread 20-01-2016, 20:48
David Lame David Lame is offline
Registered User
FRC #0247
 
Join Date: Feb 2015
Location: Berkley, MI
Posts: 84
David Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the roughDavid Lame is a jewel in the rough
Re: USB camera with GRIP or Roborealm

Quote:
Originally Posted by ThomasClark View Post
Sorry, maybe we haven't been completely clear on how camera streaming works in GRIP and FRC in general.
  • You can run GRIP on the driver station PC with a USB or builtin webcam for testing
  • You can run GRIP on the driver station PC in actual competition if you use an IP camera (Axis camera), since it can send video over a standard M-JPEG stream. To do this, use the "Add IP Camera" button.
  • You cannot currently run GRIP on a driver station with a USB cam plugged into the roboRIO. This is because the roboRIO uses a non-standard protocol to stream data to the dashboard. This protocol is pretty simple, so we might add support for it soon. The reason we haven't yet is mostly because this method is inefficient and results in lower frame rates, but it's also the cheapest method in terms of hardware.
Thanks. Perfectly answers the question. (At least until the next question.)
Reply With Quote
  #8   Spotlight this post!  
Unread 31-01-2016, 17:05
Steve Warner Steve Warner is offline
Controls / Programming
FRC #0234 (Cyber Blue)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Indiana
Posts: 41
Steve Warner is an unknown quantity at this point
Re: USB camera with GRIP or Roborealm

We have a very basic follow-up question about the Axis M1011 and GRIP. We have the camera connected directly to a laptop with a network cable. When we select "Add IP Camera" we only get one image. How do we get the video stream that was described in the previous post? Thank you.
Reply With Quote
  #9   Spotlight this post!  
Unread 31-01-2016, 17:06
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: USB camera with GRIP or Roborealm

v1.2.0 (which will probably come out tomorrow) fixes a lot of stuff with IP cameras. I would wait until then and see if the problem still happens.
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
  #10   Spotlight this post!  
Unread 02-02-2016, 19:07
medofbr medofbr is offline
Registered User
FRC #5404
 
Join Date: Jan 2016
Location: Pennsylvania
Posts: 12
medofbr is an unknown quantity at this point
Re: USB camera with GRIP or Roborealm

We have a similar question that was asked by David Lame, but I don't think I saw an answer how to do this. His question was "how do I get the output of the camera into grip?" We have figured out how to get the camera on the laptop into GRIP, but not the camera on the RoboRio into Grip. If you could provide any information how to do this, it would be very helpful. Thanks.
Reply With Quote
  #11   Spotlight this post!  
Unread 02-02-2016, 23:35
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: USB camera with GRIP or Roborealm

Quote:
Originally Posted by medofbr View Post
We have a similar question that was asked by David Lame, but I don't think I saw an answer how to do this. His question was "how do I get the output of the camera into grip?" We have figured out how to get the camera on the laptop into GRIP, but not the camera on the RoboRio into Grip. If you could provide any information how to do this, it would be very helpful. Thanks.
With GRIP running on the RIO? It should work the same.

If you're using a USB camera, you either need to have it plugged into the device GRIP is running on, or use something like mjpg-streamer to "convert" it into an IP camera.
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
  #12   Spotlight this post!  
Unread 08-02-2016, 19:56
MaikeruKonare's Avatar
MaikeruKonare MaikeruKonare is offline
Programming Division Captain
AKA: Michael Conard
FRC #4237 (Team Lance-a-Bot)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2012
Location: Michigan
Posts: 15
MaikeruKonare is an unknown quantity at this point
Re: USB camera with GRIP or Roborealm

I am having success with RoboRealm using an IP Axis Camera. To use a USB camera with RoboRealm you would need a Windows machine ON the robot (like a Kangaroo).

We've been experimenting with Grip for a while and are, in general, experiencing nothing but sadness and memory overflows.
Reply With Quote
  #13   Spotlight this post!  
Unread 08-02-2016, 20:04
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: USB camera with GRIP or Roborealm

Quote:
Originally Posted by MaikeruKonare View Post
I am having success with RoboRealm using an IP Axis Camera. To use a USB camera with RoboRealm you would need a Windows machine ON the robot (like a Kangaroo).

We've been experimenting with Grip for a while and are, in general, experiencing nothing but sadness and memory overflows.
Try putting -Xmx50m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError as your deploy JVM options
__________________
GRIP (Graphically Represented Image Processing) - rapidly develop computer vision algorithms for FRC
Reply With Quote
  #14   Spotlight this post!  
Unread 08-02-2016, 20:20
MaikeruKonare's Avatar
MaikeruKonare MaikeruKonare is offline
Programming Division Captain
AKA: Michael Conard
FRC #4237 (Team Lance-a-Bot)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2012
Location: Michigan
Posts: 15
MaikeruKonare is an unknown quantity at this point
Re: USB camera with GRIP or Roborealm

That fix is already there.

We're not giving up on Grip; we'll keep trying it as new updates come out. But for the time being, RoboRealm is working.

I appreciate your hard work on Grip! Keep it up!
Reply With Quote
Reply


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 13:19.

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