Fix units in Lidar measurements and settings

This commit is contained in:
nsubiron 2018-03-21 11:06:13 +01:00
parent 16546ebdcf
commit 013600803d
4 changed files with 7 additions and 6 deletions

View File

@ -121,7 +121,7 @@ class Lidar(Sensor):
def __init__(self, name, **kwargs):
super(Lidar, self).__init__(name, sensor_type="LIDAR_RAY_CAST")
self.Channels = 32
self.Range = 5000.0
self.Range = 50.0
self.PointsPerSecond = 56000
self.RotationFrequency = 10.0
self.UpperFovLimit = 10.0

View File

@ -76,7 +76,7 @@ def run_carla_client(args):
lidar.set_rotation(0, 0, 0)
lidar.set(
Channels=32,
Range=5000,
Range=50,
PointsPerSecond=100000,
RotationFrequency=10,
UpperFovLimit=10,

View File

@ -321,7 +321,7 @@ class CarlaGame(object):
if self._lidar_measurement is not None:
lidar_data = np.array(self._lidar_measurement.data[:, :2])
lidar_data /= 50.0
lidar_data *= 2.0
lidar_data += 100.0
lidar_data = np.fabs(lidar_data)
lidar_data = lidar_data.astype(np.int32)

View File

@ -75,9 +75,10 @@ public:
{
check(Header[1] > Channel);
Header[2u + Channel] += 1u;
Points.Emplace(Point.X);
Points.Emplace(Point.Y);
Points.Emplace(Point.Z);
constexpr float TO_METERS = 1e-2f;
Points.Emplace(TO_METERS * Point.X);
Points.Emplace(TO_METERS * Point.Y);
Points.Emplace(TO_METERS * Point.Z);
}
FSensorDataView GetView() const