openpilot
openpilot copied to clipboard
Transferring to MapLibre
Description Currently translate the codebase to maplibre-qt already.
Verification
Trying to build maplibre-qt, but is currently facing an issue similar to this. Failing to build because of missing qtlocation5-private-dev
package and it is not available on apt
Will test using map_renderer.py
, not sure if this is a good way to test this? Probably better test with replay
Will test using
map_renderer.py
, not sure if this is a good way to test this? Probably better test with replay
I'd probably start with replaying the demo route and just checking the map generally works in the UI, then test the map renderer. See here for getting setup: https://github.com/commaai/openpilot/tree/master/selfdrive/navd#development
What does full desktop support mean? We can't make this work with 5.12?
@adeebshihadeh From the README, it is "fully supported on desktop platform" which I think for the main desktop OSes. I think it is fine since Agnos is mainly based on Ubuntu 20.04?
anything below 5.15 doesn't support Location
which I think is used for getting routes and positions. I think we can kind of work around this if we have our own fork. I haven't dive deep into the codebase, but it might be possible
Ah, if there's lot of hacks, then I don't think this is worth it. We'll be switching to 24.04 in a few months when it's out anyway. If you confirm there are lots of hacks to get it working on our Qt, then we can just keep this bounty locked to you until the switch.
Okay, I made it work with 5.12. I made a small PR that makes it compilable with Qt 5.12. We don't need Location
since we are getting position and location from cereal already. so we can disable the Location
option with
cmake -DMLN_QT_WITH_LOCATION=OFF ..
I was trying to test with the demo route of replay
but that one doesn't seem to have map enabled, is there a different route that I can test with?.
I also test with map_renderer.py
and got a segfault
. I tried to implement the exact same function in .c
here is the file:
test.txt and it works just fine with no segfault
, not entirely sure why it doesn't work for python implementation
Okay, I made it work with 5.12. I made a small PR that makes it compilable with Qt 5.12. We don't need
Location
since we are getting position and location from cereal already. so we can disable theLocation
option withcmake -DMLN_QT_WITH_LOCATION=OFF ..
I was trying to test with the demo route of
replay
but that one doesn't seem to have map enabled, is there a different route that I can test with?. I also test withmap_renderer.py
and got asegfault
. I tried to implement the exact same function in.c
here is the file: test.txt and it works just fine with nosegfault
, not entirely sure why it doesn't work for python implementation
Nice! I see that got merged already.
Testing it doesn't require a route with nav enabled; the map will be available if you have everything setup, such as a token.
@adeebshihadeh it seems to work perfectly now, do you need me to upload the compiled library or do you want me to write a shell to download and set it up automatically. Here is a snapshot of the demo with maplibre. Still figuring out how to record videos :)
Great. We always want a script to build the third_party
dependencies so that they're reproducible, then you can check them in once that's done. This one is a good example https://github.com/commaai/openpilot/blob/master/third_party/acados/build.sh
@mitchellgoffpc any validation you want to do before merging this?
@adeebshihadeh added the build script
I also test with map_renderer.py and got a segfault. I tried to implement the exact same function in .c here is the file: test.txt and it works just fine with no segfault, not entirely sure why it doesn't work for python implementation
The UI works fine, if possible you can test it out just to make sure I didn't introduce any bug, but the map_renderer.py
doesn't seem to work. I created the same code in .c
file as above and it doesn't have any segfault, I'm not sure why it doesn't work
@mitchellgoffpc any validation you want to do before merging this?
Yeah we should verify that it doesn't impact model performance, will run those tests tomorrow morning.
CI is passing now, but there's some issues building it on device (CMake is too old and it's missing libqconnmanbearer.so
). I'll look into those when I get a chance.
Got it working on the comma 3X, and all the tests pass except navModel replay. I'll update the refs once you verify @mitchellgoffpc.
@adeebshihadeh lgtm, model behavior appears to be pretty much identical
While I understand that DevContainers is the preferred method for Comma, I would like to continue to use OP tools, natively on Apple hardware. This merge breaks the OP tools build (PJ plugins) on the Apple platform due to missing Darwin library files. 'third_party/maplibre-native-qt/Darwin/lib' not found
@SurferSD please use the build script, and i think its better to open an issue rather than commenting on Pr since it mostly relates to development