pure-maps icon indicating copy to clipboard operation
pure-maps copied to clipboard

Current speed limit is not shown while navigating

Open Talkless opened this issue 3 years ago • 17 comments

My setup;

Pure Maps 2.9.0 OSM Scout Server 1.17.1 Ubutnu Touch OTA-22 Volla Phone X

Pure Maps settings: Maps: OSM Scout Navigation: Every option (including "Snap position to road enabled") is On, Speed limit: Always.

Result: I only see current speed: puremaps

I was driving this road, which has maxspeed set: https://www.openstreetmap.org/way/60441895#map=12/55.7706/23.0411

Talkless avatar Apr 18 '22 13:04 Talkless

That doesn't work on Ubuntu Touch as you don't have DBus communication possible between apps. At least that is my understanding and please correct me if I am wrong (@jonnius). Hence there is no speed limit nor showing current street on UT

rinigus avatar Apr 18 '22 19:04 rinigus

Same problem using Pure maps in Xperia 10 II (no speed limit sign). Sfos 4.4.0.58 Pure maps version 3.0.0-1.5.1

TadasKrasauskas avatar Apr 19 '22 09:04 TadasKrasauskas

Yes, on SFOS it is due to Sailjail restrictions, similar to UT in this respect. There will be separate version from the next update that disables Sailjail for SFOS.

rinigus avatar Apr 19 '22 18:04 rinigus

Yes, on SFOS it is due to Sailjail restrictions, similar to UT in this respect. There will be separate version from the next update that disables Sailjail for SFOS.

Thank you so much. Its a best native navigation ;)

TadasKrasauskas avatar Apr 19 '22 19:04 TadasKrasauskas

@rinigus would local UNIX / IP socket RPC interface help?

Speaking of UT, AppArmor does have ability to write DBus rules, allowing applications to communicate using specifiied DBus services.

Here's some examples for AppArmor built-in abstractions (includes) for allowing quering network information from NetworkManager: https://gitlab.com/apparmor/apparmor/-/blob/master/profiles/apparmor.d/abstractions/dbus-network-manager-strict

Of course, all that needs UT explicit support, to add some sort of DBus permissions for published app...

But maybe just having non-DBus-socket implementation would help? Or that would be considered too much for this "niche" issue?

Talkless avatar Apr 20 '22 06:04 Talkless

@Talkless: no, I would prefer to keep it on DBus as it is. As for UT explicit support, there is some already. If it is just a question of packaging then sure, why not. @jonnius works on packaging of Pure Maps for UT, so I would suggest to get in touch with him.

rinigus avatar Apr 20 '22 14:04 rinigus

@rinigus I believe I should speak (open issue, etc) with UT developers themselves, how could we allow some apps to do DBus requests, how to specify AppArmor policy, etc. Only when this works in principle we could the talk about proper packaging...

First I'll check if there's AppArmor "DENIED" kernel messages produces by PureMaps. Or this feature is simply disabled on UT at compile time..?

Talkless avatar Apr 21 '22 05:04 Talkless

I am a wrong person to ask about UT specifics, as I don't run it on UT. Hopefully @jonnius can reply

rinigus avatar Apr 22 '22 18:04 rinigus

I wonder whether DBus should work in our case as OSM Scout Server is unconfined and it is the one offering the service.

jonnius avatar Apr 23 '22 06:04 jonnius

I wonder, what would be easiest way to make OSMScout and PureMaps unconfined apps, so they would not have dbus AppAmor restrictions?

For example, maybe I somehow could modify /opt/click.ubuntu.com/pure-maps.jonnius/3.1.0/pure-maps.apparmor file:

{
    "policy_groups": [
        "audio",
        "keep-display-on",
        "location",
        "content_exchange",
        "networking"
    ],
    "policy_version": 16.04
}

Or I would have to just to rebuild these two clicks as unconfined apps (must first find docs for that...) and install manually?

Talkless avatar Sep 15 '22 18:09 Talkless

I've modified pure-maps.apparmor to looke like terminal app:

{
    "policy_groups": [],
    "policy_version": 16.04,
    "template": "unconfined"
}

But after reboot I still see AppArmor delials:

dbus[3308]: apparmor="DENIED" operation="dbus_signal"  bus="session" path="/io/github/rinigus/PureMaps/navigator" interface="io.github.rinigus.PureMaps.navigator" member="destEtaChanged" mask="send" name="org.freedesktop.DBus" pid=6790 label="pure-maps.jonnius_pure-maps_3.1.0" peer_pid=3320 peer_label="unconfined"

Probably generated AppArmor profile is cached somewere..?

Talkless avatar Sep 15 '22 18:09 Talkless

I've removed /var/cache/apparmor/click_pure-maps.jonnius_pure-maps_3.1.0 but after reboot still got same denials.

Simpler would probably be to build app myself?

Talkless avatar Sep 15 '22 18:09 Talkless

I don't think that changing the apparmor file on the device will take effect. You'd need to rebuild (see instructions).

jonnius avatar Sep 16 '22 06:09 jonnius

@rinigus yeah I've managed to build with unconfined AppArmor template.

Had to use --skip-review to avoid (NEEDS REVIEW) 'unconfined' not allowed error.

Will try driving some time later.

Talkless avatar Oct 24 '22 17:10 Talkless

I have set "Speed limit: Always", but.. I see speed limit extremely rarely, and for a split second only.

For example, I was driving approximately this route, but seen speed limits only in this section and this one.

I did try to drive through second section mentioned today and I can confirm it does show (50) sign for a split second, somewhere around this way: https://www.openstreetmap.org/way/85694140 .

Interestingly, it does not have speed limit set, only way before and after. So maybe it sown next upcoming way's (https://www.openstreetmap.org/way/38826951) limit.

I understand that not all ways has set speed limit, but looking at https://www.openstreetbrowser.org/#map=13/55.9184/23.2891&categories=car_maxspeed we can see that there should be quite some speed limit notifications, but I got only two, maybe missed a few more.

P.S. I have updated speed limits to match reality.

Talkless avatar Nov 05 '22 13:11 Talkless

Hard to comment whether it is related to different coverage or not. Will have to test over here with speed limit: always set.

rinigus avatar Nov 06 '22 09:11 rinigus

I have successfully reproduced speed notification (for a split second) here: https://www.openstreetmap.org/way/85694140 and here: https://www.openstreetmap.org/way/932294416 Some more places like, somewhere around: https://www.openstreetmap.org/node/457411082 https://www.openstreetmap.org/node/1330470901

So the key point is, there's rather concrete, reproducible, specific "places" where I do get short notifications of speed.

I thought maybe Volla Phone X provided coordinates has rather bad precision and gets mostly discarded? But the fact that I can reproduce these notifications probably disprove that idea? Also, I don't know how all that works so...

Talkless avatar Nov 20 '22 12:11 Talkless