irsim.world.sensors.fmcw_lidar2d#
Simplified 2D FMCW LiDAR with per-beam radial Doppler velocity.
Classes#
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.Lidar2DSimulate a 2D FMCW LiDAR using ray intersections plus Doppler projection.
This sensor keeps the geometric scanning model of
Lidar2Dbut 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. WhenTrue, 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#