filtering
BoxFilter
A class composes multiple filtering functions.
Construct a new object.
Parameters:
-
params
(FilterParams
) –Filtering parameters.
-
tf_buffer
(TransformBuffer
) –Transformation buffer.
FilterByLabel
Filter a box by checking if the label of the box is included in specified labels.
Note that, if labels
is None all boxes pass through this filter.
Construct a new object.
Parameters:
-
labels
(Sequence[str | SemanticLabel] | None
, default:None
) –Sequence of target labels. If
None
, this filter always returnsTrue
.
FilterByUUID
Filter a box by checking if the uuid of the box is included in specified uuids.
Note that, if uuids
is None all boxes pass through this filter.
Construct a new object.
Parameters:
-
uuids
(Sequence[str] | None
, default:None
) –Sequence of target uuids. If
None
, this filter always returnsTrue
.
FilterByDistance
Filter a box by checking if the box is within the specified distance.
Note that, the type box is Box2D
and its position
is None,
these boxes pass through this filter.
Construct a new object.
Parameters:
-
min_distance
(float
) –Minimum distance from the ego [m].
-
max_distance
(float
) –Maximum distance from the ego [m].
FilterByPosition
Filter a box by checking if the box xy position is within the specified xy position.
Note that, the type box is Box2D
and its position
is None,
these boxes pass through this filter.
Construct a new object.
Parameters:
-
min_xy
(tuple[float, float]
) –Minimum xy position [m].
-
max_xy
(tuple[float, float]
) –Maximum xy position [m].
FilterBySpeed
Filter a 3D box by checking if the box speed is within the specified one.
Note that, the type box is Box2D
, or Box3D
and its velocity
is None,
these boxes pass through this filter.
Construct a new object.
Parameters:
-
min_speed
(float
) –Minimum speed [m/s].
-
max_speed
(float
) –Maximum speed [m/s].
FilterByNumPoints
Filter a 3D box by checking if the box includes points greater than the specified one.
Note that, the type box is Box2D
, or Box3D
and its num_points
is None,
these boxes pass through this filter.
Construct a new object.
Parameters:
-
min_num_points
(int
, default:0
) –The minimum number of points that a box should include.
FilterParams
A dataclass to represent filtering parameters.
Attributes:
-
labels
(Sequence[str | SemanticLabel] | None
) –Sequence of target labels.
-
uuids
(Sequence[str] | None
) –Sequence of target uuids.
-
min_distance
(float
) –Minimum distance from the ego [m].
-
max_distance
(float
) –Maximum distance from the ego [m].
-
min_xy
(tuple[float, float]
) –Minimum xy position from the ego [m].
-
min_xy
(tuple[float, float]
) –Maximum xy position from the ego [m].
-
min_speed
(float
) –Minimum speed [m/s].
-
max_speed
(float
) –Maximum speed [m/s].
-
min_num_points
(int
) –The minimum number of points which the 3D box should include.