Skip to content

trcp/lightweight_openpose_ros2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

install

  • 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

Execute

2D Pose Estimation (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.pth Path to the model checkpoint file.
    device string "cpu" Computation device ("cpu" or "cuda").
    height_size int 256 Input 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 int 10 QoS history depth.
    debug bool true Whether to show the debug window with detection results.
  • Service
    This node does not start detection automatically. You need to call the execute service 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}"

3D Pose Estimation (lor_transformer)

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 double 0.001 Scale factor to convert depth image values to meters (e.g., 0.001 for mm to m).
    depth_sample_size int 5 Window 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 MarkerArray to human_pose_markers which can be viewed in RViz2. The node publishes MarkerArray to human_pose_markers which can be viewed in RViz2.

Demo

ros2 launch lightweight_openpose_ros2 demo_launch.py 

About

lightweight_openpose for ROS2 Package

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 72.4%
  • C++ 25.7%
  • CMake 1.9%