MCPcopy Create free account
hub / github.com/OpenDriveLab/TCP / _parse_image_cb

Method _parse_image_cb

leaderboard/leaderboard/envs/sensor_interface.py:159–163  ·  view source on GitHub ↗
(self, image, tag)

Source from the content-addressed store, hash-verified

157
158 # Parsing CARLA physical Sensors
159 def _parse_image_cb(self, image, tag):
160 array = np.frombuffer(image.raw_data, dtype=np.dtype("uint8"))
161 array = copy.deepcopy(array)
162 array = np.reshape(array, (image.height, image.width, 4))
163 self._data_provider.update_sensor(tag, array, image.frame)
164
165 def _parse_lidar_cb(self, lidar_data, tag):
166 points = np.frombuffer(lidar_data.raw_data, dtype=np.dtype('f4'))

Callers 1

__call__Method · 0.95

Calls 1

update_sensorMethod · 0.45

Tested by

no test coverage detected