Axis Camera on Smart Dashboard

camera
vision
axis

#1

Hey, we are using an Axis Camera, M1014. It works in GRIP, but we cannot seem to put the stream on SmartDashboard. We code in C++. How do you get the feed in SmartDashboard?


#2

In the frc::CameraServer class (#include <cameraserver/CameraServer.h>), there is an AddAxisCamera method that takes the IP/hostname of your Axis camera as a string.

Here is an example of how you would use it in your robot code, put this in RobotInit or similar:

frc::CameraServer::GetInstance().AddAxisCamera("10.5.09.11");

#3

Thank you, we got it working. We had to add the camera server stream viewer and set our IP address in SmartDashboard. The address had changed, which was something we had not realized.