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

MapBox test report #538

Closed
jezikk82 opened this issue Feb 24, 2022 · 53 comments
Closed

MapBox test report #538

jezikk82 opened this issue Feb 24, 2022 · 53 comments

Comments

@jezikk82
Copy link
Contributor

Hi, I just drive 60+ km with MapBox without issue. Everything worked fine, even the performance was better than GMaps.

I dont know if it's possible but would be nice to have:

  1. Missing automatic rerouting. have to manually get back to main screen and press reroute.
  2. Basic navi direction (e.g. turn right in 500m) and route summary (e.g. kilometers/time left to target)
  3. Search history of map destinations/places
  4. Map rotation to direction we are driving, similar to any navi view and moving actual position dot to about 20% of the height (now is in the middle).
  5. More details on the map (e.g. building numbers)
  6. Possibility to compile variant with GMap and MapBox
@fata74
Copy link

fata74 commented Feb 24, 2022

Hi, great implementation that works on ID4.Can't fill the full screen?
PXL_20220223_172359278 MP

@fata74
Copy link

fata74 commented Feb 24, 2022

PXL_20220223_170551187

@jezikk82
Copy link
Contributor Author

What scree resolution you have. (Can be read from app under car info - advanced - hmi.display-*: xxx).

@fata74
Copy link

fata74 commented Feb 24, 2022

IMG_20220224_155404

@hufman
Copy link
Collaborator

hufman commented Feb 24, 2022

Thank you for testing, and I'm pleased you are enjoying it!

Automatic rerouting and turn-by-turn directions are hard, because I'm not actually sure how to locate the user along the route! I also worry that bugs in automatic rerouting may explode the number of route requests that are sent to the Mapbox service (Mapbox only gives 100,000 per month for free, which I will eventually need to spread among all of the app store users), and so the manual recalculation is a suitable compromise for this version.

I believe Mapbox includes a small search history, but I count this as part of the saved places from #4.

Rotating the map, similar to tilting the map, has complications because of the low update framerate over Bluetooth. I worry about the user experience of the map jumping around and showing a different arbitrary angle as it updates at 1fps.
Adjusting the camera panning based on direction of travel is much more feasible! I've added it as #540.

I don't have control over the information displayed on the map, unfortunately, that is provided by Mapbox.
The Build Variant code layout means that it is impossible to build the app with both Gmap and Mapbox included. Besides, anyone who is able to build the Gmap version is unlikely to also want the inferior Mapbox information :) There's also tricky implications about sharing data: For example, the Gmap license disallows showing Google Place and Routing search results on any non-Google map.

Thank you for your help in testing!

@hufman
Copy link
Collaborator

hufman commented Feb 24, 2022

@fata74 Thank you for testing! The map can only be displayed behind the other car UI elements (such as the status bar and the left navigation widgets). We might be able to expand it a little more to the left (@jezikk82 can you experiment and tell me the RHMIDimensions paddingLeft increase that is needed in your ID4 car?), but that is all that can be done.
I should hide the Show Widescreen option if the car screen isn't wide enough to support it, to reduce confusion.

@jezikk82
Copy link
Contributor Author

In #509 I asked how to build artefacts. RHMI dimensions are there. I can experiment with that. You can try to decrease left padding for id4 cars and see.

@hufman
Copy link
Collaborator

hufman commented Feb 25, 2022

I updated the dev docs to provide instructions which should help you test out RHMIDimensions changes, try it out! I don't have an ID4 car to test with, so I'll need to rely on your contributions.

@izzy-xd
Copy link

izzy-xd commented Feb 25, 2022

Hi. Maybe this will help you. Thanks for a good job :)
Screenshot_20220225-170551__01
IMG_20220225_170508

@berseker
Copy link

berseker commented Feb 28, 2022

Hi hufman, my contribution with my experience so far and some minor improvements\bugfixes needed:
(screens are taken from a release of a few weeks ago, but the concepts remains also with the latest one)
I'm trying the mapbox navigation while commuting & my experience is that using at the same time

  • Musicolet with MP3 streaming
  • Mapbox
    often causes a "sudden" death of the app:
    maybe the two above functionalities with only bluetooth bandwith are a bit too much.

