Skip to content

Commit 73a3265

Browse files
updated message_to_json to handle NaN values
1 parent c114875 commit 73a3265

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

formant_ros2_adapter/scripts/ros2_utils/message_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def get_ros2_type_from_string(message_type_string: str):
4949

5050

5151
def parse(m):
52+
if type(m) == float:
53+
if float(m) != float(m):
54+
return None
5255
if type(m) in [bool, str, int, float]:
5356
return m
5457
elif type(m) == bytes:

0 commit comments

Comments
 (0)