# ros_openpose
ROS wrapper for OpenPose | It supports *(currently but others are planned)*-
- [x] Intel RealSense Camera :heavy_check_mark:
- [x] Microsoft Kinect v2 Camera :heavy_check_mark:
- [x] Stereolabs ZED2 Camera :heavy_check_mark: (see [thanks](#thanks) section)
- [x] Azure Kinect Camera :heavy_check_mark:
- [x] Any color camera such as webcam etc :heavy_check_mark:
</br>
<p align="center">
<img src="files/ros_openpose.gif", width="800">
</br>
<sup>Sample video showing visualization on RViz</sup>
</p>
## Supported OpenPose Versions
* 1.7.0 *latest* (see point #1 in [troubleshooting](#troubleshooting) section)
* 1.6.0 (see [thanks](#thanks) section)
* 1.5.1
* 1.5.0
## Dependencies
* [OpenPose](https://github.com/CMU-Perceptual-Computing-Lab/openpose)
Note: Additionally, camera-specific ROS drivers such as following are required as per your camera model-
* [realsense-ros](https://github.com/IntelRealSense/realsense-ros): For Intel RealSense Camera
* [iai_kinect2](https://github.com/code-iai/iai_kinect2): For Microsoft Kinect v2 Camera
* [zed-ros-wrapper](https://github.com/stereolabs/zed-ros-wrapper): For Stereolabs ZED2 Camera
* [azure_kinect_ros_driver](https://github.com/microsoft/Azure_Kinect_ROS_Driver): For Azure Kinect Camera
## 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.
1. Invoke catkin tool inside ros workspace i.e., `catkin_make`
1. Make python scripts executable by using command below-
```bash
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-
```bash
git checkout tags/v1.7.0
```
1. 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-
```bash
git checkout tags/v1.6.0
```
Do not forget to run `sudo make install` to install the OpenPose system-wide.
1. 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](https://github.com/ravijo/ros_openpose/blob/master/CMakeLists.txt)
```
find_package(Threads REQUIRED)
```
For more information, please check [here](https://github.com/ravijo/ros_openpose/issues/12).
1. <s>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](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 OpenPose installation-
```bash
git checkout tags/v1.5.1
```
Do not forget to run `sudo make install` to install the OpenPose system-wide.</s> *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-
```xml
<arg name="openpose_args" value="--model_folder /home/ravi/openpose/models/"/>
```
1. `openpose_args`: It is provided to support the standard OpenPose command-line arguments. Please edit `run.launch` file as shown below-
```xml
<arg name="openpose_args" value="--face --hand"/>
```
1. `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](#thanks) section)
* Uses `op_wrapper.emplaceAndPop()` method provided by OpenPose
* By default this version is disabled. Therefore, please set `synchronous:=true` and provide `py_openpose_path` while calling `run.launch`. For example:
```bash
roslaunch ros_openpose run.launch camera:=realsense synchronous:=true py_openpose_path:=absolute_path_to_py_openpose
```
* 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.
* **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-
```bash
source devel/setup.bash
```
1. Invoke the main launch file by executing the following command-
```bash
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-
```bash
source devel/setup.bash
```
1. Invoke the main launch file by executing the following command-
```bash
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](https://github.com/stereolabs/zed-ros-wrapper/blob/master/zed_wrapper/params/common.yaml) to `true` (default is `0`).
1. Make sure that ROS env is sourced properly by executing the following command-
```bash
source devel/setup.bash
```
1. Invoke the main launch file by executing the following command-
```bash
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-
```bash
source devel/setup.bash
```
1. Invoke the main launch file by executing the following command-
```bash
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-
```bash
source devel/setup.bash
```
1. 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.
1. Invoke the main launch file by executing the following command-
```bash
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 exe
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
从ROS1到ROS2无人机编程实战指南.zip (847个子文件)
CheckForObjects.action 187B
Count.action 130B
analyze_image 214B
.buildinfo 230B
tagCircle49h12.c 1.57MB
tagStandard52h13.c 1.17MB
tagCustom48h12.c 1.01MB
apriltag_quad_thresh.c 59KB
tag36h10.c 59KB
tagStandard41h12.c 56KB
matd.c 54KB
data.c 47KB
apriltag.c 46KB
parser.c 44KB
lsd.c 44KB
go.c 43KB
image.c 38KB
classifier.c 35KB
pjpeg.c 32KB
network.c 30KB
detector.c 27KB
g2d.c 25KB
lstm_layer.c 24KB
region_layer.c 19KB
convolutional_layer.c 19KB
tag36h11.c 18KB
darknet.c 18KB
string_util.c 17KB
image_u8.c 17KB
apriltag_pose.c 17KB
getopt.c 16KB
homography.c 16KB
attention.c 15KB
rnn.c 15KB
zhash.c 15KB
utils.c 14KB
gru_layer.c 13KB
nightmare.c 13KB
coco.c 13KB
yolo_layer.c 12KB
pjpeg-idct.c 12KB
apriltag_pywrap.c 11KB
zmaxheap.c 11KB
connected_layer.c 11KB
yolo.c 11KB
captcha.c 11KB
compare.c 11KB
apriltag_demo.c 10KB
batchnorm_layer.c 10KB
detection_layer.c 10KB
rnn_layer.c 10KB
demo.c 10KB
deconvolutional_layer.c 10KB
blas.c 9KB
crnn_layer.c 9KB
local_layer.c 9KB
box.c 8KB
image_u8x3.c 8KB
gemm.c 8KB
cifar.c 8KB
instance-segmenter.c 8KB
image_u8x4.c 8KB
segmenter.c 8KB
svd22.c 7KB
pam.c 7KB
regressor.c 7KB
iseg_layer.c 7KB
rnn_vid.c 7KB
workerpool.c 6KB
normalization_layer.c 5KB
cost_layer.c 5KB
reorg_layer.c 5KB
pnm.c 5KB
voxel.c 5KB
time_util.c 4KB
layer.c 4KB
writing.c 4KB
tag.c 4KB
tag25h9.c 4KB
matrix.c 4KB
tagCircle21h7.c 4KB
cuda.c 4KB
maxpool_layer.c 4KB
route_layer.c 4KB
tag16h5.c 4KB
activations.c 4KB
tree.c 4KB
super.c 4KB
dice.c 4KB
softmax_layer.c 3KB
upsample_layer.c 3KB
option_list.c 3KB
shortcut_layer.c 3KB
crop_layer.c 3KB
swag.c 2KB
zarray.c 2KB
logistic_layer.c 2KB
avgpool_layer.c 2KB
unionfind.c 2KB
l2norm_layer.c 2KB
共 847 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
极致人生-010
- 粉丝: 3488
- 资源: 3074
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功