Skip to content

LiDAR localization filters scan and reference heights in different frames #45

Description

@Murdism

Localization applies the same Z limits to the live scan in body coordinates and the initial reference scan in map coordinates. This can select different points or crash when the reference filter removes everything.
Example:
With height limits [-1.5, 2.0], a valid scan containing points at body z=0 passes. If the vehicle’s map elevation is z=10, those points become map z=10 and fail the reference filter. _squash() returns None, and subsampling raises TypeError

        if perception_model is not None:
            self.perception_model = perception_model
        if sensors is None:
            return
        scan = self._squash(sensors.lidar_sensor.to_base(sensors.lidar))  # lidar → ego body frame
        .
        .
        .
  
        if self._map is None:
            self._x = float(ego.x)
            self._y = float(ego.y)
            self._theta = float(ego.theta)
            self._map = **self._squash(sensors.lidar_sensor.to_map(sensors.lidar, ego))[:: self._map_subsample]**
            return

Filter once in body coordinates/map, then transform those accepted points into the desired frame.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions