Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions utils/voxel/ros2_voxel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import cv2
from cv_bridge import CvBridge

from sensor_msgs.msg import Image, PointCloud2, PointField
from sensor_msgs.msg import Image, PointCloud2, PointField, CameraInfo
from std_msgs.msg import Header
import sensor_msgs_py.point_cloud2 as pc2

Expand Down Expand Up @@ -67,7 +67,7 @@ def rgbd_to_pointcloud(self, rgb, depth):
points = []
h, w = depth.shape

for v in range(0, h, 4): #Skipping every 4 pixels to downsample, can change if nessary
for v in range(0, h, 4): #Skipping every 4 pixels to downsample, can change if necessary
for u in range(0, w, 4):
z = depth[v, u] / 1000.0

Expand Down