We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d403f8 commit 3710025Copy full SHA for 3710025
formant_ros2_adapter/scripts/message_utils/utils.py
@@ -21,7 +21,7 @@
21
np.float32: float,
22
np.float64: float,
23
bool_type: bool,
24
- bool:bool,
+ bool: bool,
25
}
26
27
@@ -36,13 +36,16 @@ def get_ros2_type_from_string(message_type_string: str):
36
return getattr(module, path[-1])
37
except Exception as e:
38
print(
39
- "WARNING: Couldn't import ROS2 message type from string: %s %s" %
40
- (message_type_string, str(e)),
+ "WARNING: Couldn't import ROS2 message type from string: %s %s"
+ % (message_type_string, str(e)),
41
)
42
return None
43
44
45
def parse(m):
46
+ if type(m) == float:
47
+ if float(m) != float(m):
48
+ return None
49
if type(m) in [bool, str, int, float]:
50
return m
51
elif type(m) == bytes:
0 commit comments