Code Monkey home page Code Monkey logo

ofxsick's Introduction

ofxSick is an addon for openFrameworks to interface with SICK laser measurement systems.

ofxSick is written for the SICK LMS1xx series, and tested against the LMS111. The LMS1xx datasheet is available here.

LMS1xx Library

The basic interface protocol is implemented by Konrad Banachowicz' LMS1xx library. 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 to do blob detection on objects in the scene.

ofxsick's People

Contributors

kylemcdonald avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxsick's Issues

Problem with 3 or more LMS

I have a problem when connecting 3 LMS100 together. After a while (10-30s) it stops reading data from the socket. Sometime only 1 LMS is still working and the other 2 are freezed. Then it will also freeze. If I use the stdparser version it doesn't crash the application, it just doesn't update the point cloud. If I use the master version it crashes in one of the laser thread.

I have no problem with only 2 LMS out of 3 (any combination).

The strange thing is that it seems to be also linked to which window is on top. If I launch the software and everything work and then I just switch back to XCode and back again to my software, the LMS will certainly freeze.

I narrowed down where the communication doesn't work:
In stdparser version: It receives a LMS_STATE_STX command in LMSParser.cpp but then I have an unknown command line 63-65. So I stay in the while(true) loop line 262 in LMS1xx.cpp
In master version: It crashes line 450 on sscanf(tok, "%X", &dat) in LMS1xx.cpp

Has anyone tried 3 sensors together with this addon?

data retrieval needs to be threaded

  1. otherwise, if there is a very long pause in reading the data, the sensor will need to be restarted.
  2. this decouples the update rate of the app from the update rate of the sensor (which is currently blocking the app)

Typo in scandatacfg Telegram

libs/LMS1xx.cpp, line 176:

"sWN LMDscandatacfg", cfg.outputChannel, cfg.remission ? 1 : 0,

should be:

"sMN LMDscandatacfg", cfg.outputChannel, cfg.remission ? 1 : 0,

Telegrams beginning with "sWN" are undefined according to the Developer's Guide I'm looking at.

When I make this change, our LMS500 returns an sFA 1 error code rather than nothing at all. Onward to the next breakpoint!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.