davidcaron / pclpy

Python bindings for the Point Cloud Library (PCL)
MIT License
427 stars 59 forks source link

PCLVisualizer.addCorrespondences not working in pclpy #45

Open hutaocheng opened 5 years ago

hutaocheng commented 5 years ago

`def plot_onto(ptrX, ptrY, onto): try:

1. visualizer

    visualizer = pcl.visualization.PCLVisualizer()
    # 2. show the source and the destination cloud
    visualizer.addPointCloud(ptrX, pcl.visualization.PointCloudColorHandlerCustom.PointXYZ(ptrX, 0., 1., 0.))
    # visualizer.addPointCloud(ptrY, pcl.visualization.PointCloudColorHandlerCustom.PointXYZ(1., 1., 1.))
    ## 3. add colored lines between source and destination cloud
    **visualizer.addCorrespondences(ptrX, ptrY, onto)** #this line leads to a system crash
    # 4. flush to the screen
    visualizer.spin() #visualizer.spinOnce(1000) #

except Exception as excpt:
    print(excpt)`