koide3 / direct_visual_lidar_calibration

A toolbox for target-less LiDAR-camera calibration [ROS1/ROS2]
https://koide3.github.io/direct_visual_lidar_calibration/
772 stars 122 forks source link

Issue getting GPU working with docker image in ubuntu #129

Open ashwinjoseph95 opened 1 week ago

ashwinjoseph95 commented 1 week ago

Hi @koide3 , I think this work is really great! I am trying to run the calibration on a similar environemnt (ROS1 and Ubuntu 20) I have setup the docker image provided by you. I was able to do the preprocess step but when it came to next step for manually selcting points I realized there was a lot of lag and also that the docker was not using gpu even though I have provided the flags for it to do so. My commands are as follows:

# Define paths
bag_path=$(realpath /home/knadmin/Ashwin/Targetless_calib/livox_ros1)
preprocessed_path=$(realpath /home/knadmin/Ashwin/Targetless_calib/livox_ros1_preprocessed)

docker run \
  -it \
  --net host \
  --runtime=nvidia --gpus all  \
  -e DISPLAY=$DISPLAY \
  -v $HOME/.Xauthority:/root/.Xauthority \
  -v $bag_path:/tmp/input_bags \
  -v $preprocessed_path:/tmp/preprocessed \
  -v pip_cache:/root/.cache/pip \
  koide3/direct_visual_lidar_calibration:noetic /bin/bash nvidia-smi

but apparenty nvidia-smi is not getting recognized. I have insalled all the nvidia and cuda dependencies in the local system. image

I tried another example here with ubuntu docker iamge it detects the nvidia drivers: image What should i do to rectify this issue? I understand this might be slightly off topic but I would be really helpful to udnerstand what is going wrong and how I can fix it.

VeeranjaneyuluToka commented 6 days ago

I do also face same issue, but wondering if viewer APIs are using GPU's? However the way i solved logging issue was making ros bag very small for example a couple of seconds, then i could navigate around to select correspondences manually.