我想使用Chaos84(https://github.com/Chaos84/skeleton_tracker)的skeleton_tracker软件包将骨骼关节视为ROS中的变换。我正在将Ubuntu 12.04与ROS Indigo,Openni2,NiTE2.2和Asus Xtion Pro Live摄像机(编号:601)一起使用。
尽管遵循了我在该论坛上找到并回答的大多数教程,并且大约需要进行4到5个完整安装,但我仍无法使用该软件包。
首先,我安装了必需的依赖项(libusb-1.0-0-dev libudev-dev,openjdk-6-jdk ...)和OpenNi2驱动程序($ sudo apt install libopenni-sensor-primesense0)。我在主目录中同时安装了OpenNi2(进入文件夹和$ make)和Nite2.2(使用$ sudo ./install.sh)。我对其进行了测试(./NiViewer和./UserViewer),可以看到其中一个的深度图像和另一个的骨架跟踪器正常工作。为了使Nite2.2正常工作,我必须:
$ sudo ln -s /lib/x86_64-linux-gnu/libudev.so.1.3.5 /lib/x86_64-linux-
gnu/libuddev.so.0
然后我下载openni2_camera(和rgbd_launch),编译并运行:
$ roslaunch openni2_launch openni2.launch
,我还可以在rviz上看到PointCloud。现在,我下载了skateline_tracker软件包,转到CMake并编辑OpenNi2和Nite2.2路径以指向我相应的目录:
CMake(已编辑部分):
set(OPENNI2_DIR ~/src/OpenNI2)
set(OPENNI2_WRAPPER /opt/ros/indigo/include/openni2_camera/)
set(NITE2_DIR ~/src/NiTE-Linux-x64-2.2/)
set(NITE2_LIB ~/src/NiTE-Linux-x64-2.2/Redist/libNiTE2.so)
当我做catkin_make时,它给出类似于以下内容的错误:
/usr/bin/ld: cannot find -DummyDevice, -lOniFile and -lPS1080.
环顾四周后,我发现了驱动程序在Openni2文件夹中的位置,因此我手动将它们包括在CMakefile中(前两行):
link_directories(${OPENNI2_DIR}/Bin/x64-Release/OpenNI2/Drivers)
include_directories(${OPENNI2_DIR}/Bin/x64-Release/OpenNI2/Drivers)
include_directories(/usr/include/openni2/)
include_directories(${OPENNI2_DIR}/Include)
include_directories(${OPENNI2_WRAPPER})
include_directories(${NITE2_DIR}/Include)
include_directories(${OpenCV_INCLUDE_DIRS}/include)
这已经使我认为安装中的某些问题是错误的,因为在互联网上没有人看到此错误。
我收到的下一个编译错误是有关缺少包含文件的信息,
#include <openni_camera/OpenNIConfig.h>
#include "openni_camera/openni_depth_image.h"
#include "openni_camera/openni_exception.h"
我认为Openni包含哪些,而不是Openni2包含?无论如何,我使用以下命令安装Openni:
$ sudo apt-get install ros-indigo-openni
所有这些之后,项目就会编译,但是当我这样做时:
$ roslaunch skeleton_tracker tracker.launch
整流器节点在启动时死亡。这是控制台日志:
started roslaunch server http://deidad292-PC:35201/
SUMMARY
========
PARAMETERS
* /rectifier/depth_registration: True
* /rosdistro: indigo
* /rosversion: 1.11.21
* /skeleton_tracker/camera_frame: /camera_frame
* /skeleton_tracker/relative_frame: /tracker_depth_frame
* /skeleton_tracker/tf_prefix: tracker
NODES
/
depth_toObjRecog (tf/static_transform_publisher)
manager (nodelet/nodelet)
rectifier (nodelet/nodelet)
skeleton_tracker (skeleton_tracker/xtion_tracker)
top_plate_to_tracker (tf/static_transform_publisher)
auto-starting new master
process[master]: started with pid [3487]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to e6c1d6be-a59f-11e9-8cbb-503eaa49da0a
process[rosout-1]: started with pid [3500]
started core service [/rosout]
process[skeleton_tracker-2]: started with pid [3507]
process[manager-3]: started with pid [3515]
process[rectifier-4]: started with pid [3519]
process[top_plate_to_tracker-5]: started with pid [3520]
process[depth_toObjRecog-6]: started with pid [3526]
Warning: USB events thread - failed to set priority. This might cause loss of data...
[rectifier-4] process has died [pid 3519, exit code 255, cmd /opt/ros/indigo/lib/nodelet/nodelet depth_image_proc/disparity __name:=rectifier __log:=/home/deidad292/.ros/log/e6c1d6be-a59f-11e9-8cbb-503eaa49da0a/rectifier-4.log].
log file: /home/deidad292/.ros/log/e6c1d6be-a59f-11e9-8cbb-503eaa49da0a/rectifier-4*.log
[ INFO] [1563044181.020024267]: Device opened
[ INFO] [1563044181.123248821]: The wished depth mode is 640 x 480 at 30 FPS. Pixel format 100
[ INFO] [1563044181.123604445]: The wished video mode is 640 x 480 at 30 FPS. Pixel format 200
这使程序正常工作(它跟踪我,并且我可以在Rviz和点云上捕获标记),但是由于此nodelet崩溃,引用都被弄乱了(我看到我的骨骼的脚踩在墙上例如)。
有人知道我做错了什么吗?我已经看到一些人很容易使用该程序包的评论,经过2个星期的尝试,我感到绝望。任何帮助表示赞赏。