-
Notifications
You must be signed in to change notification settings - Fork 0
long maneuvers https://github.com/commaai/openpilot/issues/26778 #1
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
base: master
Are you sure you want to change the base?
Conversation
| def set_finished(self): | ||
| self.maneuvering = False | ||
| self.maneuver = None | ||
| def request_maneuver_start(self, maneuver): | ||
| self.maneuver = maneuver | ||
| self.maneuvering = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead code
| def available_maneuver_files(): | ||
| all_files = os.listdir(maneuvers_directory) | ||
| files = [f for f in all_files if f[f.rfind(".")+1:] == "json"] | ||
| return files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead
| return bool(buf[0]) | ||
| def maneuver_num(self): | ||
| return buf[1] | ||
| def maneuver_request(self, maneuver_num): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe allow requesting diff maneuver during another one
| def update(self, vcruise): | ||
| should_start_maneuver = not self.maneuvering and self.mem.maneuver_requested() | ||
| if not self.maneuvering and not should_start_maneuver: | ||
| return vcruise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
save manuver number and restart the thing if changes
|
testing some of the a target stuff on opsetspeed branch |

newish notes/ideas
maybe add options for constant accel control and constant velocity control, and a blend of both
good idea would probably be to filll a long_plan with speeds, times, accels from maneuver
speeds, accels, jerks
what do do about jerks
looks like jerks dont quite matter.
start with basic accels as derivative of speed graph
reset LoC at beginning
oldish notes
TODO: this is just for velocity.
but i used to set cruisestate speed to 0 and such, it was pretty responsive.
maybe start out with that and add acceleration stuff later
because right now, responsiveness to maneuver change in velocity is at the mercy of chill mode planning? (e2e is happy to keep barreling down at 60mph after you set speed to 10mph)
need to feeed desired vel directly into pid controller or somethign.
?closer to joystick code
?maybe in longcontrol.py vtarget upper lower stuff instead of long planner