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
Add hand pose estimation #2601
Add hand pose estimation #2601
Conversation
@W567 thank you for your update. EDIT: I found the new rosbag file. |
@knorth55 I have sent you the gmail, please have a check, thank you very much. It’s really weird that the detecting part failed, hope the new rosbag works well. |
@W567 I'm running with the latest rosbag, but it doesn't show detection results. |
@knorth55 The latest rosbag is already the bag recorded when running with torch 1.4.0 cpu, and it did work on my computer... |
@W567 can you return the value of this command?
|
@knorth55 It should be 9f39d3baa43cf1c962c8f752c009eb14 |
I found out that we need to use maybe your python is not python2.
|
@knorth55 Oh, yes, I'm running with python 3.7.10 for this program. Thank you for the correction. |
@W567 I tried with my local machine and it works great! Screencast.2021-05-25.20.43.07.mp4 |
@knorth55 So nice to hear it works, and thank you so much for helping me with the debugging. I once used conda and when I started using ros, it did output many errors...so I've already removed the conda activation line in ~/.bashrc. But after that, the python packages is located everywhere with different python versions, so I currently mainly try to export different PYTHONPATH to control the packages for different programs...Maybe I need to tidy up my packages now. Anyway, thank you again for your advice and debugging. |
@W567 no problem. ROS depends on |
@knorth55 I see, I'll pay attention, thanks for the instruction. |
@tohirose this PR is super cool, and it also runs on CPU! |
@W567 @knorth55 Great work! Is there any reason that you did not use
|
for pytorch+gpu, we need to install specific version manually. but if you install gpu, you can use gpu for this demo, I think, but I haven't tried yet. |
@k-okada Sorry for the late response. I've switched to Driver Version 390.143 in 'Software & Updates' to test the program. And it did output the same result. I think it is because in the hand_pose_estimation_2d.py, we check
It is likely that downloading nvidia-driver-390 from 'Software & Updates' won't download the cuda toolkit at the same time. So As @knorth55 mentioned, we need to install specific version of pytorch, gpu driver and cuda. It is recommended to use pytorch>=1.4.0 to run the program. According to the official website of pytorch, CUDA 9.2 is the minial requirement. And according to the official website of nvidia, Driver Version >= 396.26 is the minimal requirement for CUDA9.2. https://pytorch.org/get-started/previous-versions/ https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html So, could you please update your driver and test the program again? I don't know if you are using 'Software & Updates' to download the gpu driver, but it works well when I use it to switch to the driver version of 465, in this case, the cuda toolkit is downloaded automatically. Or if you are downloading the driver manually, please download
I'm not familiar with rosdep before, and would like to use it from now on. Thank you for the tips. |
I found a solution with nvidia-driver-390 + CUDA9.1 (default nvidia driver bionic) First, download from Then install them
Finally, we can run this launch with
It works
srhand_gpu.mp4 |
New version of #2600 and #2597.
Fixed image color problem in previous PRs, which is caused by wrongly setting the the cv_bridge image encoding format to rgb8 instead of bgr8 in
cv2_to_imgmsg(frame, encoding='rgb8')
andimgmsg_to_cv2(frame, encoding='rgb8')
in d70f5aa.Changed the color variable name sequence as in d70f5aa from r, g, b to b, g, r, as the previous sequence did cause misunderstanding, though the variable name didn't effect the detection functionality,
The rosbag file is also updated.