music stops, the display freezes on the map, I can change BMW screen to some other functionality but bluetooth connectivity remain "halted", I have close the unit navigation and wait that it completely turns off in order to make it work again. I've tried to get the logs but i do not why the logcat I take lately have only a few minutes of history. I'll try again in the next days.

hmi.display-height: 480
hmi.display-width: 800
hmi.role: HU
hmi.type: BMW ID6L
hmi.version: EntryEvo_ID5_1903_Release ID5_1903-490-1837K Build 47 - Rev:203015 2018-11-14 08:39:42

screen_1
screen_3

@hufman
Copy link
Collaborator

hufman commented Mar 1, 2022

Thank you for the testing and feedback, @berseker!
The crashing sounds like it is similar to #536. I unfortunately haven't experienced it, so I must try to read the donated logs and see if there's anything that can be improved.
Have you somehow modified your IDrive at all? I wonder why your car is saying it has a resolution of 800x480, which is (for example) the size of fata74's screen. Your screen looks more like izzy-xd's screen, which is 1280x480.
The Screen Mirroring and this Maps module use your car's claimed screen resolution to determine how big of an image to send (the car doesn't seem to support any native stretching operations). Because your car claims to have a narrow screen (less than 900 is the threshold) the widescreen button won't change anything. However, this screen resolution would not provide such a large image in the first picture, which is very confusing to me. I haven't seen any other instances of the car's claimed resolution being so incorrect!
Can you share more information about your IDrive version?

@berseker
Copy link

berseker commented Mar 1, 2022

.... you may be right, originally I had a 6,5" screen, then I bought an 8,8" screen from an F30 and codified it myself. but any other window of ID6 works properly. AFAIK the 1280x480 resolution are for 10.25" inches of other models like BMW X3\X5 and so on

I just checked And I (should) have coded
DISPLAY_SIZE_RESOLUTION = 8.8_1280x480
DISPLAY_VARIANTE = breites_display

so I think something is wrong in my coding.. I will further investigate

@hufman
Copy link
Collaborator

hufman commented Mar 1, 2022

Oh good, that's at least an explanation! I know my 2021 Mini has an 8.8" screen that is technically 1440x540 but it claims to only be 1280x480, so I have a workaround just for Minis (perhaps because of their curved screens), and was worried I'd have to figure out more workarounds! The previous Mini ID4 XL screen was 8.8" and 1280x480.

@berseker
Copy link

berseker commented Mar 2, 2022

... i've checked and I have to apologize.. that "screenshot" was taken When I had the old screen. the new one shows this
image
but that means that maybe on ID6 there are some tricks to do to "expand" the full screen to the right size...

@hufman
Copy link
Collaborator

hufman commented Mar 7, 2022

@fata74 @izzy-xd Please try this test build which changes the left padding and so the image should fill up the left side better. Please share a screenshot and the build number from the Support menu to help me with testing!

@berseker Do you know the actual pixel resolution of the screen you installed? It seems that even IDrive 5 had the possibility of running at 1440x540, so I wonder if you might try coding your car to be a 8.8" 1440x540 resolution. What coding options do you see?

@berseker
Copy link

berseker commented Mar 7, 2022

@hufman i'll check about It.. actually the part Number of my 8.8" display Is 6822626, thats the only thing i know up until now

@hufman
Copy link
Collaborator

hufman commented Mar 8, 2022

I looked around for that part number and the forum posts all say 1280x480, I didn't find a definitive answer about whether it was potentially actually a higher res...

Another test build removes the ID4 specific changes from the previous test build, because I think I added an extra change that may have corrected the padding problem without adding ID4-specific values, so I'd appreciate testing with that version too!

@izzy-xd
Copy link

izzy-xd commented Mar 8, 2022

Screenshot_20220307-200939__01

IMG_20220308_081001__01__01

@fata74
Copy link

fata74 commented Mar 8, 2022

Hi, I have tested it but it looks like before to me.
PSX_20220308_103003

@hufman
Copy link
Collaborator

hufman commented Mar 8, 2022

Very good, thank you very much! @fata74 I am guessing you are trying the second link, named dimensions-sidebar? @izzy-xd does it look right when you toggle the Widescreen setting and show the sidebar?

@fata74
Copy link

fata74 commented Mar 8, 2022

I have tried this one:
androidautoidrive-latest-dimensions-test-mapbox-sentry-release.apk

@izzy-xd
Copy link

izzy-xd commented Mar 8, 2022

Screenshot_20220308-103738__01
IMG_20220308_164554__01__01

I will try the sidebar later and upload a photo.

IMG_20220308_175730__01__01

@magamess
Copy link

magamess commented Mar 9, 2022

Hello @hufman, first at all, thank you very much for all your effort on this project, it is amazing what you have achieved.

I know there is separate discussion on #517, but I wonder if it possible to get the same layout (size) @izzy-xd is showing now for Mapbox but for the screen mirroring app. I am using screen mirroring with Android Auto and I am still getting big black margins. Is there anything that can be adjusted to reduce the margins?

My NBT resolution is 1280x480
My mobile resolution is 2400 x 1080

Thank you very much!

@hufman
Copy link
Collaborator

hufman commented Mar 10, 2022

@izzy-xd did you uncheck the Widescreen Map setting? I haven't found any way to determine if the car is running in widescreen mode or sidebar mode, so this has to be done manually. I want to know if the sidebar mode lines up nicely with the edge of the screen when your car is showing a sidebar, or if it wastefully draws under the sidebar. I'm especially curious if the dimensions-testing version looks right in this regard (lined up perfectly in my Mini), because I like how the dimensions-testing version fills the screen more completely but worry that it would fill too much under the sidebar.

@magamess As mentioned in the main discussion thread in #517, because AAIdrive is in control of its map, it can adjust the picture without the car's overlays drawing over any important parts of the map. The same negative padding could be applied for mirroring, but might cause image obstructions and so I don't feel comfortable applying it to the generic mirroring addon. But please, let's continue this discussion in the screen mirroring discussion section.

@izzy-xd
Copy link

izzy-xd commented Mar 10, 2022

IMG_20220310_082640__01

@hufman
Copy link
Collaborator

hufman commented Mar 12, 2022

Thank you for your testing and feedback! I've pushed up these changes to the main build.

@HaivanJV
Copy link

Rotating the map, similar to tilting the map, has complications because of the low update framerate over Bluetooth. I worry about the user experience of the map jumping around and showing a different arbitrary angle as it updates at 1fps.

Hi Hufman. First of all, thanks as usual for all the hard work and the amazing results.
I have a point to make about the above. Would it be possible to still try implementing it on a test build?
Personally, I am not able to follow any navigation system that doesn't offer this feature. I am getting lost when navigation is not pointing at driving direction.

Contextually, I tested Gmaps in screensharing via Android Auto app: results under bluetooth connection were acceptable and navigating inside the city was usable. Connected via USB was nearly perfect.

I think I have read on a different issue that, under Android Auto, the screensharing of Gmaps has a better FPS. Isn't it the same or a similar rate of the Mapbox integration?

@hufman
Copy link
Collaborator

hufman commented Mar 17, 2022

I suppose rotating/tilting could be an option, especially for users who are using it over USB.
It's reassuring to hear that the performance is acceptable, I tried hard to find a compromise that performed decently given the limits!

The message you found about screen sharing is that the screen sharing app limits the update framerate while in motion to prevent watching movies in motion, while still updating the screen enough to show a map. It disables this limit if it is able to detect that Android Auto is running, and then it runs at the full speed supported by the USB or BT connection.
The Mapbox integration does not have any such limit, it is always going as fast as possible (though it doesn't waste cpu or bandwidth sending identical frames), so it should perform similarly to Screen Sharing GMaps within Android Auto. 👍

@berseker
Copy link

berseker commented Mar 31, 2022

hi @hufman , I'm still keeping updating the app & testing, I am actually amazed about the improvements!

actually I still get many app crashes if I start listening mp3s with Musicolet as instance while using Mapbox.. it's something really istantaneus, as soon as i start listening music while mapbox is running the app gets an instant crash. this morning I was connected with both BT & USB, and I got this strange crash where music still played, mapbox was stuck, and also controls\album cover remained crashed (music still played, it switched to the next song but the controls & albumart remained on the previous song).. very strange. in any case also I would like to hightlight some glitches in the mapbox new features

  1. the compass seems "cut" in right & top corners
  2. I still think that on Id6 the padding of the map shall be corrected a bit
    image

@hufman
Copy link
Collaborator

hufman commented Mar 31, 2022

Please contribute your information about the map crashing to #536, it might be some memory pressure that suddenly ramps up as soon as you add the music app.
Hmmm not sure what to do about the compass. Mapbox doesn't provide much customization for that feature.
I'd like to see other people's ID6 screenshots, to see if there is a general pattern of ID6 misreporting its screen size (like my Mini) or just specific to your car's customization. Are there any other users here with ID5/6 that can share screenshots and their car hmi.type/hmi.version/hmi.display-width? I rely on the a4axl value in the Mini logic to use a bigger screen, but perhaps it's just general ID5/6 screens?

@hufman
Copy link
Collaborator

hufman commented Apr 1, 2022

I pushed a test build where any EntryEvo_ID5 car claiming to be 1280px wide will actually run as if it has a 1440x540 screen. Try that out @berseker

@berseker
Copy link

berseker commented Apr 1, 2022

@hufman "We have a Winner!"
PXL_20220401_073548415_1

@hufman
Copy link
Collaborator

hufman commented Apr 1, 2022

Ah ha, the image is too wide and the compass was cut off! I pushed a new version that should adjust the border padding to line up perfectly.

@unlive74 can you post a picture of your EntryEvo_ID5 showing the map (preferably the main build, not the bmw_xl test build), and tell me what hmi.display-width the car reports? I'm trying to determine the rule for when to force the image to be bigger!

@hufman
Copy link
Collaborator

hufman commented Apr 1, 2022

@jezikk82 can you check the map size in your car (with pictures so I can measure and adjust if needed), I believe you also have a bigger screen size and I wonder if any of the screen measurements need adjusting.

@berseker
Copy link

berseker commented Apr 2, 2022

Ah ha, the image is too wide and the compass was cut off! I pushed a new version that should adjust the border padding to line up perfectly.

@unlive74 can you post a picture of your EntryEvo_ID5 showing the map (preferably the main build, not the bmw_xl test build), and tell me what hmi.display-width the car reports? I'm trying to determine the rule for when to force the image to be bigger!

maybe a fine tuning it's necessary, but the compass actually appeared when I started moving with the car (if i remember correctly) in any case i'll try also this new pushed release ;)

@jezikk82
Copy link
Contributor Author

jezikk82 commented Apr 6, 2022

@jezikk82 can you check the map size in your car (with pictures so I can measure and adjust if needed), I believe you also have a bigger screen size and I wonder if any of the screen measurements need adjusting.

Sorry for late reply, this is how it looks (latest version, my own built) in my car
AAID_1440

AAID report resolution of 1440x540, NTBevo_ID5_1911_*, a4axl:false. NBT pro, biggest screen. According to BMW spec it should be 1920px wide screen, but according to my measure is about 1600px wide.

@jezikk82
Copy link
Contributor Author

jezikk82 commented Apr 6, 2022

Here is the variant with my adjustments I used with GMaps:
AAID_1440_myAdj

Values are:
val rhmiWidth: Int = 1550
val rhmiHeight: Int = 550

val marginLeft: Int = 110
val marginRight: Int = 5

val paddingLeft: Int = 190
val paddingTop: Int = 70

It's still require small corrections but I don't mind to have it as in pic.

p.s. During "navi" I dont see any arrow showing directions or next turn - but I saw in commits history @hufman added it ?
Any change to add auto recalc option after x seconds/meters of detour ?

@unlive74
Copy link

unlive74 commented Apr 6, 2022

hmi.display-height: 480
hmi.display-width: 1280
build: 9dfe420

20220406_182640
20220406_182731

@hufman
Copy link
Collaborator

hufman commented Apr 6, 2022

Thank you so much!
@jezikk82 I haven't made progress on turn-by-turn directions (#539) or automatic rerouting. I would need to first figure out where the user is along the route, which I'm not quite sure about currently. Perhaps you saw the commit about changing the navigation dot to be an arrowhead ("directional arrow" I called it, because it points the direction your car is facing)?
@unlive74 thank you so much for the confirmation! Both you and @berseker (and my Mini too) have an EntryEvo_ID5 that reports 1280x480 even though the screen is actually 1550x540, which makes me feel more confident about adding this size override into the code. Please try out the latest bmw_xl build and show me if my guessed measurement adjustments look good for you, and then I can merge it!

@unlive74
Copy link

unlive74 commented Apr 6, 2022

