distance and angle laser range finder "Hokuyo URG 04LX UG01"

Typically: "How do I... ", "How can I... " questions
Post Reply
ariyayi
Posts: 16
Joined: 05 May 2018, 13:25

distance and angle laser range finder "Hokuyo URG 04LX UG01"

Post by ariyayi »

hello,
I need distance and angle from obstacle in laser range finder("Hokuyo URG 04LX UG01")output. is it possible ?

fferri
Posts: 782
Joined: 09 Sep 2013, 19:28

Re: distance and angle laser range finder "Hokuyo URG 04LX UG01"

Post by fferri »

Given the coordinate of the sensor's origin (ox, oy, oz), the coordinate of the point (px, py, pz), and the sensor's axis (ax, ay, az), the distance is:

d= math.sqrt(math.pow(ox-px,2)+math.pow(oy-py,2)+math.pow(oz-pz,2))

the angle is:

a=math.acos((ox*(px-ax)+oy*(py-ay)+oz*(pz-az))/d)

Post Reply