M-File Help: Sensor

M-File Help: Sensor | View code for Sensor

# Sensor

Sensor superclass

A superclass to represent robot navigation sensors.

## Methods

plot | plot a line from robot to map feature
display | print the parameters in human readable form
char | convert to string

## Properties

robot | The Vehicle object on which the sensor is mounted
map | The Map object representing the landmarks around the robot

## Reference

Robotics, Vision & Control, Peter Corke, Springer 2011

## See also

rangebearing, EKF, Vehicle, Map

# Sensor.Sensor

Sensor object constructor

s = Sensor(vehicle, map, options) is a sensor mounted on a vehicle described by the Vehicle class object vehicle and observing landmarks in a map described by the Map class object map.

## Options

'animate' | animate the action of the laser scanner
'ls', LS | laser scan lines drawn with style ls (default 'r-')
'skip', I | return a valid reading on every I'th call
'fail', T | sensor simulates failure between timesteps T=[TMIN,TMAX]

# Sensor.char

Convert sensor parameters to a string

s = S.char() is a string showing sensor parameters in a compact human readable format.

# Sensor.display

Display status of sensor object

S.display() displays the state of the sensor object in human-readable form.

## Notes

- This method is invoked implicitly at the command line when the result of an expression is a Sensor object and the command has no trailing semicolon.

## See also

Sensor.char

# Sensor.plot

Plot sensor reading

S.plot(J) draws a line from the robot to the J'th map feature.

## Notes

- The line is drawn using the linestyle given by the property ls
- There is a delay given by the property delay

© 1990-2014 Peter Corke.