Skip to content

Commit c5ed97d

Browse files
authored
Merge pull request #1470 from bmalhigh/hotfix/linuxbuild
Fix for build issues on Ubuntu with UE4.18
2 parents a28894c + 12b1740 commit c5ed97d

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

AirLib/include/api/VehicleApiBase.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class VehicleApiBase : public UpdatableObject {
8686
//get reading from RC bound to vehicle (if unsupported then RCData::is_valid = false)
8787
virtual RCData getRCData() const
8888
{
89-
static const RCData invalid_rc_data;
89+
static const RCData invalid_rc_data {};
9090
return invalid_rc_data;
9191
}
9292
//set external RC data to vehicle (if unsupported then returns false)

AirLib/include/common/VectorMath.hpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,15 @@ class VectorMathT {
185185

186186
static QuaternionT rotateQuaternion(const QuaternionT& q, const QuaternionT& ref, bool assume_unit_quat)
187187
{
188-
QuaternionT ref_n = assume_unit_quat ? ref : ref.normalized();
189-
QuaternionT ref_n_i = assume_unit_quat ? ref.conjugate() : ref.inverse();
190-
return ref_n * q * ref_n_i;
188+
if (assume_unit_quat) {
189+
QuaternionT ref_n = ref;
190+
QuaternionT ref_n_i = ref.conjugate();
191+
return ref_n * q * ref_n_i;
192+
} else {
193+
QuaternionT ref_n = ref.normalized();
194+
QuaternionT ref_n_i = ref.inverse();
195+
return ref_n * q * ref_n_i;
196+
}
191197
}
192198

193199
static QuaternionT rotateQuaternionReverse(const QuaternionT& q, const QuaternionT& ref, bool assume_unit_quat)

AirLib/include/common/common_utils/Utils.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,21 @@ class Utils {
131131
}
132132

133133
template <template<class, class, class...> class TContainer, typename TKey, typename TVal, typename... Args>
134-
static const TVal& findOrDefault(const TContainer<TKey, TVal, Args...>& m, TKey const& key, const TVal& default_val = TVal())
134+
static const TVal& findOrDefault(const TContainer<TKey, TVal, Args...>& m, TKey const& key, const TVal& default_val)
135135
{
136136
typename TContainer<TKey, TVal, Args...>::const_iterator it = m.find(key);
137137
if (it == m.end())
138138
return default_val;
139139
return it->second;
140140
}
141141

142+
template <template<class, class, class...> class TContainer, typename TKey, typename TVal, typename... Args>
143+
static const TVal& findOrDefault(const TContainer<TKey, TVal, Args...>& m, TKey const& key)
144+
{
145+
static TVal default_val;
146+
return findOrDefault(m, key, default_val);
147+
}
148+
142149
static Logger* getSetLogger(Logger* logger = nullptr)
143150
{
144151
static Logger logger_default_;

Unreal/Plugins/AirSim/Source/UnrealSensors/UnrealLidarSensor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "common/Common.hpp"
77
#include "GameFramework/Actor.h"
8-
#include "sensors/Lidar/LidarSimple.hpp"
8+
#include "sensors/lidar/LidarSimple.hpp"
99
#include "NedTransform.h"
1010

1111
// UnrealLidarSensor implementation that uses Ray Tracing in Unreal.

0 commit comments

Comments
 (0)