open-rmf / fleet_adapter_mir

RMF/RoMi-H fleet adapter for the MiR API
Apache License 2.0
15 stars 15 forks source link

error_human: Login failed due to incorrect username or password #10

Closed jamietjx closed 2 years ago

jamietjx commented 3 years ago

I ran the code (python3 main.py mir_config.yaml -m) and got an error in the image below, however i think the input username and password is correct as i used the same login credentials as the one in the mir web interface. So I printed the authorization of the mir and found out that it does not match the authorization of the one shown in the mir web interface. Did the issue occur because i am using mir200 instead of mir100? Screenshot from 2021-05-12 16-07-21

cnboonhan commented 3 years ago

I sort of vaguely recall the setup for the MiR so i'll give it a shot ( hopefully i'm not giving wrong info ). The password i think is the API token for the MiR, not the password used for the web interface. So it looks more like a long string: ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==

You can find more information here: https://www.mobile-industrial-robots.com/media/11210/mir_mir100_rest_api_21002.pdf on page 2, titled security.

If you dig in the MiR web api, you should be able to find something that looks like this:

Content-Type:application/json    authorization:BasicZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==
cnboonhan commented 3 years ago

There might be some implementation issues with the main branch as well, I haven't had the access to a MiR test check robustly. I would recommend trying this branch https://github.com/osrf/fleet_adapter_mir/tree/fix/estimate_arrival for "best" results.