openpose_ros
Example ROS catkin package that utilizes the OpenPose library from https://github.com/CMU-Perceptual-Computing-Lab/openpose.
System
Tested on:
Installation Steps
- Clone OpenPose somewhere not in your catkin_workspace.
git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose.git
- IMPORTANT: I do not update this repository very frequently and the maintainers of OpenPose tend to change their API frequently, so I can only guarantee that it will work with certain versions of OpenPose. Currently I have updated this ros wrapper to work with commit b1cb2b6. You can use get that version by running the following commands:
cd openpose
git checkout b1cb2b6
- Install openpose using instructions from here: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/b1cb2b69cf8c4c288921e48c37f339a64db26f58/doc/installation/0_index.md. Make sure to run
sudo make install
in the build folder at the end.
- Clone this repository into your catkin_workspace/src directory.
git clone https://github.com/firephinx/openpose_ros.git
- Modify the model_folder line in openpose_ros/src/openpose_flags.cpp to where openpose is installed (line 30).
DEFINE_string(model_folder, "/path/to/openpose/models/", "Folder path (absolute or relative) where the models (pose, face, ...) are located.");
- Modify the image_topic parameter in openpose_ros/launch/openpose_ros.launch to the image_topic you want to process.
<param name="image_topic" value="/camera/image_raw" />
- Modify the other parameters in openpose_ros/src/openpose_flags.cpp and openpose_ros/launch/openpose_ros.launch to your liking such as enabling face and hands detection.
- Run catkin_make from your catkin_workspace directory.
Potential Installation Issues
- If cv_bridge is causing you errors and/or you decide to use OpenCV 3.2+, copy the cv_bridge folder from https://github.com/ros-perception/vision_opencv into your catkin_workspace/src directory.
Running
source catkin_workspace/devel/setup.bash
roslaunch openpose_ros openpose_ros.launch