The following methods are provided to access the laser rangefinder readings:
(get-current-ranges-right (self <wheelchair-client>)) (get-current-ranges-left (self <wheelchair-client>))The functions above return a vector of
<sick-scan-points>
corresponding to the readings of the right and left laser respectively. The class <sick-scan-point>
is defined as follows:2.3
(define-class <sick-scan-point> (<object>) (theta-sick init-value: #f init-keyword: #f) (range-sick init-value: #f init-keyword: #f) (theta-robot init-value: #f init-keyword: #f) (range-robot init-value: #f init-keyword: #f))The methods below are used to convert a laser reading to the corresponding (x,y) coordinates the frame of reference of Vulcan.
(x-robot (self <sick-scan-point>)) (y-robot (self <sick-scan-point>))
Vulcan's frame of reference is such that the x-axis is ahead of the robot, the y-axis is to the left of the robot, and the angle increases counterclockwise (i.e negative angles to the right of the robot, positive angles to the left of the robot).
The methods below provide a simple interface to acquire readings in a specific angular sector (w.r.t. Vulcan's frame of reference).
(get-rangefinder-readings (self <wheelchair-client>) min-theta max-theta) (min-free-space (self <wheelchair-client>) min-theta max-theta)