Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Make angle normalization correct for any angle and use it everywhere

Đang mở
#123 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 9 ngày

@HarshRajSinghania đang làm issue này rồi.

Từ ngày 4/10/2026.

  • #135 của @HarshRajSinghania — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
numpy, python

Hướng nghiên cứu

Start with src/components/common/angle_lib.py and test/test_angle_lib.py; extend the tests with angles beyond ±3π and check scalar and NumPy array behavior. Then review the listed normalization sites in omni_directional_lidar.py, mppi_controller.py, particle_filter_localizer.py, polar_histogram.py, cubic_spline_course.py, and lqr_controller.py. Done means normalization handles any angle and the duplicated implementations use the shared helper; an open linked pull request is already addressing this work.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug good first issue

Problem

pi_to_pi() in src/components/common/angle_lib.py wraps an angle only once, so angles beyond ±3π are not normalized. The vehicle yaw angle is never normalized and keeps growing on courses with loops, and pi_to_pi() is used for the yaw error in cubic_spline_course.py and in lqr_controller.py.

The same normalization is also implemented separately in several places:

  • omni_directional_lidar.py (_normalize_angle_until_2pi, _normalize_angle_pi_2_pi)
  • mppi_controller.py (% (2 * pi) and arctan2(sin, cos))
  • particle_filter_localizer.py (arctan2(sin, cos))
  • polar_histogram.py (% (2 * pi))

Expected fix

  • Implement pi_to_pi correctly for any angle (e.g. (angle + pi) % (2 * pi) - pi), also accepting numpy arrays
  • Use it (or a zero_to_2pi helper in the same module) instead of the local implementations
  • Extend test/test_angle_lib.py with angles beyond ±3π
Ngôn ngữ chính
Python
Star
1.9k
Fork
313
Merge trung bình
9 ngày 10 giờ
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ShisatoYano/AutonomousVehicleControlBeginnersGuide

Tất cả issue của ShisatoYano/AutonomousVehicleControlBeginnersGuide

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.