Skip to content

Instantly share code, notes, and snippets.

@grass-s
grass-s / create_cloud_xyzrgb.py
Created March 8, 2024 05:34 — forked from lucasw/create_cloud_xyzrgb.py
Create PointCloud2 with python with rgb
#!/usr/bin/env python
# PointCloud2 color cube
# https://answers.ros.org/question/289576/understanding-the-bytes-in-a-pcl2-message/
import rospy
import struct
from sensor_msgs import point_cloud2
from sensor_msgs.msg import PointCloud2, PointField
from std_msgs.msg import Header