@@ -369,7 +369,11 @@ struct FromArrayPointsNode : IPointsNode, INoInputNode
369
369
void enqueueExecImpl () override {}
370
370
371
371
// Point cloud description
372
- bool isDense () const override { return false ; }
372
+ bool isDense () const override
373
+ {
374
+ // If point cloud doesn't contain IS_HIT field we assume all points are hits.
375
+ return !fieldData.contains (RGL_FIELD_IS_HIT_I32);
376
+ }
373
377
bool hasField (rgl_field_t field) const override { return fieldData.contains (field); }
374
378
size_t getWidth () const override { return width; }
375
379
size_t getHeight () const override { return 1 ; }
@@ -470,7 +474,8 @@ struct GaussianNoiseDistanceNode : IPointsNodeSingleInput
470
474
struct RadarPostprocessPointsNode : IPointsNodeSingleInput
471
475
{
472
476
using Ptr = std::shared_ptr<RadarPostprocessPointsNode>;
473
- void setParameters (float distanceSeparation, float azimuthSeparation, float rayAzimuthStepRad, float rayElevationStepRad,
477
+
478
+ void setParameters (const std::vector<rgl_radar_scope_t >& radarScopes, float rayAzimuthStepRad, float rayElevationStepRad,
474
479
float frequency);
475
480
476
481
// Node
@@ -494,32 +499,33 @@ struct RadarPostprocessPointsNode : IPointsNodeSingleInput
494
499
arrayMgr);
495
500
HostPinnedArray<Field<DISTANCE_F32>::type>::Ptr distanceInputHost = HostPinnedArray<Field<DISTANCE_F32>::type>::create();
496
501
HostPinnedArray<Field<AZIMUTH_F32>::type>::Ptr azimuthInputHost = HostPinnedArray<Field<AZIMUTH_F32>::type>::create();
502
+ HostPinnedArray<Field<RADIAL_SPEED_F32>::type>::Ptr radialSpeedInputHost =
503
+ HostPinnedArray<Field<RADIAL_SPEED_F32>::type>::create();
497
504
HostPinnedArray<Field<ELEVATION_F32>::type>::Ptr elevationInputHost = HostPinnedArray<Field<ELEVATION_F32>::type>::create();
498
505
DeviceAsyncArray<Vector<3 , thrust::complex <float >>>::Ptr outBUBRFactorDev =
499
506
DeviceAsyncArray<Vector<3 , thrust::complex <float >>>::create(arrayMgr);
500
507
HostPinnedArray<Vector<3 , thrust::complex <float >>>::Ptr outBUBRFactorHost =
501
508
HostPinnedArray<Vector<3 , thrust::complex <float >>>::create();
502
509
503
- float distanceSeparation;
504
- float azimuthSeparation;
505
510
float rayAzimuthStepRad;
506
511
float rayElevationStepRad;
507
512
float frequency;
508
513
514
+ std::vector<rgl_radar_scope_t > radarScopes;
509
515
510
516
// RGL related members
511
517
std::mutex getFieldDataMutex;
512
518
mutable CacheManager<rgl_field_t , IAnyArray::Ptr> cacheManager;
513
519
514
520
struct RadarCluster
515
521
{
516
- RadarCluster (Field<RAY_IDX_U32>::type index, float distance, float azimuth, float elevation);
522
+ RadarCluster (Field<RAY_IDX_U32>::type index, float distance, float azimuth, float radialSpeed, float elevation);
517
523
RadarCluster (RadarCluster&& other) noexcept = default ;
518
524
RadarCluster& operator =(RadarCluster&& other) noexcept = default ;
519
525
520
- void addPoint (Field<RAY_IDX_U32>::type index, float distance, float azimuth, float elevation);
521
- inline bool isCandidate (float distance, float azimuth, float distanceSeparation, float azimuthSeparation ) const ;
522
- inline bool canMergeWith (const RadarCluster& other, float distanceSeparation, float azimuthSeparation ) const ;
526
+ void addPoint (Field<RAY_IDX_U32>::type index, float distance, float azimuth, float radialSpeed, float elevation);
527
+ inline bool isCandidate (float distance, float azimuth, float radialSpeed, const rgl_radar_scope_t & separations ) const ;
528
+ inline bool canMergeWith (const RadarCluster& other, const std::vector< rgl_radar_scope_t >& radarScopes ) const ;
523
529
void takeIndicesFrom (RadarCluster&& other);
524
530
Field<RAY_IDX_U32>::type findDirectionalCenterIndex (const Field<AZIMUTH_F32>::type* azimuths,
525
531
const Field<ELEVATION_F32>::type* elevations) const ;
@@ -528,6 +534,7 @@ struct RadarPostprocessPointsNode : IPointsNodeSingleInput
528
534
std::vector<Field<RAY_IDX_U32>::type> indices;
529
535
Vector<2 , Field<DISTANCE_F32>::type> minMaxDistance;
530
536
Vector<2 , Field<AZIMUTH_F32>::type> minMaxAzimuth;
537
+ Vector<2 , Field<RADIAL_SPEED_F32>::type> minMaxRadialSpeed;
531
538
Vector<2 , Field<ELEVATION_F32>::type> minMaxElevation; // For finding directional center only
532
539
};
533
540
};
0 commit comments