From 3e1984f6988b1fc45709556885571e47420f78a3 Mon Sep 17 00:00:00 2001 From: sorensenmarius <44672083+sorensenmarius@users.noreply.github.com> Date: Sun, 2 Feb 2020 15:20:29 +0100 Subject: [PATCH] Fix for distance sensors --- PythonClient/airsim/client.py | 2 +- PythonClient/airsim/types.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/PythonClient/airsim/client.py b/PythonClient/airsim/client.py index fe141d3802..d3628d30ab 100644 --- a/PythonClient/airsim/client.py +++ b/PythonClient/airsim/client.py @@ -156,7 +156,7 @@ def getMagnetometerData(self, magnetometer_name = '', vehicle_name = ''): def getGpsData(self, gps_name = '', vehicle_name = ''): return GpsData.from_msgpack(self.client.call('getGpsData', gps_name, vehicle_name)) - def getDistanceSensorData(self, lidar_name = '', vehicle_name = ''): + def getDistanceSensorData(self, distance_sensor_name = '', vehicle_name = ''): return DistanceSensorData.from_msgpack(self.client.call('getDistanceSensorData', distance_sensor_name, vehicle_name)) def getLidarData(self, lidar_name = '', vehicle_name = ''): diff --git a/PythonClient/airsim/types.py b/PythonClient/airsim/types.py index bf2883ba44..6bbbcfbae4 100644 --- a/PythonClient/airsim/types.py +++ b/PythonClient/airsim/types.py @@ -396,4 +396,11 @@ class GnssReport(MsgpackMixin): class GpsData(MsgpackMixin): time_stamp = np.uint64(0) gnss = GnssReport() - is_valid = False \ No newline at end of file + is_valid = False + +class DistanceSensorData(MsgpackMixin): + time_stamp = np.uint64(0) + distance = Quaternionr() + min_distance = Quaternionr() + max_distance = Quaternionr() + relative_pose = Pose() \ No newline at end of file