PhotonVision LabVIEW has been updated:
- Add PhotonPoseEstimator_Execute function, associated menu item, snippet, and example. This encapsulates several functions into a single call, more typical of LabVIEW.
- Incorporated the updated LabVIEW Network Tables calls into a number of existing functions. (Those that expect integer values – set pipeline index, take snapshot, and a few others).
Here is a link to the install package.
We downloaded the example code, however we can not find the photon vison examples in the third party libraries. Is there another place that we should be looking? Thanks
Under the github “releases” page, there are two package files. Both need to be downloaded and installed. (It is best if LabVIEW isn’t running when doing the installs.)
Then start LabVIEW. Select “Help” under the top menu. Then select “Find Examples”
On the left side of the “Find Examples” dialog, choose “Directory Structure”. Then browse down to FRC → RoboRIO → PhotonVision The examples are here.
There are examples for the LabVIEW Math library here too.
Note – Make certain to use use the LabVIEW math library V3.06 or newer. (There is a bug in 3.05 with the *PoseEst2 routines.
Note – PhotonVision outputs 3d Poses. The odometry routines use 2d Poses for add vision measurements. There is a conversion routine under the Geometry → Pose3 menu.
Hope this helps.
so we installed the example and are running photonvision on a limelight3. we are running PhotonVision_ReadTargetData vi our hostname is photonvision on the camera. We are wondering what the Camera Name going into the NT should be? should it be the hostname? Or maybe the ip address? We had no luck with either.
This sample is designed to run interactively on the robot. This means that the code runs on the roborio but the front panel is displayed on the pc.
The IP address in the target indicated where the pc will try and run the code. 172.22.11.2 is the address of the roborio when it is wired to the roborio using USB. So connect to the robot using usb then open the example Labview project.
The example is designed to run a network tables server. This allows photonvision to write network table variables.
Run the example. Then type in the camera name exactly as it appears in the photonvision web page. Spaces and capitalization matter. This camera name helps to construct the name of the network table value to read.
If your pc is also connected to the robots Wi-Fi I think you should be able to run the driver station and dashboard to see the network table variables.
Ps. There are a lot of nice examples for frc under find examples.