12 Replies Latest reply on Oct 30, 2018 1:18 AM by FlavG

    Getting pointcloud from D435




      I'm curretnly trying to save a pointcloud from a D435 camera using the pyrealsense2 lib on Windows. I'm using basically the code from the exemple :


              frames = pipeline.wait_for_frames()

              depth_frame = frames.get_depth_frame()

              color_frame = frames.get_color_frame()

              points = rs.points

              pc = rs.pointcloud


              points = pc.calculate(depth_frame)

              print("Saving to 1.ply...")

              points.export_to_ply("1.ply", color_frame)



      But everytime I try to use it it gets me this error :


           TypeError('map_to(): incompatible function arguments. The following argument types are supported:\n    1. (self: pyrealsense2.pointcloud, mapped: pyrealsense2.frame) -> None\n\nInvoked with:      <pyrealsense2.video_frame object at 0x0BAF3400>')


      Does anyone have any idea where this error comes from ?