Skip to content

Commit 0700f2d

Browse files
authored
Merge pull request #410 from carla-simulator/fix_lidar_noetic
Fix lidar parsing in noetic
2 parents 9311dd8 + 5e9802a commit 0700f2d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

carla_ros_bridge/src/carla_ros_bridge/lidar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def sensor_data_updated(self, carla_lidar_measurement):
6666
]
6767

6868
lidar_data = numpy.fromstring(
69-
carla_lidar_measurement.raw_data, dtype=numpy.float32)
69+
bytes(carla_lidar_measurement.raw_data), dtype=numpy.float32)
7070
lidar_data = numpy.reshape(
7171
lidar_data, (int(lidar_data.shape[0] / 4), 4))
7272
# we take the oposite of y axis
@@ -123,7 +123,7 @@ def sensor_data_updated(self, carla_lidar_measurement):
123123
PointField('ObjTag', 20, PointField.UINT32, 1),
124124
]
125125

126-
lidar_data = numpy.fromstring(carla_lidar_measurement.raw_data,
126+
lidar_data = numpy.fromstring(bytes(carla_lidar_measurement.raw_data),
127127
dtype=numpy.dtype([
128128
('x', numpy.float32),
129129
('y', numpy.float32),

carla_ros_scenario_runner/src/carla_ros_scenario_runner/carla_ros_scenario_runner.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@
2626
try:
2727
import carla # pylint: disable=unused-import
2828
except ImportError:
29-
print "ERROR: CARLA Python Egg not available. Please add \
29+
print("ERROR: CARLA Python Egg not available. Please add \
3030
<CARLA_DIR>/PythonAPI/carla/dist/carla-<CARLA_VERSION>-\
31-
py<PYTHON_VERSION>-linux-x86_64.egg to your PYTHONPATH."
31+
py<PYTHON_VERSION>-linux-x86_64.egg to your PYTHONPATH.")
3232
sys.exit(1)
3333

3434
try:
3535
from agents.navigation.local_planner import LocalPlanner # pylint: disable=unused-import
3636
except ImportError:
37-
print "ERROR: CARLA Python Agents not available. \
38-
Please add <CARLA_DIR>/PythonAPI/carla to your PYTHONPATH."
37+
print("ERROR: CARLA Python Agents not available. \
38+
Please add <CARLA_DIR>/PythonAPI/carla to your PYTHONPATH.")
3939
sys.exit(1)
4040

4141

0 commit comments

Comments
 (0)