irsim.world.sensors.fmcw_lidar2d ================================ .. py:module:: irsim.world.sensors.fmcw_lidar2d .. autoapi-nested-parse:: Simplified 2D FMCW LiDAR with per-beam radial Doppler velocity. Classes ------- .. autoapisummary:: irsim.world.sensors.fmcw_lidar2d.FMCWLidar2D Module Contents --------------- .. py:class:: FMCWLidar2D(state: numpy.ndarray | None = None, obj_id: int = 0, motion_compensate: bool = False, velocity_noise_std: float = 0.0, **kwargs) Bases: :py:obj:`irsim.world.sensors.lidar2d.Lidar2D` Simulate a 2D FMCW LiDAR using ray intersections plus Doppler projection. This sensor keeps the geometric scanning model of :class:`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: :param motion_compensate: When ``False``, report target velocity relative to the sensor motion. When ``True``, remove the ego sensor motion and report world-frame radial target velocity. :type motion_compensate: bool :param velocity_noise_std: Standard deviation of Gaussian noise applied to radial velocity measurements. :type velocity_noise_std: float :param velocity_color: Whether to color beams by radial velocity when plotting. :type velocity_color: bool :param velocity_color_max: Magnitude at which the plotting color saturates. :type velocity_color_max: float :param velocity_linewidth: Line width for valid Doppler beams. :type velocity_linewidth: float :param no_hit_linewidth: Line width for beams without valid returns. :type no_hit_linewidth: float :param no_hit_alpha: Alpha for invalid beams in plots. :type no_hit_alpha: float :param show_velocity_markers: Whether to draw colored endpoint markers for valid returns. :type show_velocity_markers: bool :param velocity_marker_size: Scatter marker size for valid endpoints. :type velocity_marker_size: float :param zero_velocity_color: Plot color used near zero radial velocity. :type zero_velocity_color: str :param positive_velocity_color: Plot color used for positive radial velocity. :type positive_velocity_color: str :param negative_velocity_color: Plot color used for negative radial velocity. :type negative_velocity_color: str :param no_hit_color: Plot color used for invalid beams. :type no_hit_color: str Initialize the Lidar2D sensor. .. py:attribute:: sensor_type :value: 'fmcw_lidar2d' .. py:attribute:: motion_compensate :value: False .. py:attribute:: velocity_noise_std :value: 0.0 .. py:attribute:: velocity_color .. py:attribute:: velocity_color_max .. py:attribute:: velocity_linewidth .. py:attribute:: no_hit_linewidth .. py:attribute:: no_hit_alpha .. py:attribute:: show_velocity_markers .. py:attribute:: velocity_marker_size .. py:attribute:: velocity_marker_edge_color .. py:attribute:: velocity_marker_edge_width .. py:attribute:: zero_velocity_color .. py:attribute:: positive_velocity_color .. py:attribute:: negative_velocity_color .. py:attribute:: no_hit_color .. py:attribute:: radial_velocity .. py:attribute:: valid .. py:method:: step(state) Update ranges, validity flags, and radial velocities for every beam. .. py:method:: get_scan() 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``. :rtype: dict