Closed nfs-chris closed 1 year ago
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days
@nfs-chris We provided Dockerfile files in the new docker
folder, can you try the release
version (you can adapt it to Foxy and Ubuntu 20 if you need).
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days
Thank you for the docker
files @Myzhar. Unfortunately, it seems the GPU is not picked up correctly:
[ZED][INFO] Logging level INFO
[zed_wrapper-2] in void sl::Mat::alloc(size_t, size_t, sl::MAT_TYPE, sl::MEM) : Err [804]: forward compatibility was attempted on non supported HW.
[zed_wrapper-2] No NVIDIA graphics card detected. Install an NVIDIA GPU, CUDA and restart your computer after completing installation.
[zed_wrapper-2] [WARN] [1675671033.258160341] [zedm.zed_node]: Error opening camera: NO GPU DETECTED
As other containers which are running on the same machine do detect the GPU, despite using the same parameters, there still seems to be an issue with how the image is built. I will investigate further and try out different parameters.
Are you using the correct commands to start the container? The host device must have a CUDA capable NVIDIA GPU, NVIDIA docker support must be correctly installed and finally the correct commands must be used to start the container. More info: https://www.stereolabs.com/docs/docker/
I am using docker compose up zedm
with the following docker-compose.yml
:
zedm:
build:
context: .
dockerfile: zed_mini.Dockerfile
devices:
- /dev/bus/usb:/dev/bus/usb
- /dev/dri:/dev/dri
- /dev/nvidia0:/dev/nvidia0
- /dev/nvidiactl:/dev/nvidiactl
- /dev/nvidia-uvm:/dev/nvidia-uvm
privileged: true
volumes:
- /dev/shm:/dev/shm
- /tmp/.X11-unix:/tmp/.X11-unix
- /usr/lib/nvidia-470:/usr/lib/nvidia-470
environment:
- DISPLAY=$DISPLAY
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
To check if the GPU is available I run nvidia-smi
before running the ros2 command to start the zed mini:
echo "Starting Zed Mini..."
# setup ros2 environment
source "/opt/ros/$ROS_DISTRO/setup.bash" --
source "/root/ros2_ws/install/local_setup.bash" --
# Welcome information
echo "ZED ROS2 Docker Image"
echo "---------------------"
echo 'ROS distro: ' $ROS_DISTRO
echo 'DDS middleware: ' $RMW_IMPLEMENTATION
echo "---"
echo 'Available ZED packages:'
ros2 pkg list | grep zed
echo "---------------------"
nvidia-smi
ros2 launch zed_wrapper zedm.launch.py
which gives the following output:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.161.03 Driver Version: 470.161.03 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | Off |
| 0% 32C P8 19W / 450W | 384MiB / 24253MiB | 8% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+
but then crashes with the previously mentioned error about no GPU being detected.
Hello, you may miss a few things in your compose file
services:
your_awesome_service:
runtime: nvidia
environment:
- NVIDIA_DRIVER_CAPABILITIES=all
privileged: true
Can you try these ?
Hi, I am following the official docs which can be found here, setting the runtime and driver capabilities accordingly (and this works for other setups I use). privileged: true
is also set, as you can see from my previous post.
Can you update your nvidia driver ? it's quite old, maybe it's getting compatibility issues.
515 version (sudo apt install nvidia-driver-515
) would do the trick.
Unfortunately, there is other software running on the machine that only works with the 470 driver, but I will test out a newer driver when I find some time and will update this response, thanks.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days
Preliminary Checks
Description
When starting the Zed Mini camera from within Docker the published pointcloud returns a black image when visualized. Running
ros2 topic hz /zedm/zed_node/point_cloud/cloud_registered
shows that data is being sent:and other topics, such as
zedm/zed_node/rgb_raw/image_raw_color
, work as intended. Setting QoS on my (python) subscriber, as mentioned here, in the following waydoes not help. Installing version
v3.0.0
of theimage_transport
package via:also didn't fix this and I have tried different lighting and distance settings.
My issue seems related to this discussion, which appears to be stale and I have not been able to find a solution. Any help would be greatly appreciated.
Steps to Reproduce
ros2 launch zed_wrapper zedm.launch.py
/zedm/zed_node/point_cloud/cloud_registered
Expected Result
Pointcloud being visualised correctly.
Actual Result
Black image with following data preview when inspecting topic:
ZED Camera model
ZED Mini
Environment
Anything else?
I'm using a slightly modified Docker script, as the original one did not work and I'm passing the GPU via Docker Compose.
Dockerfile:
with the following entrypoint: