Go to Post FIRST's awesomeness cannot be described in numbers. - Shinglei [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-01-2017, 00:10
rtrahms's Avatar
rtrahms rtrahms is offline
Registered User
FRC #1778 (Chill Out!)
Team Role: Mentor
 
Join Date: Dec 2013
Rookie Year: 2013
Location: Seattle, WA
Posts: 17
rtrahms is a jewel in the roughrtrahms is a jewel in the roughrtrahms is a jewel in the rough
Raspberry Pi MJPG Streamer -port 8080 okay?

Hi all -
We're using a Raspberry Pi for our vision coprocessor this year. Things are working great. We have a native opencv application that thresholds and processes target info for the roborio (sent via network table), and the RPi has an MJPG streaming server for sending camera images to the drive station (either on smart dashboard or via an MJPG-capable browser).

The instructions for setting up the MJPG server have it streaming to port 8080. I was looking through the game manual and noticed that the following entry is for cameras:

HTTP 80 Camera connected via switch on the ROBOT

Is port 8080 not legal to stream video from the RPi to driver station?
If not, any advice on how to configure mjpgstreamer to use a different port?

Thanks!
__________________
Software Mentor
FRC Team 1778 - Chill Out!
Mountlake Terrace High School
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2017, 00:53
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,384
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Raspberry Pi MJPG Streamer -port 8080 okay?

I believe you are correct. Cording to R65, that pork is not allowed.

R65. Communication between the ROBOT and the OPERATOR CONSOLE is restricted as follows:
A. Network Ports:
UDP/TCP 1180-1190: Camera data from the roboRIO to the Driver Station
(DS) when the camera is connected the roboRIO via USB, bi-directional.
TCP 1735: SmartDashboard, bi-directional
UDP 1130: Dashboard-to-ROBOT control data, uni-directional
UDP 1140: ROBOT-to-Dashboard status data, uni-directional
HTTP 80: Camera connected via switch on the ROBOT, bi-directional
HTTP 443: Camera connected via switch on the ROBOT, bi-directional
UDP/TCP 554: Real-Time Streaming Protocol for h.264 camera streaming,
bi-directional
UDP/TCP 5800-5810: Team Use, bi-directional
Teams may use these ports as they wish if they do not employ them as outlined
above (i.e. TCP 1180 can be used to pass data back and forth between the ROBOT
and the DS if the Team chooses not to use the camera on USB).
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2017, 08:29
cmastudios's Avatar
cmastudios cmastudios is offline
Registered User
AKA: Connor Monahan
FRC #1706 (Ratchet Rockers)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Missouri
Posts: 12
cmastudios is an unknown quantity at this point
Re: Raspberry Pi MJPG Streamer -port 8080 okay?

My team used this setup last year to stream vision data to the driver station, and our solution was to just run mjpg-streamer on port 80. You can change the port by running the command like this:
Code:
./mjpg_streamer -o "output_http.so -w ./www -p 80"
Note that you will now have to run mjpg_streamer with sudo or root.
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2017, 08:59
beijing_strbow beijing_strbow is offline
Registered User
FRC #5968 (Cyborg Indians)
Team Role: Programmer
 
Join Date: Aug 2016
Rookie Year: 2016
Location: Kansas
Posts: 48
beijing_strbow is an unknown quantity at this point
Re: Raspberry Pi MJPG Streamer -port 8080 okay?

Those restrictions are for ports on the rio, because the field uses certain ports to communicate with the robot. What port you use to stream off of the raspberry pi doesn't matter.
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2017, 09:22
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,384
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Raspberry Pi MJPG Streamer -port 8080 okay?

Quote:
Originally Posted by beijing_strbow View Post
Those restrictions are for ports on the rio, because the field uses certain ports to communicate with the robot. What port you use to stream off of the raspberry pi doesn't matter.
Hang on, this is incorrect.

Data between an on board RPi and the RoboRio will not cross the WiFi, that is corrrect. It still should NOT use a port that conflicts with control packets. Data between the RPi and the DS is carried over the WiFi and is thus subject to the port restrictions.
mjpg_streamer does just that and therefore is subject to the restrictions.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #6   Spotlight this post!  
Unread 30-01-2017, 15:15
scca229 scca229 is online now
FTA acquiring knowledge
AKA: Nate
FRC #0060
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2011
Location: South of Phoenix, Arizona
Posts: 223
scca229 has a spectacular aura aboutscca229 has a spectacular aura about
Re: Raspberry Pi MJPG Streamer -port 8080 okay?

If the traffic is going between the radio on the robot and the driver station ethernet port, it is subject to those restrictions via R65, policed by the FMS.

Anything completely internal to the robot (even through the radio's switch) or completely internal to the DS (Operator Console and attached devices) is unaffected by those restrictions.
__________________
Nate
Reply With Quote
  #7   Spotlight this post!  
Unread 30-01-2017, 15:46
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,384
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Raspberry Pi MJPG Streamer -port 8080 okay?

Quote:
Originally Posted by scca229 View Post
If the traffic is going between the radio on the robot and the driver station ethernet port, it is subject to those restrictions via R65, policed by the FMS.

Anything completely internal to the robot (even through the radio's switch) or completely internal to the DS (Operator Console and attached devices) is unaffected by those restrictions.
Nate,
You are 100% correct.


Quote:
Originally Posted by billbo911 View Post
..It still should NOT use a port that conflicts with control packets. ..
My comment above was aimed at making certain that there is no interference with command packets. If you follow the port restrictions, there is no chance of doing that. Now, flooding your network on the robot with TCP packets is another issue altogether! Trust me on that, we found out the hard way.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #8   Spotlight this post!  
Unread 31-01-2017, 00:35
rtrahms's Avatar
rtrahms rtrahms is offline
Registered User
FRC #1778 (Chill Out!)
Team Role: Mentor
 
Join Date: Dec 2013
Rookie Year: 2013
Location: Seattle, WA
Posts: 17
rtrahms is a jewel in the roughrtrahms is a jewel in the roughrtrahms is a jewel in the rough
Re: Raspberry Pi MJPG Streamer -port 8080 okay?

Thanks all for the quick replies!

We were able to add the -p 80 option to our mjpg_streamer call, but are now encountering a different problem: bind(80) failed on the Raspberry Pi.

I think the HTTP server is used to port 8080 by default, and I need to figure out how to open/enable port 80 on the RPi instead.

Suggestions?
__________________
Software Mentor
FRC Team 1778 - Chill Out!
Mountlake Terrace High School
Reply With Quote
  #9   Spotlight this post!  
Unread 01-02-2017, 00:38
rtrahms's Avatar
rtrahms rtrahms is offline
Registered User
FRC #1778 (Chill Out!)
Team Role: Mentor
 
Join Date: Dec 2013
Rookie Year: 2013
Location: Seattle, WA
Posts: 17
rtrahms is a jewel in the roughrtrahms is a jewel in the roughrtrahms is a jewel in the rough
Re: Raspberry Pi MJPG Streamer -port 8080 okay?

Found the issue - it was a permission denied problem.
Executing same call with 'sudo mjpg_streamer...' worked.
We're up and running now, streaming video from the Raspberry Pi port 80!

Thanks for the help.
__________________
Software Mentor
FRC Team 1778 - Chill Out!
Mountlake Terrace High School
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 01:14.

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