Skip to content

CodingKoopa/libpixyusb2_java

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 18 commits ahead, 5 commits behind charmedlabs:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 

libpixyusb2_java

libpixyusb2_java is a thin Java wrapper for libpixyusb2. It leverages Charmed Lab's existing infrastructure for generating Python bindings to generate Java bindings. This mostly serves as a proof of concept to show that this is possible. This is able to successfully initialize the Pixy2 camera on Windows if the drivers have been installed with PixyMon v2, and on Linux. This was created for use with the NI roboRIO for the First Robotics Competition, however, the Gradle build system here isn't able to fulfill this because the new C++ plugin used here does not support cross compilation, which is essential for making usage with the roboRIO work. For using the Pixy2 camera with the roboRIO over I2C, rather than USB, Kentridge Robotics has created Pixy2JavaAPI.

More info on the technical research backing this can be found in this document.

Setup

Prerequisites

  • libusb 1.0.
    • If on Linux, install this through your package manager.
    • If on Windows, extract this with 7-Zip, to C:\Program Files\libusb-$MAJOR_VERSION (e.g. C:\Program Files\libusb-1.0 for libusb-1.0.23.7z), and add it to the PATH.
  • swig.
    • If on Linux, install this through your package manager.
    • If on Windows, download swigwin and extract it as C:\Program Files\swigwin-$VERSION, and add it to the PATH. If you aren't the administrator, you should either take ownership of this folder, or install it somewhere else instead, else swig's output files won't be accessible for writing for the build process.
  • A Java compiler
  • A C++ compiler.
    • This was tested with GCC on Linux, and Mingw-w64 on Windows

Building

  1. Run gradle build in the libpixyusb2_java directory. The swig task may not be ran and finished before the cppCompile task, so it may be necessary to run this twice.

About

libpixyusb2_java is an unfinished Java wrapper of libpixyusb2 for using the Pixy2 camera over USB, with Java.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 82.7%
  • C++ 15.9%
  • MATLAB 0.4%
  • Assembly 0.3%
  • Shell 0.2%
  • Python 0.1%
  • Other 0.4%