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: SetColor argument 1: expected a sequence of 3 values, got 87749 values #44

Open
guanjinglu opened this issue Jan 30, 2024 · 1 comment

Comments

@guanjinglu
Copy link

大佬您好,我在使用以下命令进行Lidar仿真时出现了报错TypeError: SetColor argument 1: expected a sequence of 3 values, got 87749 values

python code_single/tools/render.py --resume_dir logs/streetsurf/seg100613.withmask_withlidar_exp1/ --no_cam --render_lidar --lidar_model=original_reren --lidar_id=lidar_TOP --lidar_forward_inv_s=64000.0

具体报错信息如下:

2024-01-30 09:49:16,044-rk0-render.py#169:=> args.stop_frame is set to 163
2024-01-30 09:49:16,132-rk0-render.py#537:Start [replay], ds=1.0, in logs/streetsurf/seg100613.withmask_withlidar_exp1/
rendering frames...:   0%|                                                                                           | 0/163 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "code_single/tools/render.py", line 812, in <module>
    main_function(bc.parse())
  File "code_single/tools/render.py", line 549, in main_function
    im = render_pcl(scene, frame_ind)
  File "code_single/tools/render.py", line 395, in render_pcl
    pcl_pred = vedo.Points(lidar_pts_np, c=lidar_vis_rgba, r=args.lidar_vis_radius)
  File "/usr/local/lib/python3.8/dist-packages/vedo/pointcloud.py", line 610, in __init__
    self.properties.SetColor(colors.get_color(c))
TypeError: SetColor argument 1: expected a sequence of 3 values, got 87749 values

根据终端的提示,好象是在pcl_pred = vedo.Points(lidar_pts_np, c=lidar_vis_rgba, r=args.lidar_vis_radius)这一步中,vedo库中的函数接口与代码中的输入之间出现了不适配的情况,在将我的vedo更新到最新版本后依然会存在该问题,如果将代码中可视化相关的代码直接注释则会出现Aborted (core dumped)问题,所以:

(1)想请教一下大佬之前是否遇到过类似的问题,给我提供一些排查错误的思路

(2)或者能否提供一下您的代码环境,目前我的环境是torch1.11.0+cu113python3.8vedo=2023.5.0

(3)另,我目前使用的是Docker环境,不知道是否存在影响

期待大佬空闲的时候能帮忙解答一下,十分感谢!

@guanjinglu
Copy link
Author

更换了vedo的版本为vedo==v2023.4.3,解决了TypeError: SetColor argument 1: expected a sequence of 3 values, got 87749 values问题。

但是在进入到函数pcl_im = plt_lidar.topicture().tonumpy()后出现了Aborted (core dumped)错误,使用gdb调试出现一堆和vtk相关的内容:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007fb2f508c859 in __GI_abort () at abort.c:79
#2  0x00007fb11bbe5705 in vtkXOpenGLRenderWindow::CreateAWindow() () from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkRenderingOpenGL2-9.3.so
#3  0x00007fb11bbe1853 in vtkXOpenGLRenderWindow::WindowInitialize() () from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkRenderingOpenGL2-9.3.so
#4  0x00007fb11bbe7466 in vtkXOpenGLRenderWindow::Start() () from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkRenderingOpenGL2-9.3.so
#5  0x00007fb11d98f145 in vtkRenderWindow::Render() () from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkRenderingCore-9.3.so
#6  0x00007fb11bb37cba in vtkOpenGLRenderWindow::Render() () from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkRenderingOpenGL2-9.3.so
#7  0x00007fb11bbe7a20 in vtkXOpenGLRenderWindow::Render() () from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkRenderingOpenGL2-9.3.so
#8  0x00007fb11d9c9a5b in vtkWindowToImageFilter::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()
   from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkRenderingCore-9.3.so
#9  0x00007fb11d9ca731 in vtkWindowToImageFilter::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()
   from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkRenderingCore-9.3.so
#10 0x00007fb120a30e23 in vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) ()
   from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkCommonExecutionModel-9.3.so
#11 0x00007fb120a28f59 in vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()
   from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkCommonExecutionModel-9.3.so
#12 0x00007fb120a259a9 in vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()
   from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkCommonExecutionModel-9.3.so
#13 0x00007fb120a2cc17 in vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()
   from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkCommonExecutionModel-9.3.so
#14 0x00007fb120a6fd05 in vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()
   from /usr/local/lib/python3.8/dist-packages/vtkmodules/libvtkCommonExecutionModel-9.3.so

所以想到报错是不是和vtk的版本相关?大佬看到后能否提供一下相关的版本让我参考一下?十分感谢!

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