Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

How to access SolAR services? #7

Open
luffy-yu opened this issue Aug 30, 2022 · 4 comments
Open

How to access SolAR services? #7

luffy-yu opened this issue Aug 30, 2022 · 4 comments
Assignees

Comments

@luffy-yu
Copy link

Hello,
Thanks for your outstanding work!
I'm trying this unity client, but I don't know how to access/call the SolAR services.
Do you have any demo URL or any guidance to set up a server?

@jim-bcom jim-bcom self-assigned this Aug 31, 2022
@jim-bcom
Copy link
Collaborator

Hi Liuchuan,

Thanks for your kind message and your interest in our project!

If you want some insights on the SolAR services design, you will find some information on our website here:
https://solarframework.github.io/use/services/

This feature is still a work in progress aimed at a future release, so the documentation and the tooling to use it are still to come.

In order for you to be able to use the client with the services, I'm preparing a set of scripts that will help you do that simply (hopefully).

I will update this issue when it's ready.

Regards.

@luffy-yu
Copy link
Author

@jim-bcom Thank you for your quick response!

I am looking forward to your update.

Best.

@jim-bcom
Copy link
Collaborator

jim-bcom commented Sep 8, 2022

Hi @luffy-yu,

Here's an archive containing some helper scripts (for Linux) in order to be able to run the services locally on
your machine:

SolAR-Services-prebuilt-external.tar.gz

Please note that these are not official scripts, so they may not be clean and robust, and are subject to break in
the future. But this should ease the task of setting up the services.

These instruction mainly applies to an installation on a Windows machine + WSL (or a VM).
If you're on a Linux system, you'll need to make small adjustments.

In the archive you will find the following scripts:

  • install.sh: run this script first to pull the required Docker images and the scripts that will be used to
    launch them.
  • delete-docker-images-containers.sh: delete all images and container related to SolAR
  • start-all.sh: start all the services locally. This will spawn terminal windows with the logging trace of each service.
  • stop-all.sh: stops all services (use carefully as it will terminate all running Docker services, not only the ones started by start-all.sh).
  • restart-all.sh: simply calls stop-all.sh and then start-all.sh.
  • viewer-*.sh: once the services are running, you can use these scripts at different stage when using the Unity client to visualize the point cloud of the sparse map.
    • viewer-mapping.sh: use this script to visualize the mapping as you use the client in "Relocalization and Mapping" mode.
    • viewer-global-map.sh: use this script to visualize the point cloud of the global map currently saved. This map is updated whenever you hit "stop" in the client in "Reloc and Mapping" mode, but you need to restart this viewer each time, as it does not update itself, it just retrieved the point cloud once.
    • viewer-reloc.sh: use this script when using the client in "Reloc only" mode. You will see the pose the camera symbolized as a pyramid representing the viewing frustrum.
    • There is a -vm- variant for these script if you're using a Linux VM instead of WSL.
  • WSL directory: use this if you are using Linux on Windows either via WSL 2 or a VM. Edit netshsolar.ps1:
    • WSL: uncomment/comment lines to use $wsl_ip variable.
    • VM: uncomment/comment lines to use $vm_ip variable and set this variable to your VM's IP.
    • then run the script to set the proper port forwarding settings.

How to procede

  • Install version 0.8.0 version of the client (pre release 0.9.0 is no longer compatible with the version of the services that are installed by the scripts).

  • You will need a specific fiducial marker to be able to set the origin of the created map. Print it from
    here and select:

    • dict.: 6x6
    • ID: 1
    • size: 183
  • Turn on wifi access point on Windows and connect the Hololens 2 to this access point via the WiFi settings menu.

  • Open the SolAR app, and in the UI, select "Relocalization and mapping mode" and enter the IP of the access point (usually 192.168.137.1, it should be the default value).

  • On the desktop:

    • on Windows, if applicable, run netsh-solar.ps1 to forward incoming request from the Hololens to your Linux services instances.
    • on Linux, run install.sh if not already done (check that there are no errors in the log consoles). This will install the services Docker images and scripts used to launch them with the proper parameters.
    • run viewer-[vm-]mapping.sh
    • In the Hololens 2 app, press start

If there is no error, you shoud see a 3D robot on the printed fiducial marker in the Hololens, and you should see the mapping being created in the viewer window.

If a "gRPC error" message appears in the start/stop button label, there is a problem with the connection setup preventing the client to access the services.

Once you're donne mapping,

  • Press stop
  • run viewer-[vm-]global-map.sh to see the global map currently active.
  • Select "Relocalization only" in the client app, and press start
  • run viewer-[vm-]reloc.sh
  • Press start in the Hololens app: you should see the camera pose moving in the 3D point cloud in the viewer on the desktop
  • Press stop

Try to always press "Stop" before quitting the app otherwise the service may be left in a bad state. If this happens, use the restart-all.sh script.

Feel free to update this ticket if you have any issues.

Regards.

@luffy-yu
Copy link
Author

luffy-yu commented Sep 8, 2022

@jim-bcom Hello,

Thanks for your detailed information!

I'll try it and let you know if I get some questions.

Best.

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

No branches or pull requests

2 participants