Table of Contents
We slowly release into snark library parts of the large code base created over years in ACFR, Australian Centre for Field Robotics at Sydney University. snark contains the stuff that may be missing in other robotics and math libraries like opencv, Eigen, PCL, etc: algorithms, tools, sensor and actuator adaptors, etc.
- snark is an unseen creature that can move on the land and in the water - that's what we work on in ACFR, too
- like comma used as a name for our other library, snark is a punctuation mark: ⸮
If you already have installed snark (see below), here are some tutorials to demonstrate the usage of its tools on real-life datasets.
- get started with point clouds
- get started with data streams
- get started with image data
- get started with feeds website
See the doxygen documentation for more: http://acfr.github.com/snark
actuators: actuator adaptors
- quickset: quickset pantilt control
- graph: classes and utilities for graphs
- graphics: classes and utilities for editing and viewing 3d data, both realtime streaming and offline; requires qt4, qt3d, eigen
- imaging: classes and utilities for realtime and offline image processing; requires opencv, tbb
math: generic utilities and algorithms
- fft: some fft stuff
- filter: Kalman filters, etc
- gaussian_process: some Gaussian process classes and utilities
- geometry: planar geometry classes, e.g. polytope
- spherical_geometry: spherical and ellipsoid classes
- point_cloud: 3d point cloud algorithms; requires eigen3
- render: utilities for rendering shapes in various formats such as kml, svg
- ros: utilities for accessing data from ROS
sensors: adaptors for lidars, cameras, etc
- dc1394: firewire camera adaptor and streaming application; requires libdc1394, opencv, tbb
- gige: prosilica gige camera adaptor and streaming application; requires proprietary prosilica libAVI, opencv, tbb
- sick: ldmrs sick lidar adaptors and streaming application; requires eigen3
- velodyne: velodyne lidar adaptors and streaming application; requires eigen3, pcap
- tbb: wrappers for intel tbb
- timing: time utilities
- visiting: visiting traits (for more info on visiting see https://github.com/acfr/comma/wiki/visiting)
- web: sensors display website
- quickset-pantilt-control: control quickset pantilt
- quickset-pantilt-from-console: convert console key presses to pantilt control commands
- csv-plot: 2D plotting for csv files and streams
- graph-search: search graph with vertices as cartesian coordinates
- view-points: view multiple point cloud streams in realtime and offline
- label-points: manually label multiple point clouds
- cv-cat: transform, filter, and view cv::Mat-style images on the fly
- image-accumulate: accumulate cv::Mat-style images from the streams of numbers
- stereo-to-points: process stereo data to rectified pairs, disparity images or point clouds
- csv-to-kml: convert csv files into kml snippets
- las-to-csv: convert las (laser exchange format) to csv
- csv-to-svg: convert csv files into svg snippets
- points-frame: transform a stream of 3d points into a different coordinate frame (e.g. georeferencing)
- points-calc: various calculations for 3d points (e.g. distance, cumulative distance, etc)
- math-deg2rad: convert degrees to radians
- math-eigen: a thin swiss-knife wrapper for Eigen library operations: PCA, rotation representations, etc
- math-rad2deg: convert radians to degrees
- math-rotation-convert: removed, use math-eigen instead
- geo-sun-position: determine sun azimuth and elevation for a given time and place
- points-calc: perform various calculations on a stream of points or point cloud, e.g. find the nearest points, local extrema, distances, etc
- points-detect-change: detect change (additions and subtractions) between two point clouds, using ray tracing
- points-grep: grep points from a point cloud stream, given a shape, which may be changing position, too
- points-join: join two point clouds by distance, it has limitations, but is much faster than kd-tree
- points-to-partitions: take a stream of points, partition, output points with partition ids
- points-to-centroids: take a stream of partitioned points output centroids with optional partition size field
- points-track-partitions: take a stream of blocks of points with ids (e.g. individually partitioned scans from velodyne) and make the partition ids consistent across scans, using a simple voting algorithm
- points-to-voxels: take a stream of points, output voxel indices and centroids
- points-to-voxel-indices: take a stream of points, decorate with voxel indices
- fire-cat: stream image data from a firewire camera
- gige-cat: stream image data from a prosilica gige camera
- sick-ldmrs-stream: configure and stream lidar data from sick ldmrs lidar
- sick-ldmrs-to-csv: convert a stream sick ldmrs lidar data to 3d points in csv format
- velodyne-to-csv: convert velodyne data stream to 3d points in csv format
- velodyne-thin: thin down and compress velodyne data on the fly
- csv-time-adjust: adjust the time stamps for deviation
Note: snark depends on the library comma - download and install that first
The latest version is usually stable enough and has new features and bug fixes. Get it as:
git clone https://github.com/acfr/snark.git
If building from source:
git clone https://github.com/acfr/snark.git -b 1.0.4
Currently, you need to build release from source (see below)
Pre-built installer: http://perception.acfr.usyd.edu.au/libraries/packages/win/32/snark-1.0.4-win32.exe
- Download and run the executable, which will unpack include, lib, bin and cmake files.
- It is recommended to add the full bin path (e.g. c:\libraries\snark\bin) to your system path environment variable.
- Open a command window (after changing your system path) and type ' math-deg2rad.exe -h', if you see the usage for this app then the installation was successful.
- The snark applications should all work from the standard command window, however, we suggest installing cygwin (http://www.cygwin.com/) and using that terminal in order to run more complicated pipelines, which may also use linux style utilities and concepts (e.g. cut, grep, mkfifo, etc). This has the added advantage that identical shell scripts can be used in both linux and cygwin environments.
- Cygwin treats carriage returns differently to linux by default, so for full compatibility with linux bash scripts, add the following two lines to your cygwin ~\.bashrc file:
export SHELLOPTS set -o igncr
You may want to create your own windows packages of snark, e.g. if you built snark from the latest source and want to pass it to someone as a package.
- These pre-built packages are built using Visual Studio 2010 and NSIS, all via cmake/cpack.
- You will need to install the Nullsoft Scriptable Install System (NSIS). There's nothing to build, just download the installer: http://nsis.sourceforge.net/Main_Page
- Follow the instructions on installation from source for windows below: i.e. obtain the comma source using git, run cmake, load the .sln into visual studio, and build it.
- Now to create the pre-built package, simply find the "PACKAGE" project in Visual Studio (default on the left window pane, e.g. where BUILD and INSTALL projects are located. Right click "PACKAGE" and in the menu that appears next to the mouse, click "BUILD".
- Once completed, this will have created a package executable file like those available for download from this site. The file is located in your top level build directory.
Note: snark depends on the library comma - download and build that first
Currently, only building from source.
Requires boost, at least 1.42; http://github.com/acfr/comma; and cmake. See specific libraries above for more dependencies.
mkdir ~/src cd ~/src git clone https://github.com/acfr/snark.git mkdir -p ~/build/snark cd ~/build/snark ccmake ~/src/snark make sudo make install
Instructions for building with Gige
Instructions for building with Xenics Gobi
Use git, cmake http://www.cmake.org/ and Visual Studio (VS9 and later should work).
You may find 'tortoise git' useful to pull the source: https://code.google.com/p/tortoisegit/ but any git client will do the job.
Build out of source, make a build directory that is not a subdirectory of the source.
Run cmake and point it to the top level source folder (that contains CMakeLists.txt) and select your build environment (e.g. Visual Studio).
Configure and point to the installed locations of your dependencies such as boost. Note that you can turn off many parts of snark using the cmake build menu, so I suggest turning many things off first to minimise external dependencies on windows and to minimise build time. Then turn back on only the things you need.
Configure, then Generate and cmake will generate a solution file (snark.sln) for Visual Studio. Double click to load it.
In Visual Studio, build the "BUILD_ALL" project.
If successful (no errors), build the "INSTALL" project and the binaries will be placed in the install path chosen in cmake (by default, it installs to 'program files').
Add the bin path (e.g. ...program files\snark\bin) to your system path. To test the installation, refer to the windows downloads section above.
Instructions for building with OpenCV
Instructions for building with Gige
Instructions for building with FlyCapture