View Single Post
  #2   Spotlight this post!  
Unread 22-01-2017, 00:07
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,107
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: URL for MjpegServer from CameraServer/USB Camera

Quote:
Originally Posted by dmelcer9 View Post
I'm looking to use a USB camera connected to the robot for GRIP development. I know that GRIP doesn't accept the dashboard stream, but the MJPG stream supposedly works. However, I can't figure out what URL to point GRIP to if I want to actually use the stream.

Currently, our code looks something like this (forgot to commit to github so don't have the exact code):

Code:
//Robot.java -> RobotInit

UsbCamera c = CameraServer.getInstance().startAutomaticCapture();
MjpegServer s = CameraServer.getInstance().addServer("gripStream");
s.setSource(c);
What URL would I point the "Add IP Camera" source to in GRIP to get the camera to work properly?
You actually don't need that MjpegServer definition or the setSource line. startAutomaticCapture will automatically create the stream.

The way to access the code from GRIP would be
Code:
http://roborio-TEAM-frc.local:1181/?action=stream
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
Reply With Quote