tudelft-iv / multi_sensor_calibration

487 stars 105 forks source link

Error when calling optimize service #32

Open Rob5200 opened 2 years ago

Rob5200 commented 2 years ago

Hi, i'm currently working on a lidar, radar, mono camera setup, with a different sensors. I have changed the detectors so the sensor interfaced correctly. Now i'm trying to run the optimization service but I get an error. I've even tried it with the example data and still the same error. I didn't change the accumulator node or the optimization node.

[ERROR] [1639657543.349869500]: Service call failed: service [/optimizer/optimize] responded with an error: error processing request: local variable 'Tms' referenced before assignment [ERROR] [1639657543.350367300]: Failed to call service to optimize on '/optimizer/optimize'.

I didn't change the accumulator node or the optimization node. So i guess it should work fine. Can somebody please point me in the right direction?

Rob5200 commented 2 years ago

I've had another look at it. The probleem seems to be in the 257th line of the MCPE.py file.
T = compute_transformation_matrix(Xcenter[:, current_sensor.mu], pcl_radar, Tm, self.assignment, 1)

In this function, another function is called which calculates the centroid but the input of this function (in my case a value 33, can not be reshaped to an double array.

X_centroid = np.reshape(np.mean(np.reshape(X, (-1, nr_detections_board)), axis=1), (3, -1)) -- with nr_detections_board is 4