All Projects → ravijo → Ros_openpose

ravijo / Ros_openpose

Licence: mit
ROS wrapper for OpenPose

Projects that are alternatives of or similar to Ros openpose

Handeye calib camodocal
Easy to use and accurate hand eye calibration which has been working reliably for years (2016-present) with kinect, kinectv2, rgbd cameras, optical trackers, and several robots including the ur5 and kuka iiwa.
Stars: ✭ 364 (+833.33%)
Mutual labels:  ros, camera, kinect
Nager.VideoStream
Get images from a network camera stream or webcam
Stars: ✭ 27 (-30.77%)
Mutual labels:  camera, webcam
Azure kinect ros driver
A ROS sensor driver for the Azure Kinect Developer Kit.
Stars: ✭ 140 (+258.97%)
Mutual labels:  ros, kinect
Pi Webcam
Automation to configure a Raspberry Pi as a USB OTG webcam
Stars: ✭ 990 (+2438.46%)
Mutual labels:  camera, webcam
Live Video Magnification
An OpenCV/Qt based realtime application for Eulerian Video Magnification / Motion Magnification. Works with multiple videos and cameras at the same time and let's you export the magnified videos.
Stars: ✭ 187 (+379.49%)
Mutual labels:  camera, webcam
Esp32 Cam Webserver
Expanded version of the Espressif ESP webcam
Stars: ✭ 200 (+412.82%)
Mutual labels:  camera, webcam
jeelizPupillometry
Real-time pupillometry in the web browser using a 4K webcam video feed processed by this WebGL/Javascript library. 2 demo experiments are included.
Stars: ✭ 78 (+100%)
Mutual labels:  camera, webcam
Nivirtualcam
OpenNI 2 Virtual Webcam - Directshow Filter
Stars: ✭ 95 (+143.59%)
Mutual labels:  webcam, kinect
Showmewebcam
Raspberry Pi + High Quality Camera = High-quality USB Webcam!
Stars: ✭ 531 (+1261.54%)
Mutual labels:  camera, webcam
Dodo detector ros
Object detection from images/point cloud using ROS
Stars: ✭ 31 (-20.51%)
Mutual labels:  ros, kinect
Unitybarcodescanner
Simple Unity Barcode Scanner
Stars: ✭ 180 (+361.54%)
Mutual labels:  camera, webcam
Lidar camera calibration
ROS package to find a rigid-body transformation between a LiDAR and a camera for "LiDAR-Camera Calibration using 3D-3D Point correspondences"
Stars: ✭ 734 (+1782.05%)
Mutual labels:  ros, camera
Ngx Webcam
A simple Angular webcam component / pure & minimal, no flash-fallback
Stars: ✭ 148 (+279.49%)
Mutual labels:  camera, webcam
Instascan
HTML5 QR code scanner using your webcam
Stars: ✭ 2,657 (+6712.82%)
Mutual labels:  camera, webcam
Instacam
Instant canvas video
Stars: ✭ 106 (+171.79%)
Mutual labels:  camera, webcam
spinnaker sdk camera driver
Point Grey (FLIR) Spinnaker based camera driver (Blackfly S etc.)
Stars: ✭ 106 (+171.79%)
Mutual labels:  camera, ros
Easy handeye
Automated, hardware-independent Hand-Eye Calibration
Stars: ✭ 355 (+810.26%)
Mutual labels:  ros, camera
Cam2ip
Turn any webcam into an IP camera
Stars: ✭ 587 (+1405.13%)
Mutual labels:  camera, webcam
True artificial intelligence
真AI人工智能
Stars: ✭ 38 (-2.56%)
Mutual labels:  ros, kinect
Navigator
NaviGator ASV on-board software
Stars: ✭ 29 (-25.64%)
Mutual labels:  ros

ros_openpose

ROS wrapper for OpenPose | It supports (currently but others are planned)-

  • [x] Intel RealSense Camera ✔️
  • [x] Microsoft Kinect v2 Camera ✔️
  • [x] Stereolabs ZED2 Camera ✔️ (see thanks section)
  • [x] Azure Kinect Camera ✔️
  • [x] Any color camera such as webcam etc ✔️

Sample video showing visualization on RViz

Supported OpenPose Versions

Dependencies

Note: Additionally, camera-specific ROS drivers such as following are required as per your camera model-

Installation

  1. Make sure to download the complete repository. Use git clone https://github.com/ravijo/ros_openpose.git or download zip as per your convenience.
  2. Invoke catkin tool inside ros workspace i.e., catkin_make
  3. Make python scripts executable by using command below-
roscd ros_openpose/scripts
chmod +x *.py

Troubleshooting

  1. While compiling the package, if the following error is reported at the terminal-
    error: no matching function for call to ‘op::WrapperStructPose::WrapperStructPose(<brace-enclosed initializer list>)’
    
    In this case, please checkout OpenPose version 1.7.0 by running the following command at the root directory of OpenPose installation-
    git checkout tags/v1.7.0
    
  2. While compiling the package, if any of the following error is reported at the terminal-
    error: ‘check’ is not a member of ‘op’
    
    error: no match for ‘operator=’ (operand types are ‘op::Matrix’ and ‘const cv::Mat’)
    
    error: invalid initialization of reference of type ‘const op::String&’ from expression of type ‘fLS::clstring {aka std::__cxx11::basic_string<char>}’
    
    In this case, please checkout OpenPose version 1.6.0 by running the following command at the root directory of OpenPose installation-
    git checkout tags/v1.6.0
    
    Do not forget to run sudo make install to install the OpenPose system-wide.
  3. If compliation fails by showing the following error-
    /usr/bin/ld: cannot find -lThreads::Threads
    
    In this case, please put the following by editing the CMakeLists.txt
    find_package(Threads REQUIRED)
    
    For more information, please check here.
  4. While compiling the package, if the following error is reported at the terminal-
    error: no match for ‘operator=’ (operand types are ‘op::Matrix’ and ‘const cv::Mat’)
    
    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. Alternatively, you can checkout OpenPose version 1.5.1 by running the following command at the root directory of OpenPose installation-
    git checkout tags/v1.5.1
    
    Do not forget to run sudo make install to install the OpenPose system-wide.
    Note that OpenPose version 1.5.1 is still supported.

Configuration

The main launch file is run.launch. It has the following important arguments-

  1. 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-
    <arg name="openpose_args" value="--model_folder /home/ravi/openpose/models/"/>
    
  2. openpose_args: It is provided to support the standard OpenPose command-line arguments. Please edit run.launch file as shown below-
    <arg name="openpose_args" value="--face --hand"/>
    
  3. 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.

Implementation Versions Info.

  • Synchronous API (see thanks section)
    • Tested with 1.6.0
      • Please report in case of any errors. In this situation please use OpenPose v1.6.0
    • Uses op_wrapper.emplaceAndPop() method provided by OpenPose
    • Uses OpenPose Python bindings. Therefore, please compile OpenPose accordingly
    • By default this version is disabled. Therefore, please set synchronous:=true and provide py_openpose_path while calling run.launch. For example:
      roslaunch ros_openpose run.launch camera:=realsense synchronous:=true py_openpose_path:=absolute_path_to_py_openpose
      
  • Asynchronous API
    • Uses two workers, op::WorkerProducer and op::WorkerConsumer workers provided by OpenPose
    • Uses OpenPose CPP APIs
    • By default this version is enabled. Users are advised to try synchronous:=true if not satisfied with the performance.

Steps to Run with Intel RealSense Camera

  1. Make sure that ROS env is sourced properly by executing the following command-
    source devel/setup.bash
    
  2. Invoke the main launch file by executing the following command-
    roslaunch ros_openpose run.launch
    

Steps to Run with Microsoft Kinect v2 Camera

  1. Make sure that ROS env is sourced properly by executing the following command-
    source devel/setup.bash
    
  2. Invoke the main launch file by executing the following command-
    roslaunch ros_openpose run.launch camera:=kinect
    

Steps to Run with Stereolabs ZED2 Camera

  1. Change the parameter openni_depth_mode in zed-ros-wrapper/zed_wrapper/params/common.yaml to true (default is 0).
  2. Make sure that ROS env is sourced properly by executing the following command-
    source devel/setup.bash
    
  3. Invoke the main launch file by executing the following command-
    roslaunch ros_openpose run.launch camera:=zed2
    

Steps to Run with Azure Kinect Camera

  1. Make sure that ROS env is sourced properly by executing the following command-
    source devel/setup.bash
    
  2. Invoke the main launch file by executing the following command-
    roslaunch ros_openpose run.launch camera:=azurekinect
    

Steps to Run with any Color Camera such as Webcam etc.

  1. Make sure that ROS env is sourced properly by executing the following command-
    source devel/setup.bash
    
  2. 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 file.
  3. Invoke the main launch file by executing the following command-
    roslaunch ros_openpose run.launch camera:=nodepth
    

Note: 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-

rosrun image_view image_view image:=YOUR_ROSTOPIC

Here YOUR_ROSTOPIC must have the same value as color_topic.

FAQ

  1. How to add my own depth camera into this wrapper?

    Go inside launch subdirectory and make a copy of config_realsense.launch as config_mycamera.launch. Make necessary changes to the color_topic, depth_topic, cam_info_topic and frame_id arguments. More inforation is given below-

    • Input depth images are aligned to the color images already.
    • Depth and color images have the same dimension. Therefore, each pixel from the color image can be mapped to corresponding depth pixel at the same x, y location.
    • The depth images contain depth values in millimeters and represented by TYPE_16UC1 using OpenCV.
    • The cam_info_topic is containing camera calibration parameters supplied by the manufacturer.

    Please check here for a similar question.

  2. How to run this wrapper with limited resources such as low GPU, RAM, etc.?

    Below is a brief explanation about 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 make sure that the CPU gets some time to sleep (indirectly lowering the CPU usage).

    • If the CPU usage are high, try increasing the sleep value (SLEEP_MS) as defined here.
    • Try reducing the --net_resolution and by using --model_pose COCO.
    • Try disabling multithreading in OpenPose software simply by supplying --disable_multi_thread to openpose_args inside run.launch file.
    • Another easiest way is to decrease the FPS of your camera. Please try to lower it down as per your limitations.

    Please check here for a similar question.

  3. How to find the version of the OpenPose installed on my machine?

    Please use the shell script get_openpose_version.sh as shown below-

    sh get_openpose_version.sh
    

    You can use cmake as well. See here

Note

This package has been tested on the following environment configuration-

Name Value
OS Ubuntu 14.04.6 LTS (64-bit)
RAM 16 GB
Processor Intel® Core™ i7-7700 CPU @ 3.60GHz × 8
Kernel Version 4.4.0-148-generic
ROS Indigo
GCC Version 5.5.0
OpenCV Version 2.4.8
OpenPose Version 1.5.1
GPU GeForce GTX 1080
CUDA Version 8.0.61
cuDNN Version 5.1.10

Issues (or Error Reporting)

Please check here and create issues accordingly.

Thanks

Following authors are sincerely acknowledged for the improvements of this package-

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].