Lidar#
#include "navground/sim/state_estimations/sensor_lidar.h"
A distance scanner.
Registered properties:
range
(float, get_range)start_angle
(float, get_start_angle)field_of_view
(float, get_field_of_view)resolution
(float, get_resolution)position
(Vector2, get_position)error_bias
(float, get_error_bias)error_std_dev
(float, get_error_std_dev)
Public Functions
Reads a scan from a core::SensingState.
Call read_scan_with_name, passing Sensor::get_name.
- Parameters:
state – The state
- Returns:
A scan or null if none was found.
Constructs a new instance.
- Parameters:
range – [in] The maximal range of the sensor
start_angle – [in] The starting angle
field_of_view – [in] The field of view
resolution – [in] The number of ranging measurements per scan
position – [in] The position of the sensor with respect to the agent origin.
error_bias – [in] The systematic error for all rangings.
error_std_dev – [in] The rangings error standard deviation.
name – [in] The name to use as a prefix
Sets the range of view.
- Parameters:
value – [in] The new value
Gets the range of view.
- Returns:
The range of view.
Sets the range of view.
- Parameters:
value – [in] The new value
Gets the range of view.
- Returns:
The range of view.
Sets the range of view.
- Parameters:
value – [in] The new value
Gets the range of view.
- Returns:
The range of view.
Sets the error bias, i.e., the systematic error for all rangings.
- Parameters:
value – [in] The new value
Gets the error bias, i.e., the systematic error for all rangings.
- Returns:
The error.
Sets the rangings error standard deviation.
- Parameters:
value – [in] The positive value
Gets the rangings error standard deviation.
- Returns:
The error.
Sets the range of view.
- Parameters:
value – [in] The new value
Gets the range of view.
- Returns:
The range of view.
Sets the position of the sensor with respect to the agent origin.
- Parameters:
value – [in] The new value
Gets the position of the sensor with respect to the agent origin.
- Returns:
The position.
Gets the angular increment between rays.
- Returns:
The angular increment.
Gets the ray angles.
- Returns:
The angles.
Compute ranges assuming the sensor is attached to an agent.
- Parameters:
agent – The agent
world – The world
- Returns:
The array of ranges
Reads the ranges stored in a sensing state.
Calls read_ranges_with_name, passing Sensor::get_name.
- Parameters:
state – The state
- Returns:
The array of ranges
Whether the Lidar is affected by errors.
- Returns:
True if affected by errors.
Public Static Functions
Reads a scan from a core::SensingState.
- Parameters:
state – The state
name – [in] The namespace of the scan
- Returns:
A scan or null if none was found.
Calculates the angular increment.
- Parameters:
field_of_view – [in] The field of view
resolution – [in] The resolution
- Returns:
The angular increment.
Calculates the angles of a scan.
- Parameters:
start – [in] The starting angle in radians
field_of_view – [in] The field of view in radians
resolution – [in] The number of ranging measurements.
- Returns:
The angles in radians
Reads a ranges stored in a sensing state.
- Parameters:
state – The state
name – [in] The namespace of the ranges
- Returns:
An array of ranges or null if none were found.
Public Static Attributes
The default range
The default start angle [radians]
The default field of view [radians]
The default resolution
The default error bias
The default error standard deviation
The name of the buffer set by the sensor
Holds a Lidar scan.
Public Functions
Gets the angular increment between consecutive ranging.
- Returns:
The angular increment in radians.
Gets the angles of the ranging measurements.
- Returns:
The angles in radians
Public Members
The range readings.
The starting angle
The field of view
The maximal range