Skip to content

Commit

Permalink
readme, safer threading
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemcdonald committed Nov 27, 2012
1 parent 81240dd commit 6b7479c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
16 changes: 14 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# ofxSick is an addon for openFrameworks to interface with SICK laser measurement systems.

ofxSick is written for the [LMS1xx](http://www.sick.com/us/en-us/home/products/product_news/laser_measurement_systems/Pages/lms100.aspx) series, and tested against the LMS111. The LMS1xx datasheet is available [here](https://mysick.com/saqqara/get.aspx?id=im0031331).
ofxSick is written for the SICK [LMS1xx](http://www.sick.com/us/en-us/home/products/product_news/laser_measurement_systems/Pages/lms100.aspx) series, and tested against the LMS111. The LMS1xx datasheet is available [here](https://mysick.com/saqqara/get.aspx?id=im0031331).

ofxSick should work on OSX and Linux, but will not work on Windows due to the way the LMS1xx library is written.
## LMS1xx Library

The basic interface protocol is implemented by Konrad Banachowicz' [LMS1xx library](https://github.com/konradb3/libLMS1xx/). Because the library uses sockets, it maybe not be possible to compile on non-POSIX systems like Windows.

Some major modifications have been made to the `LMS1xx::getData()` method in the LMS1xx library in order to support unusual packet fragmentation and unpredictable latency on OSX 10.8.

## Remission and Second Returns

Due to packet fragmentation and unpredictable latency on OSX 10.8, the bandwidth of the data returned by the LMS1xx has been reduced significantly in order to avoid errors. This is done by disabling remission (brightness) and second returns (half-reflected pulses). Right now this can be tweaked by modifying the `targetDataCfg` inside `ofxSickGrabber::connect()`.

## ofxSickGrabber and ofxSickPlayer

The main `ofxSick` class implements the shared features of grabbing and playing LIDAR data. The main `example/` shows a very simple case of using the `ofxSickGrabber`, and the `example-blobs/` shows how to switch between grabbing and playback. `example-blobs/` also works with [ofxCv](https://github.com/kylemcdonald/ofxCv) to do blob detection on objects in the scene.
5 changes: 4 additions & 1 deletion src/ofxSick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ ofxSick::ofxSick()
}

ofxSick::~ofxSick() {
waitForThread();
stopThread();
if(isThreadRunning()) {
waitForThread();
}
}

void ofxSick::setup() {
Expand Down

0 comments on commit 6b7479c

Please sign in to comment.