ROS1 wrapper package for hand detection and mocap with hand_object_detector and frankmocap.
This package is build upon
- ROS1 (Noetic)
torch==1.12
andcuda-11.3
- (Optional) docker and nvidia-container-toolkit (for environment safety)
It is better to use docker environment cause it needs specific cuda version and build environment. But you can build it directly if you want provided that you use cuda-11.3
and torch==1.12
. Instruction's are below.
mkdir -p ~/ros/catkin_ws/src && cd ~/ros/catkin_ws/src
git clone https://github.com/ojh6404/hand_object_detection_ros.git
cd ~/ros/catkin_ws/src/hand_object_detection_ros
./prepare.sh # install torch and build python submodules
cd ~/ros/catkin_ws && catkin b
Otherwise, you can build this package on docker environment.
git clone https://github.com/ojh6404/hand_object_detection_ros.git
cd hand_object_detection_ros && catkin bt # to build message
docker build -t hand_object_detection_ros .
roslaunch hand_object_detection_ros sample.launch \
input_image:=/kinect_head/rgb/image_rect_color \
device:=cuda:0 \
with_handmocap:=true
You can run on docker by
./run_docker -host pr1040 -launch sample.launch \
input_image:=/kinect_head/rgb/image_rect_color \
device:=cuda:0 \
with_handmocap:=true
where
-host
: hostname likepr1040
orlocalhost
-launch
: launch file name to run
launch args below.
input_image
: input image topicdevice
: which device to use.cpu
orcuda
. default iscuda:0
.hand_threshold
: hand detection threshold. default is0.9
.object_threshold
: object detection threshold. default is0.9
.with_handmocap
: use frankmocap or not. if you need faster detection and don't need mocap, then setfalse
. default istrue
.
~hand_detections
:HandDetectionArray
. array of hand detection results. please refer tomsg
~debug_image
:Image
. image for visualization.
add rostest and docker build test.