openpilot
openpilot copied to clipboard
Live torque
ToDo
- ~~have a robust update logic for the corolla, like calibrationd~~ revisit if any issues
- ~~resolve the first drive vs later drive discrepancies~~ revisit if any issues
- ~~run with torqued on corolla & drive~~
- ~~use in controlsd & drive~~
- ~~good logic to save points (and continue in the next route)~~
- ~~handle multiple resets case (reset decay)~~
- ~~handle new platform (with the
is_sane
fn)~~ - drive on rav4
- use offset? (have to smart initialize it; current initialization is bad)
- lower threshold for
is_sane
to some actual sane value
After I initialize the data file I got below error
File "/data/openpilot/selfdrive/locationd/torqued.py", line 176, in main estimator = TorqueEstimator(CP, torque_params) File "/data/openpilot/selfdrive/locationd/torqued.py", line 82, in init params = log.Event.from_bytes(params).liveTorqueParameters if params is not None else None File "capnp/lib/capnp.pyx", line 3348, in capnp.lib.capnp._StructModule.from_b ytes File "capnp/lib/capnp.pyx", line 4143, in capnp.lib.capnp._FlatArrayMessageRea der.init ValueError: input length must be a multiple of eight bytes
While I driving, I got "live torque params are numerically unstable NoneType: None" error and can not use openpilot unitil I delete the LiveTorqueParameters.
While I driving, I got "live torque params are numerically unstable NoneType: None" error and can not use openpilot unitil I delete the LiveTorqueParameters.
Did you pull all latest changes? Could you send me the segment/route where it happened? torqued
is pretty stable now with the latest changes, but there could be some numerical edge cases. I'll look into it if you get me a segment!
I backported this to C2. I haven't gotten good results yet. For whatever reason, after 30 mins it really didn't want to stay in the lane and it would actually pull to the left and would not turn right. maybe its my setup but just providing my feedback . I want to use this for my new car port but obviously I have messed something up.
After make latacc-to-torque generic, and overrideable applied. Vehicle ping pong at under 40 miles.
While I driving I got Low Communication Rate between Processes.
Here is my LiveTorqueParameters. It just crashed. https://drive.google.com/file/d/1bvmoMT4i5oYhjg_4e-NoVEFQWF047Jz4/view?usp=sharing
Torqued seems stable on my C2. I have the priority set to 4. I am not calling all_checks(). When i try running bridge it causes a com issue with carstate.
After make latacc-to-torque generic, and overrideable applied. Vehicle ping pong at under 40 miles. While I driving I got Low Communication Rate between Processes.
@bmrtech Could you post the segment id? I want to look at the history a bit (routes before and after etc).
I backported this to C2. I haven't gotten good results yet. For whatever reason, after 30 mins it really didn't want to stay in the lane and it would actually pull to the left and would not turn right. maybe its my setup but just providing my feedback . I want to use this for my new car port but obviously I have messed something up.
@MoreTore Could you post your segment as well? I've been driving on the most recent commit on this branch and it looks fine (and recovers from any wrongly learnt state very quickly). So I suspect it entered into some un-recoverable state in your case.
Currently the is_sane
threshold is not sane - I wanted to test the stability of the learnt values. Setting that should make it not deviate too much (It's in the todo as you can see). But segment ids are necessary for me to debug what's happening.
After make latacc-to-torque generic, and overrideable applied. Vehicle ping pong at under 40 miles. While I driving I got Low Communication Rate between Processes.
@bmrtech Could you post the segment id? I want to look at the history a bit (routes before and after etc).
I backported this to C2. I haven't gotten good results yet. For whatever reason, after 30 mins it really didn't want to stay in the lane and it would actually pull to the left and would not turn right. maybe its my setup but just providing my feedback . I want to use this for my new car port but obviously I have messed something up.
@MoreTore Could you post your segment as well? I've been driving on the most recent commit on this branch and it looks fine (and recovers from any wrongly learnt state very quickly). So I suspect it entered into some un-recoverable state in your case.
Currently the
is_sane
threshold is not sane - I wanted to test the stability of the learnt values. Setting that should make it not deviate too much (It's in the todo as you can see). But segment ids are necessary for me to debug what's happening.
I had an unrelated issue. I had to make many changes when back porting and i missed something.
So I have everything set up (i think) but there is still an issue for me. 'torqued' seems to be running, LiveTorqueParameters is there. The params don't seem to be updating as they are still at the initial_params values.
b'\x00\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x02\x00\x01\x00Jv\xd0\x88#\n\x00\x00T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\x00\x00\x00\x00\n\xd7#<\x00\x00\x00\x00\x00\x00HB\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00' ( liveValid = false, slopeRaw = 0, offsetRaw = 0, frictionCoefficientRaw = 0, slopeFiltered = 0.5, offsetFiltered = 0, frictionCoefficientFiltered = 0.01, totalBucketPoints = 0, decay = 50, maxResets = false, points = [] )
I must be missing something.
I guess its possible that the drive didn't meet all the requirements to add points. Seems like the guard statement for adding points in log_handler is too restrictive for some reason. I take a deeper look another time.
Ok so it looks like active is never true for me.
active = np.interp(np.arange(t - MIN_ENGAGE_BUFFER, t, DT_MDL), np.array(self.raw_points['carControl_t']) + self.lag, self.raw_points['active']).astype(bool)
- [x] save on exit
- [x] checks before caching: fingerprint, version, and tuning vals
- [x] check timings
- [x] add to process replay
- [x] add to onroad tests
Just tested the latest commits and it still doesn't seem to do anything. I still get really bad oscillations below 50km/h.
Just tested the latest commits and it still doesn't seem to do anything. I still get really bad oscillations below 50km/h.
Without segments I really have no way of looking into it.
Without segments I really have no way of looking into it.
My device is not official. I can send you my logs if you can use them locally. If not, I understand.