Skip to content
New issue

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

TypeError: 'generator' object has no attribute '__getitem__' #4

Open
keishatsai opened this issue Jan 17, 2018 · 1 comment
Open

TypeError: 'generator' object has no attribute '__getitem__' #4

keishatsai opened this issue Jan 17, 2018 · 1 comment

Comments

@keishatsai
Copy link

Hi,
Here is what I have encountered when I run the code which you provided "Project 3D Velodyne points to 2D camera Image ", I got error message.
I put the code you provided in ipython notebook inside one file called, "projectVelo.py", and I only changed the path to velodyne and image file.

Here is the error message:

Traceback (most recent call last):
File "projectVelo.py", line 60, in
img, pnt, c_ = res.velo_projection_frame(v_fov=v_fov, h_fov=h_fov)
File "/home/keisha_tsai/Downloads/KITTI_Tutorial-master/kitti_foundation.py", line 611, in velo_projection_frame
res, c_ = self.__velo_2_img_projection(velo_gen)
File "/home/keisha_tsai/Downloads/KITTI_Tutorial-master/kitti_foundation.py", line 486, in _velo_2_img_projection
xyz_v, c
= self.__point_matrix(points)
File "/home/keisha_tsai/Downloads/KITTI_Tutorial-master/kitti_foundation.py", line 305, in __point_matrix
self.__points_filter(points)
File "/home/keisha_tsai/Downloads/KITTI_Tutorial-master/kitti_foundation.py", line 368, in __points_filter
self.__upload_points(points)
File "/home/keisha_tsai/Downloads/KITTI_Tutorial-master/kitti_foundation.py", line 296, in __upload_points
self.__x = points[:, 0]
TypeError: 'generator' object has no attribute 'getitem'

Hope anyone can help me to solve this problem.
Thank you.

@keishatsai
Copy link
Author

keishatsai commented Jan 18, 2018

The problem didn't occur when I used the code which provided in "velo2cam_projection_detail.ipynb".
Still don't know why, but at least I can get the proper result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant