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

Current speed limit is not shown while navigating #604

Open
Talkless opened this issue Apr 18, 2022 · 17 comments
Open

Current speed limit is not shown while navigating #604

Talkless opened this issue Apr 18, 2022 · 17 comments

Comments

@Talkless
Copy link

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 Talkless changed the title Current speed limit is not shown wile navigating Current speed limit is not shown while navigating Apr 18, 2022
@rinigus
Copy link
Owner

rinigus commented Apr 18, 2022

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

@TadasKrasauskas
Copy link

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

@rinigus
Copy link
Owner

rinigus commented Apr 19, 2022

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.

@TadasKrasauskas
Copy link

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 ;)

@Talkless
Copy link
Author

@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?

@rinigus
Copy link
Owner

rinigus commented Apr 20, 2022

@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.

@Talkless
Copy link
Author

@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..?

@rinigus
Copy link
Owner

rinigus commented Apr 22, 2022

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

@jonnius
Copy link
Contributor

jonnius commented Apr 23, 2022

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

@Talkless
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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?

@jonnius
Copy link
Contributor

jonnius commented Sep 16, 2022

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

@Talkless
Copy link
Author

@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
Copy link
Author

Talkless commented Nov 5, 2022

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.

@rinigus
Copy link
Owner

rinigus commented Nov 6, 2022

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

@Talkless
Copy link
Author

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants