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

Initial guess (Automatic) in Docker #83

Open
Prabuddhi-05 opened this issue May 16, 2024 · 22 comments
Open

Initial guess (Automatic) in Docker #83

Prabuddhi-05 opened this issue May 16, 2024 · 22 comments
Labels
bug Something isn't working

Comments

@Prabuddhi-05
Copy link

In the Docker image of your repository in ROS2, could you please inform me about how "Initial guess Automatic" (initial_guess_auto) works? I'm encountering an error when testing it.
Screenshot from 2024-05-16 16-03-22

@Prabuddhi-05 Prabuddhi-05 added the bug Something isn't working label May 16, 2024
@koide3
Copy link
Owner

koide3 commented May 27, 2024

Is there a file named "*_matches.json" in the preprocessed directory? If not, you have to run find_matches_superglue.py.

@Prabuddhi-05
Copy link
Author

Is there a file named "*_matches.json" in the preprocessed directory? If not, you have to run find_matches_superglue.py.

Thank you for the response. However, they still ask us to install things like Torch, Matplotlib, etc.
Screenshot from 2024-05-28 13-03-05

@Seekerzero
Copy link
Contributor

Seems like the torch package was not sucessfully deployed into the container after pulling the image. Can you remove the original docker container and repull the image to see if there is any error about torch installation? Thanks.

@Prabuddhi-05
Copy link
Author

As per your request, I removed the original Docker container and repulled the image. Unfortunately, the torch package still seems to be missing or not installed correctly. I am still getting the same error.

@Seekerzero
Copy link
Contributor

could you try to post the installation log to here?

@Davabbb
Copy link

Davabbb commented Jun 24, 2024

@Seekerzero i have same error

@Seekerzero
Copy link
Contributor

Seekerzero commented Jun 25, 2024

Hi @koide3, seems like the GTSAM docker files does not setup the python environment properly.
maybe add the following
# Install PyTorch and torchvision
RUN pip3 install torch torchvision torchaudio -f https://download.pytorch.org/whl/cu111/torch_stable.html
at here (also the humble one) can ensure the installation.

Thanks.

@Davabbb
Copy link

Davabbb commented Jun 25, 2024

@Seekerzero I created a docker based on yours and there are still not enough modules there

@Davabbb
Copy link

Davabbb commented Jun 25, 2024

and there is an old docker file on github, here is an updated version, but it still doesn’t work for me https://hub.docker.com/r/koide3/direct_visual_lidar_calibration

@Seekerzero
Copy link
Contributor

Thanks for your information. Do you have any errors report while you installing torch in docker?

@Davabbb
Copy link

Davabbb commented Jun 25, 2024

@Seekerzero thanks for your quick response
my dockerfile:
FROM koide3/direct_visual_lidar_calibration:humble

RUN apt-get update && apt-get install -y python3-pip

RUN pip3 install numpy==1.21.0
RUN pip3 install torch
RUN pip3 install opencv-python
RUN pip3 install matplotlib
RUN pip3 install torchvision
RUN pip3 install models
I installed the modules that were needed step by step, but on the 8 layer i have error:

[8/8] RUN pip3 install models:
0.929 Collecting models
1.131 Downloading models-0.9.3.tar.gz (16 kB)
1.189 Preparing metadata (setup.py): started
1.354 Preparing metadata (setup.py): finished with status 'error'
1.362 error: subprocess-exited-with-error
1.362
1.362 × python setup.py egg_info did not run successfully.
1.362 │ exit code: 1
1.362 ╰─> [8 lines of output]
1.362 Traceback (most recent call last):
1.362 File "", line 2, in
1.362 File "", line 34, in
1.362 File "/tmp/pip-install-9_hqdy_l/models_7c2cba2a7c3b46c897307929c70d7580/setup.py", line 25, in
1.362 import models
1.362 File "/tmp/pip-install-9_hqdy_l/models_7c2cba2a7c3b46c897307929c70d7580/models/init.py", line 23, in
1.362 from base import *
1.362 ModuleNotFoundError: No module named 'base'
1.362 [end of output]
1.362
1.362 note: This error originates from a subprocess, and is likely not a problem with pip.
1.364 error: metadata-generation-failed

and i dont have idea how it solve

@Seekerzero
Copy link
Contributor

This might be related to the version of pip3 and setuptools try to upgrade them first.

@Davabbb
Copy link

Davabbb commented Jun 25, 2024

i solve problem with models, clone this repo https://github.com/magicleap/SuperGluePretrainedNetwork/tree/master and copy models folder

@Seekerzero
Copy link
Contributor

this is the version problem with matplotlib, either you can downgrade it (might cause problem with numpy) or you just edit the code to adapt the newer version.

@Davabbb
Copy link

Davabbb commented Jun 25, 2024

try install matplotlib 3.4.0

@Davabbb
Copy link

Davabbb commented Jun 25, 2024

git clone https://github.com/magicleap/SuperGluePretrainedNetwork/tree/master

FROM koide3/direct_visual_lidar_calibration:humble

RUN apt-get update && apt-get install -y python3-pip

RUN pip3 install numpy==1.21.0
RUN pip3 install torch
RUN pip3 install opencv-python
RUN pip3 install torchvision
RUN pip3 install matplotlib==3.7.3

COPY ./models /root/ros2_ws/src/direct_visual_lidar_calibration/scripts/models
COPY ./models /root/ros2_ws/install/direct_visual_lidar_calibration/lib/direct_visual_lidar_calibration/models

it work!!

@Seekerzero
Copy link
Contributor

Hi @koide3, you might want to add the lines above to the dockerfile for setting up the torch environment.

@Davabbb
Copy link

Davabbb commented Jun 25, 2024

@Seekerzero can you please help me with another error?

@Seekerzero
Copy link
Contributor

hi @Davabbb, you might want to raise another issue if the question is not related to this one.

@koide3
Copy link
Owner

koide3 commented Jun 26, 2024

Hi guys,
If I remember correctly, I avoided including SuperGlue in the docker image because of its license. MagicLeap employs a non-standard strict license, and I was not sure if it's safe to include it. I have read the license again, but I'm still not sure if it allows redistributing the code in a binary docker image. Does anybody have idea about this?

I think it is safe to provide a separate Dockerfile with SuperGlue at least, and I'm going to add something like Dockerfile_with_superglue so that the user can build the image by themselves.

@Seekerzero Thank a lot for your help!, and sorry for making you respond to issues.

@koide3
Copy link
Owner

koide3 commented Jun 26, 2024

@Seekerzero
Copy link
Contributor

Hi guys,
If I remember correctly, I avoided including SuperGlue in the docker image because of its license. MagicLeap employs a non-standard strict license, and I was not sure if it's safe to include it. I have read the license again, but I'm still not sure if it allows redistributing the code in a binary docker image. Does anybody have idea about this?

I think it is safe to provide a separate Dockerfile with SuperGlue at least, and I'm going to add something like Dockerfile_with_superglue so that the user can build the image by themselves.

@Seekerzero Thank a lot for your help!, and sorry for making you respond to issues.

Hi @koide3, you are right, seems like magic leap prohibited any kinds of sublicense from its original copy, even for the research purpose. We want to avoid this risk from it, also the risk of docker distribution. Sorry for not realizing that!
We might want to add a way let user link the external path from the superglue folder to the docker file. Or in the future, we can introduce more framework for auto matching.

It is my pleasure to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants