Skip to content

Fix various bugs found during codebase audit#919

Draft
Flova wants to merge 1 commit into
mainfrom
fix/audit_findings
Draft

Fix various bugs found during codebase audit#919
Flova wants to merge 1 commit into
mainfrom
fix/audit_findings

Conversation

@Flova

@Flova Flova commented Jun 12, 2026

Copy link
Copy Markdown
Member
  • head_mover: fix sign error in path distance calculation (NaN risk), use pitch acceleration for pitch joint, fix double->int truncation of reduce_last_scanline, replace exact float comparison with epsilon
  • odometry: initialize IMU mounting offset transform to identity, as the tf2 default constructor leaves it uninitialized
  • world_model: fix inverted rotation in get_uv_from_xy and swapped sin/cos in get_xy_from_uv, remove dead falsiness guards on tuples
  • pathfinding: fix angle normalization that produced negative rotation costs in time_to_ball, annotate get_ball_goal as Optional and handle None in go_to_ball
  • misc: replace non-existent Duration.to_sec() with nanoseconds / 1e9
  • animation: pass float timeout_sec to wait_for_server instead of a Duration object, which raised a TypeError when the server was not immediately available
  • team_data: fix docstring of team_rank_to_ball
  • costmap: normalize debug costmap to valid OccupancyGrid range [0, 100] instead of overflowing int8, guard against constant costmaps
  • ball_filter: remove unused relative estimate lookup that silently skipped the negative observation update on tf errors
  • team_communication: compare move_base_goal instead of a function against None, remove illusory hasattr checks on always-present proto3 fields, initialize timestamp state as Optional[TimeMsg]

Checklist

  • Run pixi run build
  • Write documentation
  • Test on your machine
  • Test on the robot
  • Create issues for future work
  • Triage this PR and label it

@github-project-automation github-project-automation Bot moved this to 🆕 New in Software Jun 12, 2026
@Flova Flova moved this from 🆕 New to 👀 In review in Software Jun 12, 2026
@Flova Flova added bug Something isn't working misc labels Jun 12, 2026
- head_mover: fix sign error in path distance calculation (NaN risk),
  use pitch acceleration for pitch joint, fix double->int truncation of
  reduce_last_scanline, replace exact float comparison with epsilon
- odometry: initialize IMU mounting offset transform to identity, as the
  tf2 default constructor leaves it uninitialized
- world_model: fix inverted rotation in get_uv_from_xy and swapped
  sin/cos in get_xy_from_uv, remove dead falsiness guards on tuples
- pathfinding: fix angle normalization that produced negative rotation
  costs in time_to_ball, annotate get_ball_goal as Optional and handle
  None in go_to_ball
- misc: replace non-existent Duration.to_sec() with nanoseconds / 1e9
- animation: pass float timeout_sec to wait_for_server instead of a
  Duration object, which raised a TypeError when the server was not
  immediately available
- team_data: fix docstring of team_rank_to_ball
- costmap: normalize debug costmap to valid OccupancyGrid range [0, 100]
  instead of overflowing int8, guard against constant costmaps
- ball_filter: remove unused relative estimate lookup that silently
  skipped the negative observation update on tf errors
- team_communication: compare move_base_goal instead of a function
  against None, remove illusory hasattr checks on always-present proto3
  fields, initialize timestamp state as Optional[TimeMsg]
@Flova Flova force-pushed the fix/audit_findings branch from e04cf08 to 2dab5d8 Compare June 12, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working misc

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

1 participant