Closed hitbuyi closed 1 month ago
@hitbuyi The first version calls addPointCloud
twice, the first time without the handler. The second call to addPointCloud
is ignored because the id "cloud" is the same. You actually get a warning from PCL:
[addPointCloud] The id <cloud> already exists! Please choose a different id and retry.
Please be aware that chatGPT often produces complete garbage. Do not blindly trust it, double check everything. We can not provide any support for chatGPT generated code.
@hitbuyi The first version calls
addPointCloud
twice, the first time without the handler. The second call toaddPointCloud
is ignored because the id "cloud" is the same. You actually get a warning from PCL:[addPointCloud] The id <cloud> already exists! Please choose a different id and retry.
Please be aware that chatGPT often produces complete garbage. Do not blindly trust it, double check everything. We can not provide any support for chatGPT generated code.
It solved my problem
I use chatGPT to generate PCL code on show, my task is very simple, to visualize a lidar cloud point,the color is according to lidar's intensity. Below two versions of code are generated by chatGPT, my enviroments are
v1: use pcl::visualization::PCLVisualizer::Ptr, it can display lidar points in white-black, without color
the result is![v1](https://github.com/PointCloudLibrary/pcl/assets/10301777/3cfa67dc-0b01-4283-8be3-1564539dd941)
v2: use,pcl::visualization::PCLVisualizer, it can display lidar points with color
the result is![v2](https://github.com/PointCloudLibrary/pcl/assets/10301777/62283077-d798-4d72-8668-61f6569386f2)
Why this happen? I think they are the same, just one use pointer, the other not.