vlaskine edited this page Mar 22, 2017 · 86 revisions

Table of Contents

snark library: motivation

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.

why snark⸮

  • 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:
The name was suggested by David Johnson.

tutorials

If you already have installed snark (see below), here are some tutorials to demonstrate the usage of its tools on real-life datasets.

library overview

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

applications overview

  • 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

downloads

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

release 1.0.4

If building from source:

 git clone https://github.com/acfr/snark.git -b 1.0.4

Linux

Currently, you need to build release from source (see below)

Windows

Pre-built installer: http://perception.acfr.usyd.edu.au/libraries/packages/win/32/snark-1.0.4-win32.exe

  1. Download and run the executable, which will unpack include, lib, bin and cmake files.
  2. It is recommended to add the full bin path (e.g. c:\libraries\snark\bin) to your system path environment variable.
  3. 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.
  4. 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.
  5. 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
Building windows packages yourself

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.

Here's how.

  1. These pre-built packages are built using Visual Studio 2010 and NSIS, all via cmake/cpack.
  2. 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
  3. 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.
  4. 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".
  5. 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.

installation from source

Note: snark depends on the library comma - download and build that first

Linux

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.

Something like:

 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

more details

snark for dummies, on Ubuntu/Debian

Instructions for building with Gige

Instructions for building with Xenics Gobi

Windows

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.

more details

Instructions for building with OpenCV

Instructions for building with Gige

Instructions for building with FlyCapture

authors

Vsevolod Vlaskine

Cedric Wohlleber

James Underwood

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.