Go to Post I think sportsmanship is only one facet of the gp diamond. - Redhead Jokes [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #46   Spotlight this post!  
Unread 04-02-2016, 11:02
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: mjpg-streamer running on roboRIO

Change /etc/default/mjpg-streamer. The default contents look like this:

https://github.com/robotpy/mjpg-stre...it/default#L11
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #47   Spotlight this post!  
Unread 04-02-2016, 11:34
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: mjpg-streamer running on roboRIO

Quote:
Originally Posted by virtuald View Post
Change /etc/default/mjpg-streamer. The default contents look like this:

https://github.com/robotpy/mjpg-stre...it/default#L11
What text editor does the RoboRio have installed? Or can I use something like FileZilla?
  #48   Spotlight this post!  
Unread 04-02-2016, 12:04
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: mjpg-streamer running on roboRIO

Quote:
Originally Posted by team-4480 View Post
What text editor does the RoboRio have installed? Or can I use something like FileZilla?
vi.

You could use filezilla. Better in the long term to learn how to use vi.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #49   Spotlight this post!  
Unread 07-02-2016, 22:23
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,604
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: mjpg-streamer running on roboRIO

I got viewing the stream from mjpg-streamer working on the LabVIEW dashboard also. Use "BB_CameraDirectly from MJPG-Streamer.vi" from the attached zip.
Attached Files
File Type: zip BB_LabVIEW_MJPG-Streamer.zip (63.6 KB, 10 views)
  #50   Spotlight this post!  
Unread 08-02-2016, 15:04
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 229
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: mjpg-streamer running on roboRIO

Does anyone know how save the exposure settings? We are using the control panel in the web interface in mjpg-streamer. The settings work but they don't save over a reboot. Any ideas?

Thanks!
  #51   Spotlight this post!  
Unread 13-02-2016, 11:10
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 213
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: mjpg-streamer running on roboRIO

Quote:
Originally Posted by team-4480 View Post
Does anyone know how save the exposure settings? We are using the control panel in the web interface in mjpg-streamer. The settings work but they don't save over a reboot. Any ideas?

Thanks!
We would also like to be able to set the exposure manually through this as well. I was looking through the code and I only saw a setControl function and could not figure out where that came from. I am not very good at javascript or html so I would appreciate some guidance.

I was thinking that if we could find where those values are defined, we could manually set them. But I think they are in the hardware of the camera, so I'm not sure if we could set them. Or you could make a script to automatically set the values at start. I'm not sure how to do that either...
  #52   Spotlight this post!  
Unread 13-02-2016, 12:22
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: mjpg-streamer running on roboRIO

Quote:
Originally Posted by team-4480 View Post
Does anyone know how save the exposure settings? We are using the control panel in the web interface in mjpg-streamer. The settings work but they don't save over a reboot. Any ideas?

Thanks!
I will bring a camera home tonight and make it work.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #53   Spotlight this post!  
Unread 14-02-2016, 16:43
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: mjpg-streamer running on roboRIO

I've uploaded mjpg-streamer release 2016.2.0 to the ipkg repo, which will allow you to pass the following settings to the input plugin (via the INPUT[1] line of /etc/default/mjpg-streamer):

Code:
 Optional parameters (may not be supported by all cameras):

 [-br ].................: Set image brightness (auto or integer)
 [-co ].................: Set image contrast (integer)
 [-sh ].................: Set image sharpness (integer)
 [-sa ].................: Set image saturation (integer)
 [-cb ].................: Set color balance (auto or integer)
 [-wb ].................: Set white balance (auto or integer)
 [-ex ].................: Set exposure (auto, shutter-priority, aperature-priority, or integer)
 [-bk ].................: Set backlight compensation (integer)
 [-rot ]................: Set image rotation (0-359)
 [-hf ].................: Set horizontal flip (true/false)
 [-vf ].................: Set vertical flip (true/false)
 [-pl ].................: Set power line filter (disabled, 50hz, 60hz, auto)
 [-gain ]...............: Set gain (auto or integer)
 [-cagc ]...............: Set chroma gain control (auto or integer)
Additional notes can be found here.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #54   Spotlight this post!  
Unread 14-02-2016, 17:57
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 213
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: mjpg-streamer running on roboRIO

Quote:
Originally Posted by virtuald View Post
I've uploaded mjpg-streamer release 2016.2.0 to the ipkg repo, which will allow you to pass the following settings to the input plugin (via the INPUT[1] line of /etc/default/mjpg-streamer):

Code:
 Optional parameters (may not be supported by all cameras):

 [-br ].................: Set image brightness (auto or integer)
 [-co ].................: Set image contrast (integer)
 [-sh ].................: Set image sharpness (integer)
 [-sa ].................: Set image saturation (integer)
 [-cb ].................: Set color balance (auto or integer)
 [-wb ].................: Set white balance (auto or integer)
 [-ex ].................: Set exposure (auto, shutter-priority, aperature-priority, or integer)
 [-bk ].................: Set backlight compensation (integer)
 [-rot ]................: Set image rotation (0-359)
 [-hf ].................: Set horizontal flip (true/false)
 [-vf ].................: Set vertical flip (true/false)
 [-pl ].................: Set power line filter (disabled, 50hz, 60hz, auto)
 [-gain ]...............: Set gain (auto or integer)
 [-cagc ]...............: Set chroma gain control (auto or integer)
Additional notes can be found here.
Thanks! I will test this tomorrow!
  #55   Spotlight this post!  
Unread 14-02-2016, 21:44
vScourge's Avatar
vScourge vScourge is offline
Videogame Developer
AKA: Adam Pletcher
FRC #4096 (Ctrl-Z)
Team Role: Coach
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Champaign, IL
Posts: 42
vScourge will become famous soon enough
Re: mjpg-streamer running on roboRIO

Quote:
Originally Posted by virtuald View Post
I've uploaded mjpg-streamer release 2016.2.0 to the ipkg repo, which will allow you to pass the following settings to the input plugin (via the INPUT[1] line of /etc/default/mjpg-streamer)
Thanks for this. Is this build specifically for running on the RoboRio? We use mjpg-streamer on the Raspberry Pi, but we'd like to use a build that has these image control options.
  #56   Spotlight this post!  
Unread 14-02-2016, 22:06
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: mjpg-streamer running on roboRIO

Quote:
Originally Posted by vScourge View Post
Thanks for this. Is this build specifically for running on the RoboRio? We use mjpg-streamer on the Raspberry Pi, but we'd like to use a build that has these image control options.
The source code is at https://github.com/robotpy/mjpg-streamer if you wish to compile a version for a different platform. I also made a pull request to the most active mjpg-streamer fork.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #57   Spotlight this post!  
Unread 14-02-2016, 23:30
NegaNexus NegaNexus is offline
Registered User
AKA: Thys Ballard
FRC #2130 (Alpha+)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Coeur d'Alene, Idaho
Posts: 16
NegaNexus is an unknown quantity at this point
Re: mjpg-streamer running on roboRIO

I'm having connectivity issues when the mjpg-streamer daemon service starts at boot. I placed the files in /home/lvuser/mjpg-streamer-182. I tried to set it up so that the server would startup at boot by adding

Code:
#!/bin/sh
cd /home/lvuser/mjpg-streamer-182/
sh start.sh
to a new CAM.sh script in /etc/init.d and then typing into the shell:
Code:
$ update-rc.d /etc/init.d/start.sh defaults
The interesting part is when I attempt to reboot and connect to the robot. It never connects until I unplug the camera, which kills the mjpg-streamer daemon. I can then manually start mjpg-streamer over SSH without issue, but no dice with an at boot start. Does anyone have any ideas?
  #58   Spotlight this post!  
Unread 14-02-2016, 23:54
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,114
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: mjpg-streamer running on roboRIO

Quote:
Originally Posted by NegaNexus View Post
Does anyone have any ideas?
Sounds like you're going about it the hard way. Install the mjpg-streamer package from https://github.com/robotpy/roborio-packages and it'll automatically boot at startup.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #59   Spotlight this post!  
Unread 15-02-2016, 10:38
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 213
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: mjpg-streamer running on roboRIO

How would you connect opencv code running on the roboRIO to the jpeg stream. (in c++). I've seen your code in python, but where are you getting that IP from? I've tried numerous ips and can't seem to connect it. I can connect the the page fine and see the stream at http://roboRIO-2053-frc.local:5800/?action=stream, but I don't know what IP to enter in the code. do you have to set a static ip for the camera?

EDIT: I've also tried doing this (after looking on google for a bit):
videoCapture.open("http://roborio-2053-frc.local:5800/?action=stream?dummy=param.mjpg");

Nothing. Any suggestions?

Last edited by jreneew2 : 15-02-2016 at 11:58. Reason: added info
  #60   Spotlight this post!  
Unread 15-02-2016, 13:17
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 213
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: mjpg-streamer running on roboRIO

Also, I know the code works, because it connected to an axis camera fine. I'm pretty sure it cannot recognize the stream or it is not "looking" for it in the right place.
Closed Thread


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 00:16.

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