|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
URL for MjpegServer from CameraServer/USB Camera
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);
|
|
#2
|
||||
|
||||
|
Re: URL for MjpegServer from CameraServer/USB Camera
Quote:
The way to access the code from GRIP would be Code:
http://roborio-TEAM-frc.local:1181/?action=stream |
|
#3
|
|||
|
|||
|
Re: URL for MjpegServer from CameraServer/USB Camera
Really? Thank you! I'm guessing any additional streams (for example if we have 2 cameras) would use port 1182? I saw some sort of reference to using the next available port.
|
|
#4
|
||||
|
||||
|
Re: URL for MjpegServer from CameraServer/USB Camera
Yeah any additional cameras will just increase the port number, so cam 2 will use 1182, cam 3 will use 1183 etc...
|
|
#5
|
|||
|
|||
|
Re: URL for MjpegServer from CameraServer/USB Camera
Thanks! Didn't get a chance to test until today (building was closed for bad weather) but it worked really nicely. One (hopefully) last question: is there any way to increase the resolution of the mjpg stream? Currently GRIP shows the stream as a tiny thumbnail which is workable but a little annoying.
|
|
#6
|
||||
|
||||
|
Re: URL for MjpegServer from CameraServer/USB Camera
Quote:
|
|
#7
|
|||
|
|||
|
Re: URL for MjpegServer from CameraServer/USB Camera
Thanks! Didn't know that the USBCamera object affected the stream like that. Good to know.
|
|
#8
|
|||
|
|||
|
Re: URL for MjpegServer from CameraServer/USB Camera
What would the mjpegserver be if I am accessing the camera from a raspberry pi? Currently I am just typing raspberrypi.local:1185 into a browser to see the camera image but I would like to get it to appear on my smartdashboard.
|
|
#9
|
|||
|
|||
|
Re: URL for MjpegServer from CameraServer/USB Camera
Oh wait...it should be the same thing just port 1185, I'll give that a go and relay how it goes.
|
|
#10
|
|||
|
|||
|
Re: URL for MjpegServer from CameraServer/USB Camera
Any success? I am on the same boat as you are currently.
|
|
#11
|
|||
|
|||
|
Re: URL for MjpegServer from CameraServer/USB Camera
I would also like to know how to get the camera stream from the raspberry pi on the dashboard. Even better would be an unmodified Labview Dashboard, as nobody on my team is interested in using the other options. I'm fairly certain it is possible with the right things published to network tables, but who knows...
|
|
#12
|
|||
|
|||
|
Re: URL for MjpegServer from CameraServer/USB Camera
Well, I'm upset...I hit submit post and it just went *poof*...anyway a rundown of my current situation is that it didn't work however I an idea that I just thought of which I will test tomorrow (and paste my code). I believe I have just been making a stupid mistake. As for MuskieProgrammes question, I would use the SmartDashboard definitely because I believe LabView can only handle Usbcameras, could be wrong though. Also, network tables can only publish/get variables (again, 99% positive).
Ryan |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|