mapbox / mapbox/mapbox-navigation-android

Replay route with rounded corners

Open
#3,018 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

The new ReplayRouteMapper detects road edges with significant turns. The current route interpolator identifies corners, this ticket is to turn those corners into curves.

### B-spines in mapbox-java
- Add [bezier splines](http://turfjs.org/docs/#bezierSpline) to mapbox-java Turf implementation
- Add the splines to the smoothed route in the interpolator
- Design [ReplayRouteOptions](https://github.com/mapbox/mapbox-navigation-android/blob/4309b5c8aaf0535c49f256e089304d09eaa7b36c/libnavigation-core/src/main/java/com/mapbox/navigation/core/replay/route2/ReplayRouteOptions.kt#L16-L22) for maneuver turn radius

### Why is this needed
Right now the simulated driver stays on route, and takes an early turn. The early turn also has an [impact on reducing reroutes](https://github.com/mapbox/mapbox-navigation-android/pull/2936/files#r422266895). As our enhanced location gets better, we will also need to improve the simulated driver or it will have more reroutes.

![Screen Shot 2020-05-22 at 7 35 24 AM](https://user-images.githubusercontent.com/3021882/82681286-6b29f180-9c02-11ea-8f65-9fcc31905dbe.png)

### Nav native consideration
The enhanced location may want to smooth route edges. This could create a better experience for in ride navigation. cc: @mskurydin

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ReplayRouteMapper and its current route interpolator, then read ReplayRouteOptions.kt and the mapbox-java Turf implementation. Review the bezier spline reference and the linked route interpolation context. Done means corners are smoothed into curves, with a maneuver turn-radius option and no early simulated turns.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.