Giter Site home page Giter Site logo

pyurg's Introduction

pyURG

python program to use URG sensor (HOKUYO) which is connected through USB

How to install

install python-serial

sudo pip install python-serial

How to use

Import

from pyURG import serial_URG
URG1 = serial_URG("/dev/ttyACM0", 900000)

Init timestamp (Optional)

matching timestamp precisely

URG1.init_timestamp2()

Simple one

URG1.init_timestamp()

Single capture

xyz_GDGS, tm_GDGS = URG1.capture_GDGS(byte=3)

xyz_GDGS[n]: xyz value of a point. (z=0)
tm_GDGS[n] : the time when xyz_GDGS[n] is captured.

Multiple capture

xyz_MDMS, tm_MDMS = URG1.capture_MDMS(byte=3, interval = 4, num_scans = 10)

m: scan
n: step
xyz_MDMS[m][n]: xyz value of a point. (z=0)
tm_MDMS[m][n] : the time when xyz_MDMS[m][n] is captured.

Setting

MODE = 1
URG1.change_measure_mode(MODE)

MODE: 0 -> Normal sensitive mode
MODE: 1 -> High sensitive mode


SPEED_PARAM = 10
URG1.adjust_motor_speed(SPEED_PARAM)

SPEED_PARAM: 0 -> Default speed
SPEED_PARAM: 1 to 10 -> Changes speed to different levels
SPEED_PARAM: 99 -> Reset to initial speed

pyurg's People

Contributors

mtaki91 avatar

Stargazers

Dongwoo Koo avatar Siyou Pei avatar

Watchers

 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.