Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

feat: add covariance information in jsonl #568

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,13 @@ def object_to_covariance_description(obj: ObjectType | None) -> dict:
"pose_covariance": [],
"twist_covariance": [],
}
# TODO
# wait for covariance calculation implementation
pose_covariance = []
twist_covariance = []

pose_covariance = (
obj.state.pose_covariance.tolist() if obj.state.has_pose_covariance else []
)
twist_covariance = (
obj.state.twist_covariance.tolist() if obj.state.has_twist_covariance else []
)
return {
"pose_covariance": pose_covariance,
"twist_covariance": twist_covariance,
Expand Down
2 changes: 2 additions & 0 deletions driving_log_replayer/scripts/perception_evaluator_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ def list_dynamic_object_from_ros_msg(
velocity=eval_conversions.velocity_from_ros_msg(
perception_object.kinematics.twist_with_covariance.twist.linear,
),
pose_covariance=perception_object.kinematics.pose_with_covariance.covariance,
twist_covariance=perception_object.kinematics.twist_with_covariance.covariance,
semantic_score=most_probable_classification.probability,
semantic_label=label,
uuid=uuid,
Expand Down