-
Install Python depend packages
pip install -r requirements.txt
-
Donwload model data
cd ./lightweight_openpose_ros2/datas/wget https://download.01.org/opencv/openvino_training_extensions/models/human_pose_estimation/checkpoint_iter_370000.pth
-
Install depend package
rosdep install -y -i --from-path src
-
Build package
colcon build --symlink-install --packages-up-to lightweight_openpose_ros2
ros2 run lightweight_openpose_ros2 lightweight_openpose_ros2 --ros-args -r /image_raw:=<RGB IMAGE TOPIC NAME>-
Parameters
params name type default description checkpoint_path string.../checkpoint_iter_370000.pthPath to the model checkpoint file. device string"cpu"Computation device ( "cpu"or"cuda").height_size int256Input image height for the network. qos.reliability string"RELIABLE"QoS reliability policy ( "RELIABLE"or"BEST_EFFORT").qos.durability string"VOLATILE"QoS durability policy ( "VOLATILE"or"TRANSIENT_LOCAL").qos.depth int10QoS history depth. debug booltrueWhether to show the debug window with detection results. -
Service
This node does not start detection automatically. You need to call theexecuteservice to start/stop detection.-
Start Detection
ros2 service call /execute std_srvs/srv/SetBool "{data: true}" -
Stop Detection
ros2 service call /execute std_srvs/srv/SetBool "{data: false}"
-
This package converts 2D poses to 3D using depth images and camera info. Run the node with remappings to your camera topics.
ros2 run lor_transformer lor_transformer --ros-args \
-r image_raw:=/camera/aligned_depth_to_color/image_raw \
-r depth_camera_info:=/camera/aligned_depth_to_color/camera_info \
-r color_camera_info:=/camera/color/camera_info \
-p target_frame:=base_link![NOTE] Replace
/camera/...with your actual RealSense/Depth camera topics.*
-
Parameters
params name type default description depth_scale double0.001Scale factor to convert depth image values to meters (e.g., 0.001 for mm to m). depth_sample_size int5Window size (NxN) for median depth filtering around the keypoint. target_frame string""Target TF frame for 3D poses. If empty, uses the depth optical frame. -
Visualization The node publishes
MarkerArraytohuman_pose_markerswhich can be viewed in RViz2. The node publishesMarkerArraytohuman_pose_markerswhich can be viewed in RViz2.
ros2 launch lightweight_openpose_ros2 demo_launch.py