原链接:https://community.bwbot.org/topic/188
运行测试平台:小强ROS机器人
在执行catkin_make
之后iai_kinect2报错
/home/rshanor/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp: In member function ‘void Kinect2Bridge::initConfig(bool, bool, double, double)’:
/home/rshanor/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:400:5: error: ‘Config’ is not a member of ‘libfreenect2::Freenect2Device’
libfreenect2::Freenect2Device::Config config;
^
/home/rshanor/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:400:43: error: expected ‘;’ before ‘config’
libfreenect2::Freenect2Device::Config config;
^
/home/rshanor/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:401:5: error: ‘config’ was not declared in this scope
config.EnableBilateralFilter = bilateral_filter;
^
/home/rshanor/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:405:13: error: ‘class libfreenect2::Freenect2Device’ has no member named ‘setConfiguration’
device->setConfiguration(config);
^
/home/rshanor/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp: In member function ‘void Kinect2Bridge::initConfig(bool, bool, double, double)’:
/home/rshanor/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:400:5: error: ‘Config’ is not a member of ‘libfreenect2::Freenect2Device’
libfreenect2::Freenect2Device::Config config;
^
/home/rshanor/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:400:43: error: expected ‘;’ before ‘config’
libfreenect2::Freenect2Device::Config config;
^
/home/rshanor/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:401:5: error: ‘config’ was not declared in this scope
config.EnableBilateralFilter = bilateral_filter;
^
/home/rshanor/catkin_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:405:13: error: ‘class libfreenect2::Freenect2Device’ has no member named ‘setConfiguration’
device->setConfiguration(config);
解决这个问题安装最新的libfreenect2
就可以了。