We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i'm trying to convert the point cloud results into a kitti dataset .bin file and for some reason it's returning me a error when running the test:
TypeError: tuple indices must be integers or slices, not str #21
TypeError: tuple indices must be integers or slices, not str
convertion code:
class MinimalSubscriber(Node): def __init__(self): super().__init__('minimal_subscriber') self.subscription = self.create_subscription( PointCloud2, 'velodyne_points', self.listener_callback, 10) def convert_pointcloud(self, msg): pc = pc2.read_points(msg, field_names=("x", "y", "z", "intensity"), skip_nans=True) pc = np.array(list(pc), dtype=np.float32) x = pc[:, 0] y = pc[:, 1] z = pc[:, 2] intensity = pc[:, 3] arr = np.zeros(x.shape[0] * 4, dtype=np.float32) arr[::4] = x arr[1::4] = y arr[2::4] = z arr[3::4] = intensity bin_file_name = 'point_cloud_data.bin' with open(bin_file_name, 'wb') as f: arr.tofile(f) def listener_callback(self, msg): self.convert_pointcloud(msg)
To resolve the error above, i removed the following line in test.py:
#model.eval() #48
#model.eval()
After this, the inference worked and displayed the window with the detected objects. But, all the point cloud is showing in white.
Thank you in advance.
The text was updated successfully, but these errors were encountered:
I'm facing the same problem.
Sorry, something went wrong.
No branches or pull requests
i'm trying to convert the point cloud results into a kitti dataset .bin file and for some reason it's returning me a error when running the test:
TypeError: tuple indices must be integers or slices, not str
#21convertion code:
To resolve the error above, i removed the following line in test.py:
#model.eval()
#48After this, the inference worked and displayed the window with the detected objects. But, all the point cloud is showing in white.
What am i doing wrong? Do you guys have any idea?
Thank you in advance.
The text was updated successfully, but these errors were encountered: