{"id":22419911,"url":"https://github.com/ravijo/ros_openpose","last_synced_at":"2025-08-01T04:31:53.143Z","repository":{"id":37307961,"uuid":"211079119","full_name":"ravijo/ros_openpose","owner":"ravijo","description":"ROS wrapper for OpenPose","archived":false,"fork":false,"pushed_at":"2022-12-01T12:28:53.000Z","size":2668,"stargazers_count":121,"open_issues_count":1,"forks_count":59,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-20T22:46:40.413Z","etag":null,"topics":["azure-kinect","camera","intel-realsense-camera","kinect","kinect-v2","kinect4azure","microsoft-kinect","openpose","openpose-ros","openpose-wrapper","realsense","ros","ros-openpose","ros-wrapper","rospackages","rviz","visualization","webcam","zed-camera","zed2"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ravijo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-26T12:03:52.000Z","updated_at":"2023-10-20T15:12:22.000Z","dependencies_parsed_at":"2023-01-23T19:15:32.009Z","dependency_job_id":null,"html_url":"https://github.com/ravijo/ros_openpose","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravijo%2Fros_openpose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravijo%2Fros_openpose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravijo%2Fros_openpose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravijo%2Fros_openpose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravijo","download_url":"https://codeload.github.com/ravijo/ros_openpose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228330027,"owners_count":17903019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-kinect","camera","intel-realsense-camera","kinect","kinect-v2","kinect4azure","microsoft-kinect","openpose","openpose-ros","openpose-wrapper","realsense","ros","ros-openpose","ros-wrapper","rospackages","rviz","visualization","webcam","zed-camera","zed2"],"created_at":"2024-12-05T16:17:07.303Z","updated_at":"2024-12-05T16:17:07.961Z","avatar_url":"https://github.com/ravijo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ros_openpose\n\nROS wrapper for OpenPose | It supports *(currently, but others are planned)*-\n\n\n- [x] Any color camera such as webcam etc :heavy_check_mark:\n- [x] Intel RealSense Camera :heavy_check_mark:\n- [x] Microsoft Kinect v2 Camera :heavy_check_mark:\n- [x] Stereolabs ZED2 Camera :heavy_check_mark: (see [thanks](#thanks) section)\n- [x] Azure Kinect Camera :heavy_check_mark:\n\n\n\u003c/br\u003e\n\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"files/ros_openpose.gif\" alt=\"gif showing demo of ros_openpose\" /\u003e\n    \u003c/br\u003e\n    \u003csup\u003eSample video showing visualization on RViz\u003c/sup\u003e\n\u003c/p\u003e\n\n\n## Overview\n1. [Dependencies](#dependencies)\n1. [Installation](#installation)\n   * [Troubleshooting](#troubleshooting)\n1. [Configuration](#configuration)\n1. [Operation Modes and APIs](#runvar)\n1. [Camera Run Instructions:](#camrun)\n   * [Color Camera](#rgbcam)\n   * [Intel RealSense](#intelrs)\n   * [Microsoft Kinect v2](#kinv2)\n   * [Azure Kinect](#azkin)\n   * [Stereolabs Zed2](#zed2) \n1. [FAQ](#faq)\n1. [Test Configuration](#pkgtest)\n1. [Citation](#citation)\n1. [Issues](#issues)\n1. [Thanks](#thanks)\n\n\n## Dependencies\n* [OpenPose](https://github.com/CMU-Perceptual-Computing-Lab/openpose)\n\n\n  Supported OpenPose Versions:\n  * 1.7.0 *latest* (see point #1 in [troubleshooting](#troubleshooting) section)\n  * 1.6.0 (see [thanks](#thanks) section)\n  * 1.5.1\n  * 1.5.0\n\n\nNote: Additionally, camera-specific ROS drivers such as the following are required as per your camera model-\n* [realsense-ros](https://github.com/IntelRealSense/realsense-ros): For Intel RealSense Camera\n* [iai_kinect2](https://github.com/code-iai/iai_kinect2): For Microsoft Kinect v2 Camera\n* [zed-ros-wrapper](https://github.com/stereolabs/zed-ros-wrapper): For Stereolabs ZED2 Camera\n* [azure_kinect_ros_driver](https://github.com/microsoft/Azure_Kinect_ROS_Driver): For Azure Kinect Camera\n\n\n## Installation\n1. Make sure to download the complete repository. Use `git clone https://github.com/ravijo/ros_openpose.git` or download zip as per your convenience.\n1. Invoke catkin tool inside ros workspace, i.e., `catkin_make`\n1. Make python scripts executable by using the commands below-\n    ```bash\n    roscd ros_openpose/scripts\n    chmod +x *.py\n    ```\n\n\n### Troubleshooting\n1. While compiling the package, if the following error is reported at the terminal-\n    ```\n    error: no matching function for call to ‘op::WrapperStructPose::WrapperStructPose(\u003cbrace-enclosed initializer list\u003e)’\n    ```\n    In this case, please checkout OpenPose version 1.7.0 by running the following command at the root directory of the OpenPose installation-\n    ```bash\n    git checkout tags/v1.7.0\n    ```\n1. While compiling the package, if any of the following error is reported at the terminal-\n    ```\n    error: ‘check’ is not a member of ‘op’\n\n    error: no match for ‘operator=’ (operand types are ‘op::Matrix’ and ‘const cv::Mat’)\n\n    error: invalid initialization of reference of type ‘const op::String\u0026’ from expression of type ‘fLS::clstring {aka std::__cxx11::basic_string\u003cchar\u003e}’\n    ```\n    In this case, please checkout OpenPose version 1.6.0 by running the following command at the root directory of the OpenPose installation-\n    ```bash\n    git checkout tags/v1.6.0\n    ```\n    Do not forget to run `sudo make install` to install the OpenPose system-wide.\n1. If compilation fails by showing the following error-\n    ```\n    /usr/bin/ld: cannot find -lThreads::Threads\n    ```\n    In this case, please put the following by editing the [CMakeLists.txt](https://github.com/ravijo/ros_openpose/blob/master/CMakeLists.txt)\n    ```\n    find_package(Threads REQUIRED)\n    ```\n    For more information, please check [here](https://github.com/ravijo/ros_openpose/issues/12).\n1. \u003cs\u003eWhile compiling the package, if the following error is reported at the terminal-\n    ```\n    error: no match for ‘operator=’ (operand types are ‘op::Matrix’ and ‘const cv::Mat’)\n    ```\n    In this case, please update the OpenPose. Most likely, an old version of OpenPose is installed. So please checkout Openpose from the master branch as [described here](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md#update-openpose). Alternatively, you can checkout OpenPose version 1.5.1 by running the following command at the root directory of the OpenPose installation-\n    ```bash\n    git checkout tags/v1.5.1\n    ```\n    Do not forget to run `sudo make install` to install the OpenPose system-wide.\u003c/s\u003e *Note that OpenPose version 1.5.1 is still supported.*\n\n\n## Configuration\nThe main launch file is `run.launch`. It has the following important arguments-\n1. `model_folder`: It represents the full path to the model directory of OpenPose. Kindly modify it as per OpenPose installation in your machine. Please edit `run.launch` file as shown below-\n    ```xml\n    \u003carg name=\"openpose_args\" value=\"--model_folder /home/ravi/openpose/models/\"/\u003e\n    ```\n1. `openpose_args`: It is provided to support the standard OpenPose command-line arguments. Please edit `run.launch` file as shown below-\n    ```xml\n    \u003carg name=\"openpose_args\" value=\"--face --hand\"/\u003e\n    ```\n1. `camera`: It can only be one of the following: `realsense`, `kinect`, `zed2`, `nodepth`. Default value of this argument is `realsense`. See below for more information.\n\n\n\u003ca name=\"runvar\"\u003e\u003c/a\u003e\n## Operation Modes and APIs\n* **Synchronous API**  (see [thanks](#thanks) section)\n  * Uses `op_wrapper.emplaceAndPop()` method provided by OpenPose\n  * By default this version is disabled. Therefore, please set `synchronous:=true` and provide `py_openpose_path` while calling `run.launch`. For example:\n    ```bash\n    roslaunch ros_openpose run.launch camera:=realsense synchronous:=true py_openpose_path:=absolute_path_to_py_openpose\n    ```\n  * If the arg `py_openpose_path` is not specified, then the CPP node is used. Otherwise, the python node is used. Therefore, please compile OpenPose accordingly if you plan to use python bindings of the OpenPose.\n* **Asynchronous API**\n  * Uses two workers, `op::WorkerProducer` and `op::WorkerConsumer` workers provided by OpenPose\n  * Uses OpenPose CPP APIs\n  * By default this version is enabled. Users are advised to try `synchronous:=true` if not satisfied with the performance.\n\n\n\u003ca name=\"camrun\"\u003e\u003c/a\u003e\n## Camera Run Instructions\nIn this section, you will find the instructions for running ros_openpose with one of the following cameras: Color camera, Realsense, Kinect v2, Azure Kinect, and ZED2.\nIf you have a different camera and would like to use ros_openpose with depth properties, please turn to the [FAQ](#faq) section for tips and guidance on achieving this.\n\n\n\u003ca name=\"rgbcam\"\u003e\u003c/a\u003e\n### Steps to Run with any Color Camera such as Webcam etc.\n1. Make sure that ROS env is sourced properly by executing the following command-\n    ```bash\n    source devel/setup.bash\n    ```\n1. Start the ROS package of your camera. Basically, this package is going to capture images from your camera, and then it is going to publish those images on a ROS topic. Make sure to set the correct ROS topic to `color_topic` inside [config_nodepth.launch](https://github.com/ravijo/ros_openpose/blob/d5d8e05978a1b085d8d6ffdc7604dc99a664d8d8/launch/config_nodepth.launch#L10) file.\n1. Invoke the main launch file by executing the following command-\n    ```bash\n    roslaunch ros_openpose run.launch camera:=nodepth\n    ```\n\nNote: To confirm that ROS package of your camera is working properly, please check if the ROS package is publishing images by executing the following command-\n```bash\nrosrun image_view image_view image:=YOUR_ROSTOPIC\n```\nHere `YOUR_ROSTOPIC` must have the same value as `color_topic`.\n\n\n\u003ca name=\"intelrs\"\u003e\u003c/a\u003e\n### Steps to Run with Intel RealSense Camera\n1. Make sure that ROS env is sourced properly by executing the following command-\n    ```bash\n    source devel/setup.bash\n    ```\n1. Invoke the main launch file by executing the following command-\n    ```bash\n    roslaunch ros_openpose run.launch\n    ```\n\n\n\u003ca name=\"kinv2\"\u003e\u003c/a\u003e\n### Steps to Run with Microsoft Kinect v2 Camera\n1. Make sure that ROS env is sourced properly by executing the following command-\n    ```bash\n    source devel/setup.bash\n    ```\n1. Invoke the main launch file by executing the following command-\n    ```bash\n    roslaunch ros_openpose run.launch camera:=kinect\n    ```\n\n\n\u003ca name=\"azkin\"\u003e\u003c/a\u003e\n### Steps to Run with Azure Kinect Camera\n1. Make sure that ROS env is sourced properly by executing the following command-\n    ```bash\n    source devel/setup.bash\n    ```\n1. Invoke the main launch file by executing the following command-\n    ```bash\n    roslaunch ros_openpose run.launch camera:=azurekinect\n    ```\n\n\n\u003ca name=\"zed2\"\u003e\u003c/a\u003e\n### Steps to Run with Stereolabs ZED2 Camera\n1. Change the parameter `openni_depth_mode` in [zed-ros-wrapper/zed_wrapper/params/common.yaml](https://github.com/stereolabs/zed-ros-wrapper/blob/master/zed_wrapper/params/common.yaml) to `true` (default is `false`).\n1. Make sure that ROS env is sourced properly by executing the following command-\n    ```bash\n    source devel/setup.bash\n    ```\n1. Invoke the main launch file by executing the following command-\n    ```bash\n    roslaunch ros_openpose run.launch camera:=zed2\n    ```\n\n\n## FAQ\n1. **How to add my own depth camera into this wrapper?**\n\n    You might be able to add your own depth camera by creating your own config_\u003ccamera_name\u003e.launch file based on one of the existing ones and modify it to suit your specific camera.\n    Go inside the `launch` subdirectory and make a copy of `config_realsense.launch` and save it as `config_\u003ccamera_name\u003e.launch`. Remember that whatever you choose as the camera_name, should be used as an argument when launching the run.launch to run ros_openpose. Make necessary changes to the `color_topic`, `depth_topic`, `cam_info_topic`, and `frame_id` arguments in the file. Make sure that:\n    * Input depth images are aligned to the color images already. \n    * Depth and color images have the same dimension. Therefore, each pixel from the color image can be mapped to its corresponding depth pixel at the same x, y location. \n    * The depth images contain depth values in millimeters and are represented by `TYPE_16UC1` using OpenCV.\n    * The `cam_info_topic` is containing camera calibration parameters supplied by the manufacturer.\n\n    To achieve visualizations, you also need to create new modified versions of the rviz scripts only_person_\u003ccamera_name\u003e.rviz and person_pointcloud_\u003ccamera_name\u003e.rviz.\n\n    Please check [here](https://github.com/ravijo/ros_openpose/issues/9) for a similar question.\n\n    *If you successfully create modified files and run ros_openpose with a depth camera that is not mentioned here, please share your files and the necessary steps for running with your camera. This useful information can be made available to others.*\n\n2. **How to run this wrapper with limited resources such as low GPU, RAM, etc.?**\n\n    Below is a brief explanation of the `ros_openpose` package. This package does not use GPU directly. However, it depends on `OpenPose`, which uses GPU heavily. It contains a few ROS subscribers, which copies data from the camera using ROS. Next, it employs two workers, namely input and output workers. The job of the input worker is to provide color images to the `OpenPose`, whereas the role of the output worker is to receive the keypoints detected in 2D (pixel) space. The output worker then converts 2D pixels to 3D coordinates. The input worker waits for 10 milliseconds if the camera provides no new frames, and then it checks again if no new frame is available. If not, then wait for 10 milliseconds, and the cycle continues. In this way, we ensure that the CPU gets some time to sleep (indirectly lowering the CPU usage). \n\n    * If the CPU usage are high, try increasing the sleep value (`SLEEP_MS`) as defined [here](https://github.com/ravijo/ros_openpose/blob/d101e2550ded3bd8d6dd71e27ff43693f28894ab/src/rosOpenpose.cpp#L26). \n    * Try reducing the `--net_resolution` and by using `--model_pose COCO`. \n    * Try disabling multithreading in OpenPose software simply by supplying `--disable_multi_thread` to `openpose_args` inside `run.launch` file.\n    * Another easiest way is to decrease the FPS of your camera. Please try to lower it down as per your limitations.\n    \n    Please check [here](https://github.com/ravijo/ros_openpose/issues/6) for a similar question.\n\n3. **How to find the version of the OpenPose installed on my machine?**\n\n   Please use the shell script [get_openpose_version.sh](https://github.com/ravijo/ros_openpose/blob/master/get_openpose_version.sh) as shown below-\n   ```bash\n   sh get_openpose_version.sh\n   ```\n   You can use `cmake` as well. See [here]( https://github.com/ravijo/ros_openpose/blob/b4598b719e5699eb69f80d917a154e008e935c77/CMakeLists.txt#L37)\n\n\n\u003ca name=\"pkgtest\"\u003e\u003c/a\u003e\n## Note on Test Configuration\nThis package has been tested on the following environment configuration-\n\n| Name      | Value                                  |\n| ----------| -------------------------------------- |\n| OS        | Ubuntu 14.04.6 LTS (64-bit)            |\n| RAM       | 16 GB                                  |\n| Processor | Intel® Core™ i7-7700 CPU @ 3.60GHz × 8 |\n| Kernel    | Version 4.4.0-148-generic              |\n| ROS       | Indigo                                 |\n| GCC       | Version 5.5.0                          |\n| OpenCV    | Version 2.4.8                          |\n| OpenPose  | Version 1.5.1                          |\n| GPU       | GeForce GTX 1080                       |\n| CUDA      | Version 8.0.61                         |\n| cuDNN     | Version 5.1.10                         |\n\n\n## Citation\nIf you used `ros_openpose` for your work, please cite it.\n```tex\n@misc{ros_openpose,\n    author = {Joshi, Ravi P. and Choi, Andrew and Tan, Xiang Zhi and Van den Broek, Marike K and Luo, Rui and Choi, Brian},\n    title = {{ROS OpenPose}},\n    year = {2019},\n    publisher = {GitHub},\n    journal = {GitHub Repository},\n    howpublished = {\\url{https://github.com/ravijo/ros_openpose}}\n}\n```\n\n\n\u003ca name=\"issues\"\u003e\u003c/a\u003e\n## Issues (or Error Reporting) \nPlease check [here](https://github.com/ravijo/ros_openpose/issues) and create issues accordingly.\n\n\n## Thanks\nFollowing authors are sincerely acknowledged for the improvements of this package-\n* [Andrew Choi](https://github.com/QuantuMope): For providing synchronous version i.e., `op_wrapper.emplaceAndPop()` support for OpenPose 1.6\n* [Xiang Zhi Tan](https://github.com/xiangzhi): For providing compatibility for OpenPose 1.6\n* [Marike Koch van den Broek](https://github.com/ruksen25): For adding support for [Stereolabs ZED2 Camera](https://www.stereolabs.com/zed-2/)\n* [Rui Luo](https://github.com/luorui93): For fixing a crash in ros_openpose_synchronous.py when nobody or only partial body is visible\n* [Brian Choi](https://github.com/BrianChoi12): Fixing gflags library issue causing compilation error\n* [RiRyuichi](https://github.com/RiRyuichi): For providing support for face keypoints\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravijo%2Fros_openpose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravijo%2Fros_openpose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravijo%2Fros_openpose/lists"}