Coder Social home page Coder Social logo

hokuyo-unity's Introduction

hokuyo-unity

...WORKING IN PROGRESS...

this is modified based on https://github.com/inoook/UnityURG

code is still at a very primitive state, object detection can be improved

improvments and contributions are very welcomed.

this library works with multiple Hokuyo sensors, you need to give each of them a unique IP.

why

I need to make a large wall into a "touch screen" so all code here are wrote to server this single purpose.

for example, the strength data from the sensor is compeltely ignored here since it doesn't help us detecting objects on a surface. (as the sensor can detect things from pretty far!)

to better "converting a surface into a touch screen", I added the distance cropping mechnaism, to help ignore the things that are out of the detection area.

there are two ways to constrain the detection area:

  • Rect rect
  • Radius rad

if you choose Rect Mode, the sensor will only detect things within a rect area. You can change the width and height of the rect area by changing detectRectWidth and detectRectHeight the unit is mm (same as everything else!)

if you choose Radius Mode, the detection area will be a circular sector, the detection distance will be the same for all direction, you can change the detection radius by changing maxDetectionDist

Either Distance Cropping Mode will ignore things behind the sensor. which means 90 radians of detectable area will be wasted.

Prepare

you will need to do some setting up in the network setting of Windows befor you can get any data:

https://sourceforge.net/p/urgnetwork/wiki/ip_address_en/

Files:

  • URGSensorObjectDetector

this is the class for "detecting" object from sensor raw data

  • UrgDeviceEthernet

This is where we get the raw data from the sensor

  • SCIP_library

Used by UrgDeviceEthernet, for low-level communication with the sensor

How to use

Attach URGSensorObjectDetector to an empty GameObject or use the Prefab Sensor Data

Warning

I only have two Hokuyo UST-10LX so obviously this code is not tested on any other Hokuyo sensor model... but it should work with most of them!

hokuyo-unity's People

Contributors

wangyangwang avatar

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.