Zillaynain / autoware_mini_practice

MIT License
0 stars 0 forks source link

practice 5 - points_clusterer.py - comments #8

Closed geopimik closed 4 months ago

geopimik commented 4 months ago

You should initialize DBSCAN in init and setting params in callback is not necessary! https://github.com/Zillaynain/autoware_mini_practice/blob/5a3fb5548f149fbd957bacad174efd37e01fe563/practice_5/nodes/detection/lidar_cluster/points_clusterer.py#L30

I'm getting an error when running the code:

Traceback (most recent call last):
  File "/home/edgar/aw_mini_pr_github/src/practice_5/nodes/detection/lidar_cluster/points_clusterer.py", line 55, in <module>
    node = PointsCluster()
  File "/home/edgar/aw_mini_pr_github/src/practice_5/nodes/detection/lidar_cluster/points_clusterer.py", line 23, in __init__
    self.cluster = DBSCAN(self.min_cluster_size, self.cluster_epsilon)
TypeError: __init__() takes from 1 to 2 positional arguments but 3 were given

I guess the fault is in that line: https://github.com/Zillaynain/autoware_mini_practice/blob/5a3fb5548f149fbd957bacad174efd37e01fe563/practice_5/nodes/detection/lidar_cluster/points_clusterer.py#L23

If I add param names eps= and min_samples= then it worked.

Zillaynain commented 4 months ago

Please check

geopimik commented 4 months ago

ok