Skip to content
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

long maneuvers https://github.com/commaai/openpilot/issues/26778 #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
next steps
  • Loading branch information
ntegan1 committed Dec 16, 2022
commit ba537ea705e4195ae872a3900c4740505b4addf6
7 changes: 7 additions & 0 deletions selfdrive/controls/controlsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,13 @@ def state_control(self, CS):
# accel PID loop
pid_accel_limits = self.CI.get_pid_accel_limits(self.CP, CS.vEgo, self.v_cruise_helper.v_cruise_kph * CV.KPH_TO_MS)
t_since_plan = (self.sm.frame - self.sm.rcv_frame['longitudinalPlan']) * DT_CTRL

## TODO
# when starting a maneuver
self.LoC.reset(v_pid=CS.vEgo) #vpid = vego or first point in plan

# fill planfrom maneuver

actuators.accel = self.LoC.update(CC.longActive, CS, long_plan, pid_accel_limits, t_since_plan)

# Steering PID loop and lateral MPC
Expand Down
1 change: 1 addition & 0 deletions tools/joystick/maneuver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def __points_to_interpables(self):
conversion = conversions[unit]
for point in self.object["points"]:
times.append(float(point[0]))
# TODO calculate accels as slopes of speedss
speeds_kph.append(float(point[1]) * conversion)
self.times = times
self.speeds = speeds_kph
Expand Down