forked from commaai/opendbc
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Ioniq5 pe with sync #70
Draft
devtekve
wants to merge
131
commits into
master-new
Choose a base branch
from
ioniq5-pe-with-sync
base: master-new
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # docs/CARS.md # opendbc/car/hyundai/interface.py
# Conflicts: # opendbc/car/hyundai/values.py # opendbc/dbc/hyundai_canfd.dbc
# Conflicts: # opendbc/car/hyundai/carcontroller.py
# Conflicts: # opendbc/dbc/hyundai_canfd.dbc
This reverts commit 8f163d2.
Replaced KIA_EV9 entry with HYUNDAI_IONIQ_5_PE in the torque override configuration. Adjusted the values to align with the updated specifications for this model.
Revised the angle_rate_up_lookup and angle_rate_down_lookup tables to include more detailed points. This enhances the granularity and accuracy of angle rate calculations for safer and smoother operation.
Reduced the number of lookup table points for steering angle rate up and down in Hyundai CAN FD safety. This change simplifies the implementation while preserving the intended functionality and behavior."
Added a new test route for the Hyundai Ioniq 5 PE with LKA steering, HDA2, and LFA2. Also removed the test route for the Kia EV9 as it is no longer needed. These changes ensure the test routes remain relevant and up-to-date.
a940844
to
14c662e
Compare
Simplified the lookup tables for angle rates and adjusted values for smoother steering transitions. These changes aim to optimize control behavior and improve system performance.
Introduced dynamic torque scaling based on curvature for smoother and more adaptive steering control. Replaced raw curvature inputs with filtered curvature for enhanced stability and reduced noise in steering angle calculations. Removed unused speed scaling logic to simplify the lateral control flow.
Updated curvature breakpoints in Hyundai carcontroller to improve torque scaling for curved driving. Slightly refined the filter coefficient in lateral control for smoother curvature filtering and more accurate steering adjustments.
Updated curvature breakpoints and torque scaling for improved control in sharp turns. Increased filter alpha for faster curvature response while maintaining system stability.
Revised steering angle limit parameters to refine control dynamics. Adjusted breakpoints and scaling factors to better align with real-world handling and ensure smoother operation. Removed previous values by commenting them out for reference.
Updated curvature breakpoints and corresponding torque values for finer control. This enhances steering behavior, especially during moderate to high curvature scenarios.
Updated steering angle rate lookup tables and thresholds in safety and vehicle values to optimize control responsiveness. These changes refine rate transitions for better alignment with system expectations.
Introduced a speed-dependent multiplier for torque scaling to improve steering control based on vehicle speed. This adjustment interpolates torque values more dynamically, ensuring better handling and responsiveness at varying speeds.
Introduced `intended_angle` for better readability and clarity in the steering angle calculation process. This change improves maintainability while preserving existing functionality. Applied smoothing now uses the newly defined `intended_angle`. Add HKG angle smoothing factor for steering adjustments Introduced a new parameter, `HkgTuningAngleSmoothingFactor`, to apply exponential moving average (EMA) smoothing to steering angle changes, reducing sudden adjustments. Added associated UI controls, parameter persistence, and integration into Hyundai carcontroller logic for improved steering stability.
c74f44f
to
3460ff4
Compare
This reverts commit 3460ff4.
This reverts commit e319616.
Refactored the calculation and application of the steering angle to improve code clarity and ensure smoother transitions. Removed unused parameter update logic in `latcontrol_angle.py` and enhanced handling of driver overrides in `carcontroller.py`.
# Conflicts: # opendbc/safety/safety/safety_hyundai_canfd.h # opendbc/safety/tests/test_hyundai_canfd.py
Reorganized torque computation logic to improve readability and maintainability. Consolidated curvature breakpoints and base torque values into parameters, ensuring consistency and flexibility. Adjusted speed multiplier and torque scaling for smoother control and better tuning.
Introduce separate angle tuning controls for HKG vehicles, including smoothing factor, min torque, and max torque parameters. Refactor developer panel to integrate the new settings into a dedicated UI panel, enhancing modularity and customization capabilities.
Introduced "HkgTuningOverridingCycles" for configurable user override torque ramp-down cycles. Updated relevant logic in torque control and UI settings to handle the new parameter. This improves flexibility in adjusting steering torque override behavior.
Updated `BASE_TORQUE_VALUES` to refine torque application across curvature ranges. This change aims to enhance steering precision and overall vehicle handling.
Replaced hardcoded torque percentages with dynamic computation based on curvature and speed. Moved speed multiplier and torque values into the main controller for better flexibility and tuning. Removed redundant `BASE_TORQUE_VALUES` from `values.py`.
Added constraints to ensure the target torque stays within defined ANGLE_MIN_TORQUE and ANGLE_MAX_TORQUE values. This prevents unsafe torque levels and improves system reliability.
Revised the input validation to ensure stricter checks and prevent potential edge-case errors. This enhances overall robustness and improves user experience by rejecting invalid data promptly.
Implemented a variable smoothing factor for steering angle adjustments based on vehicle speed. Added new parameters `SMOOTHING_ANGLE_VEGO_MATRIX` and `SMOOTHING_ANGLE_ALPHA_MATRIX` for dynamic interpolation. This enhances control precision and stability at varying speeds.
Replaced direct access to `params` with instance variables for torque parameters to improve code clarity and maintainability. Updated smoothing factor description in angle tuning settings to include speed-related behavior. This enhances readability and prepares for further tuning adjustments.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requires #68
Summary by Sourcery
Adds support for angle-based steering control for Hyundai CAN-FD vehicles, specifically the Ioniq 5 PE and Kia EV9. This includes new safety checks, parameter adjustments, and message creation logic to handle angle-based commands instead of torque-based commands. Also updates the car fingerprint to include the Ioniq 5 PE.
New Features:
Tests: