Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pypcd/numpy_pc2.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def pointcloud2_to_array(cloud_msg, split_rgb=False, remove_padding=True):
dtype_list = pointcloud2_to_dtype(cloud_msg)

# parse the cloud into an array
cloud_arr = np.fromstring(cloud_msg.data, dtype_list)
cloud_arr = np.fromstring(cloud_msg.data.tobytes(), dtype_list)

# remove the dummy fields that were added
if remove_padding:
Expand Down
2 changes: 1 addition & 1 deletion pypcd/pypcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
HAS_SENSOR_MSGS = True
try:
from sensor_msgs.msg import PointField
import numpy_pc2 # needs sensor_msgs
from . import numpy_pc2 # needs sensor_msgs
except ImportError:
HAS_SENSOR_MSGS = False

Expand Down