ROS1 wrapper package for motion capture with hand_object_detector, frankmocap, HaMeR and 4D-Humans.
This package is build upon
- ROS1 (Noetic)
torch
andcuda
- (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.
mkdir -p ~/ros/catkin_ws/src && cd ~/ros/catkin_ws/src
git clone https://github.com/ojh6404/mocap_ros.git
cd ~/ros/catkin_ws/src/mocap_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/mocap_ros.git
cd mocap_ros && catkin bt # to build message
docker build -t mocap_ros .
roslaunch mocap_ros hand_mocap.launch \
input_image:=/kinect_head/rgb/image_rect_color \
device:=cuda:0 \
with_mocap:=true
You can run on docker by
./run_docker -host pr1040 -launch hand_mocap.launch \
input_image:=/kinect_head/rgb/image_rect_color \
device:=cuda:0 \
with_mocap:=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 mocap or not. if you need faster detection and don't need mocap, then setfalse
. default istrue
.
~hand_detections
:MocapDetectionArray
. array of hand detection results. please refer tomsg
~debug_image
:Image
. image for visualization.tf
:tf
. (Optional) publish transforms of key points.
add rostest and docker build test.