publish point cloud with intensity
Durant35 opened this issue · 0 comments
Durant35 commented
Only contains XYZ
import sensor_msgs.point_cloud2 as pc2
def publish_point_clouds(publisher, points):
# Publish point clouds and bounding boxes
header = std_msgs.msg.Header()
header.stamp = rospy.Time.now()
header.frame_id = "velodyne"
# points.shape = (?, 4)
# points[:, :3] ==> (?, 0...2)
msg_points = pc2.create_cloud_xyz32(header, points[:, :3])
publisher.publish(msg_points)