Skip to content

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

@keishatsai

Description

@keishatsai

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions