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

Asking for support of portrait in AR navigation #257

Open
wangchongyu opened this issue Sep 21, 2020 · 3 comments
Open

Asking for support of portrait in AR navigation #257

wangchongyu opened this issue Sep 21, 2020 · 3 comments

Comments

@wangchongyu
Copy link

wangchongyu commented Sep 21, 2020

Currently, the supported screenOrientation by default for AR navigation use case is sensorLandscape. In our use case, we really need this to support portrait mode during AR navigation.
However, if I change screenOrientation="sensorPortrait" as shown below, the SDK will give me errors:
E/Vision-Encoder: Not handling orientation = 0 in encoder
E/Vision-Camera2: Sensor orientation 0 is not supported
And the camera will not event turn on at all.

<application>
        ...
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ArActivity"
            android:screenOrientation="sensorPortrait">
        </activity>
        ...
 </application>

I would like to ask if the Mapbox vision SDK has any plan to support portrait use case? Or if there is any workaround to allow me to use the AR navigation work on portrait mode? Thanks.

@yunikkk
Copy link
Collaborator

yunikkk commented Sep 21, 2020

Hey @wangchongyu, unfortunately this is not supported now.
Could you describe your use case a little bit?

@wangchongyu
Copy link
Author

wangchongyu commented Sep 23, 2020

Hi @yunikkk, thanks for the reply.
We are actually trying to build a GPS based outdoor AR navigation App specifically for walking instead of driving cases.

Similar to Google's AR walking directions below:
Screenshot 2020-09-23 at 17 18 17

Basically, the expected use case would be:

  1. The user wants to go from location A to B by walking
  2. User launch the app, select the origin and destination on the 2D map
  3. Base on the coords selected, a route would be generated by Mapbox directions API
  4. By clicking a button on the Map, it launches the AR camera with some arrows displayed on the surface of the real world path
  5. The app suppose to track and update the user's location, and keeps showing the arrows on the path to provide a turn-by-turn direction experience for the user until he/she reaches the destination
  6. Since it is for walking users, the whole process is required in portrait mode.

From the example project, I have managed to perform most of the above steps except making it work on the portrait mode.

@yunikkk
Copy link
Collaborator

yunikkk commented Sep 24, 2020

@wangchongyu unfortunately, currently Vision won't support such operation mode. It requires fixed mount in the car, walking with the device in hands won't allow us to calibrate camera (hence calculate objects positions correctly)

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

2 participants