Skip to content

sneheshs/openpose_ros

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openpose_ros

Example ros catkin package that utilizes the openpose library from https://github.com/CMU-Perceptual-Computing-Lab/openpose.

System

Tested on:

  • Ubuntu 14.04.5
  • Ros Indigo
  • CUDA 8.0
  • cuDNN 5.1
  • OpenCV 3.2

Installation Steps

  1. Install openpose (not in catkin_workspace).
    git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose.git
  2. Clone the glog_catkin repository into your catkin_workspace/src directory.
    git clone https://github.com/ethz-asl/glog_catkin.git
  3. Clone the gflags repository into your catkin_workspace/src directory.
    git clone https://github.com/davetcoleman/gflags.git
  4. Clone the catkin_simple repository into your catkin_workspace/src directory.
    git clone https://github.com/catkin/catkin_simple.git
  5. Clone this repository into your catkin_workspace/src directory.
    git clone https://github.com/firephinx/openpose_ros.git
  6. Use this only if you want to use RGB-D camera supported with OpenNI.
    sudo apt install ros-kinetic-openni2-launch 
  7. Modify the following lines in the CMakeLists.txt to the proper directories of where you installed caffe and openpose:
    set(CAFFE_DIR /path/to/caffe)
    set(OPENPOSE_DIR /path/to/openpose)
  8. Modify the model_folder line in src/openpose_ros_node.cpp and src/openpose_ros_node_with_face_and_hands.cpp to where openpose is installed.
    DEFINE_string(model_folder,    "/path/to/openpose/models/",    "Folder where the pose models (COCO and MPI) are located.");
  9. Modify the image_topic line in src/openpose_ros_node.cpp and src/openpose_ros_node_with_face_and_hands.cpp to the image_topic you want to process.
    DEFINE_string(camera_topic,    "/camera/image_raw",    "Image topic that OpenPose will process.");
  10. Modify the other parameters in src/openpose_ros_node.cpp and src/openpose_ros_node_with_face_and_hands.cpp to your liking such as the net_resolution and resolution of the image.
  11. Run catkin_make from your catkin_workspace directory. (It will fail the first time so run it twice.)

Potential Installation Issues

  1. 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.
  2. If you have problems with CUDA during catkin_make, uncomment this line # find_package(CUDA REQUIRED)

Running

source catkin_workspace/devel/setup.bash
rosrun openpose_ros openpose_ros_node  ### Just body pose
rosrun openpose_ros openpose_ros_node_with_face_and_hands ### Body pose, face, and hands

Running With ROS and RGB-D

source catkin_workspace/devel/setup.bash
roscore
rosrun rviz rviz
roslaunch openni2_launch openni2.launch
rosrun openpose_ros openpose_ros_node  ### Just body pose
rosrun openpose_ros openpose_ros_node_with_face_and_hands ### Body pose, face, and hands

About

ROS Catkin package wrapper for the openpose library from https://github.com/CMU-Perceptual-Computing-Lab/openpose.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 81.8%
  • CMake 18.2%