@hufman OK I'll try tomorrow. unfortunately for me it's just a test - the build with the map is irrelevant for me due to frequent crashes. At the same time, it also hangs the system (only rebooting EntryEvo helps).

@unlive74
Copy link

unlive74 commented Apr 7, 2022

20220407_141419

@berseker
Copy link

berseker commented Apr 7, 2022

@hufman here is my test . I tried also mirroring plugin but I think you have made only the mod in the mapbox plugin for now
image

@hufman
Copy link
Collaborator

hufman commented Apr 7, 2022

Wonderful, thank you so much! You are correct, Screen Mirroring hasn't been changed yet, and I see from the code that it is using the Generic dimensions which move the screen up 80 pixels, while the dimensions specific to your screen would only move it up 60 pixels and should fix that.
The compass is tricky, I've tried applying a margin to it and it doesn't seem to move. It's even worse in the Mini because of the curved screen :)

@berseker
Copy link

berseker commented Apr 7, 2022

In any case please note that We are Talking about details to get to perfection, which Is really really close by now!

@jezikk82
Copy link
Contributor Author

jezikk82 commented Apr 8, 2022

@hufman Is there a way to overwrite object RHMIDimensions from class SidebarRHMIDimensions using the same way you posted in test build (in MapServiceApp.kt). This would allow the AAID to be built without compiling the IDriveConnectKit every time I play with something. Thanks.

@hufman
Copy link
Collaborator

hufman commented Apr 8, 2022

Of course! You can build whatever custom RHMIDimensions subclass you'd like, following this example, which doesn't require switching IDriveConnectKit from a gradle artifact to being a submodule. If you mean you want to tweak the SidebarRHMIDimensions, you can edit MapAppMode to return a custom subclass instead of the library's SidebarRHMIDimensions easy enough.
Would that work for you, or what else are you looking to do?

@hufman
Copy link
Collaborator

hufman commented Apr 9, 2022

I posted a debug branch and build that provides textboxes in the Settings tab to override the RHMIDimensions, which takes effect by closing and opening the map again instead of needing to recompile and reconnect to the car. @jezikk82 maybe that will help speed up your testing!

@jezikk82
Copy link
Contributor Author

jezikk82 commented Apr 9, 2022

Thanks, for sure it will help. I'll have access to 2 other bmws from f and g series with different i drives so I will try to adjust the mapbox as close as possible. Let me know if you prefer map on the left flot to border of the screen or end up before home button (delicate grey line in background noticeable).

@hufman
Copy link
Collaborator

hufman commented Apr 9, 2022

I somewhat like the appearance of the berseker screenshot, I think the Home button and floating Left button look a little out of place on the completely fullscreen picture and those 60 extra pixels won't contain much useful data. I sincerely appreciate your help! I think these screen dimensions are the last piece before I release the next stable version.

@jezikk82
Copy link
Contributor Author

I tested with 2 different BMW G series with NBTevo ID5 1440x

margin left: 0
margin right: 5
padding left: 90
padding top: 67
image size must be reduced to: 1345 x 540
IMG_20220412_203854

When widescreen is off map will look like this:
IMG_20220412_203830
IMG_20220412_203803

As you can see sidebar is covering around 20px of the map.

Another variant is as follow:
IMG_20220412_155847
IMG_20220412_154423

width:1350
height: 480
margin left: 0
margin right: 5
padding left 90
padding top 0

Also heve sidebar is covering about 20px of the map.

Later this week I'll have change to test it on f&g series with smaller navi (entryNav). Will post the results.

Let me know if you need anything else to test here ?

@hufman
Copy link
Collaborator

hufman commented Apr 13, 2022

Cool, thank you so much for the precise measurements! I updated the custom_dimensions build with the numbers, and I added a -20px offset for not-widescreen mode of that generation of screen.
The width adjustment is done by increasing the marginLeft, which represents the left area on the screen that isn't used by the map, and the marginLeft and marginRight together reduce rhmiWidth into the visibleWidth that is used by the map.

@hufman
Copy link
Collaborator

hufman commented Apr 24, 2022

@jezikk82 did you find any needed updates for those other cars, or does everything look good?

hufman added a commit that referenced this issue Apr 26, 2022
@hufman
Copy link
Collaborator

hufman commented May 4, 2022

Closing this with the release of version 1.4, please open separate issues for any new bugs that appear!

@hufman hufman closed this as completed May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants