irsim.world.sensors.fmcw_lidar2d#

Simplified 2D FMCW LiDAR with per-beam radial Doppler velocity.

Classes#

FMCWLidar2D

Simulate a 2D FMCW LiDAR using ray intersections plus Doppler projection.

Module Contents#

class irsim.world.sensors.fmcw_lidar2d.FMCWLidar2D(state: numpy.ndarray | None = None, obj_id: int = 0, motion_compensate: bool = False, velocity_noise_std: float = 0.0, **kwargs)[source]#

Bases: irsim.world.sensors.lidar2d.Lidar2D

Simulate a 2D FMCW LiDAR using ray intersections plus Doppler projection.

This sensor keeps the geometric scanning model of Lidar2D but replaces the optional Cartesian target velocity output with a scalar radial velocity for each beam. The radial velocity is defined along the beam direction and can be reported either in the sensor-relative frame or motion-compensated to the world frame.

In addition to scan geometry parameters inherited from Lidar2D, this sensor accepts:

Parameters:
  • motion_compensate (bool) – When False, report target velocity relative to the sensor motion. When True, remove the ego sensor motion and report world-frame radial target velocity.

  • velocity_noise_std (float) – Standard deviation of Gaussian noise applied to radial velocity measurements.

  • velocity_color (bool) – Whether to color beams by radial velocity when plotting.

  • velocity_color_max (float) – Magnitude at which the plotting color saturates.

  • velocity_linewidth (float) – Line width for valid Doppler beams.

  • no_hit_linewidth (float) – Line width for beams without valid returns.

  • no_hit_alpha (float) – Alpha for invalid beams in plots.

  • show_velocity_markers (bool) – Whether to draw colored endpoint markers for valid returns.

  • velocity_marker_size (float) – Scatter marker size for valid endpoints.

  • zero_velocity_color (str) – Plot color used near zero radial velocity.

  • positive_velocity_color (str) – Plot color used for positive radial velocity.

  • negative_velocity_color (str) – Plot color used for negative radial velocity.

  • no_hit_color (str) – Plot color used for invalid beams.

Initialize the Lidar2D sensor.

sensor_type = 'fmcw_lidar2d'#
motion_compensate = False#
velocity_noise_std = 0.0#
velocity_color#
velocity_color_max#
velocity_linewidth#
no_hit_linewidth#
no_hit_alpha#
show_velocity_markers#
velocity_marker_size#
velocity_marker_edge_color#
velocity_marker_edge_width#
zero_velocity_color#
positive_velocity_color#
negative_velocity_color#
no_hit_color#
radial_velocity#
valid#
step(state)[source]#

Update ranges, validity flags, and radial velocities for every beam.

get_scan()[source]#

Get the FMCW scan with radial velocity and validity per beam.

Returns:

Scan dictionary containing the standard LiDAR angular metadata plus

ranges, radial_velocity, valid, and intensities=None.

Return type:

dict