Skip to content

Commit f8aaf59

Browse files
mrosseelclaude
andcommitted
fix: handle quaternion type in serialize_solution
The imu_quat field in the solution dict contains a quaternion object that is not JSON serializable, causing a crash when logging observations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dc39e11 commit f8aaf59

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

python/PiFinder/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ def serialize_solution(solution: dict) -> str:
3939

4040
if "numpy.float" in str(type(v)):
4141
v = float(v)
42+
43+
if "quaternion" in str(type(v)):
44+
v = list(v)
45+
4246
out_dict[k] = v
4347

4448
return json.dumps(out_dict)

0 commit comments

Comments
 (0)