Autoware.Auto
|
|
To properly separate concerns and make it easier to reuse data (i.e. prerecorded bag data, or from the simulator), we need to separate the transforming and filtering data from the drivers into separate nodes.
In particular, we require a boilerplate wrapper around our algorithm, which is implemented as a library called lidar_utils
. This boilerplate node wrapper allows us to communicate with the rest of Autoware.Auto.
There is one instance of these nodes for the PointCloud2 message type for visualization and open source support.
The following components are parts of the lidar_utils
package but they are used by the point_cloud_filter_transform
node to filter and transform the input point cloud data :
Filter class to check if a point is contained in a range defined by a minimum and maximum radii from the origin. Operates in the square forms to avoid using sqrt().
Filter class to check if a point lies within a range defined by minimum and maximum angles. The inclusion zone is defined by the range [start angle , end angle] in counter-clockwise direction. To avoid explicitly computing the angle using inverse trigonometric functions, the following scheme is used:
range_normal
is defined to be the unit vector placed in the median of the range.Applies a transform to given points. Uses the Eigen library during computations.
The point_cloud_filter_transform_node_exe
is a wrapper around the DistanceFilter
, AngleFilter
, and StaticTransformer
with the following executing order:
DistanceFilter
and AngleFilter
StaticTransformer
The implementation doesn't allow dynamic thresholds for distance and angle filters. It also doesn't support dynamic transformation during runtime. The thresholds and the transform parameters can only be loaded while constructing the nodes.
These nodes have the following basic structure:
Input:
PointCloud2
directly from driver nodes or the point_type_adapter node
)Output:
PointCloud2
)On top of this, the nodes can be configured either programmatically or via parameter file on construction.
Most error handling occurs inside rclcpp
.
The only explicit error handling that occurs in these nodes is catching errors in the runtime loop.
If such an error is caught, then the node will simply transition to a "failed state", log this fact, and attempt to continue running.
TBD by a security specialist.