-
Notifications
You must be signed in to change notification settings - Fork 225
Support property specifying GPU to bind to. #115
Comments
As far as I know you can only specify which GPU will be used for the Body Tracking SDK. The create() method takes an optional configuration that you can provide. So the code should like this if you want to use the RTX 2080 (id = 1) for example:
|
Thanks @RoseFlunder for answering on this. I would appreciate a pull request on this topic - I'm unable to test multi-gpu scenarios at the moment. |
I just tested it with the following code as suggested by RoseFlunder:
I specifically put 0(default) for testing based on the discussion here. However, I run into the following errors:
I'm curious why the selection of GPU would cause an error (even when I use the default setting). I used the driver.launch with the depth enabled and I have tried all the four depth_mode (NFOV_ and WFOV_) and they all return the same error as listed above. When I run
|
I'm asking the Azure Kinect SDK team to take a look at this. In the mean time, I suspect that you need to change the ROS parameters for the depth in order for Body Tracking to work. |
Did you change it exactly at the line I linked? I have only a single GPU and can confirm that is working when using device id 0 (my only valid device id).
If I set a wrong device id like 1, I will get an expected Cuda error: Edit: |
I believe I have put them into the correct position. However, I could be wrong (my major is mechanical). I have uploaded the k4a_ros_device.cpp file here Starting from line 301, I have the following:
Also, I have tried different ros parameters for depth_mode and they all give the same error. |
Looks good to me. |
I just unplugged the camera from my PC and then re plugged it back. The problem seems to be solved.
When I set the gpu_device_id = 0, the body tracking result seems to be very responsive and the nvidia-smi shows the following:
However, when I set the gpu_device_id = 1, the body tracking result seems to be much slower than before and the nvidia-smi shows the following:
For some reasons, the device_id cannot set the graphics card properly. I wonder if you may help to investigate what's going on? For now, I can work on my application. But the others may run into similar problems. I have also uploaded my working directory here for your reference. |
Hmm I can't really test anything because I only have a single GPU, but from the looks of it, it seems like GPU device ID 0 in the SDK may use the GPU the nvidia-smi output lists as 1 and SDK GPU device ID 1 may be the one nvidia-smi lists as 0. EDIT: EDIT2: EDIT3: |
Hello,
My PC just installed another GPU for the Azure Kinect. I wonder if I need to change some parameters of this ROS package to tell the SDK which GPU it should use?
Currently if I run nvidia-smi I have the following results:
`+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro P1000 On | 00000000:03:00.0 On | N/A |
| 34% 50C P0 N/A / N/A | 382MiB / 4031MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce RTX 208... On | 00000000:04:00.0 Off | N/A |
| 0% 40C P8 18W / 250W | 1MiB / 11019MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1457 G /usr/lib/xorg/Xorg 65MiB |
| 0 1599 G /usr/bin/gnome-shell 52MiB |
| 0 1872 G /usr/lib/xorg/Xorg 164MiB |
| 0 2017 G /usr/bin/gnome-shell 95MiB |
`
Thank you.
The text was updated successfully, but these errors were encountered: