1.首先要安装ladybug5驱动,然后在安装ladybug5_ros。
驱动安装过程中报错及解决方法为:
安装驱动:
在Installing and Configuring Linux这一步中
sudo apt-get install libgtkmm-2.4-1v5 libglademm-2.4-1v5出现问题,无法找到安装包,而按tab安装了libgtkmm-2.4-1cxxxx和libglademm-2.4-1cxxxx。
首先按照TAN2012007-Using-Linux-USB3.pdf进行安装,执行到安装驱动前一步,由于官网提示
Please note that Linux installation will fail if FlyCapture2 for linux is already installed. Please remove any installations of FlyCapture2 SDK before installation
因此不要安装FlyCapture2。
之后使用ladybug驱动发现无法安装,提示
dpkg: 依赖关系问题使得 ladybug 的配置工作不能继续:
ladybug 依赖于 xsdcxx;然而:
未安装软件包 xsdcxx。
使用sudo apt-get install xsdcxx之后,一路选是
再执行$ sudo dpkg -i ladybug-<version>_<platform>.deb(直接在目录下打好前面按tab自动出版本号和平台号)
ffmpeg:
先执行./configure 报错 执行sed -i 's/\r$//' configure 再执行./configure
然后执行make 然后sudo make install
例程:
找到/usr/src/flycapture/src/例程,按提示make,
此时仍无法使用,提示
g++ -Wall -pthread -fPIC -std=c++11 -O2 -DNDEBUG -I../../include -I/usr/include/ladybug -I/mnt/software-lib/Boost/boost_1_60_0 -c stdafx.h
g++ -Wall -pthread -fPIC -std=c++11 -O2 -DNDEBUG -I../../include -I/usr/include/ladybug -I/mnt/software-lib/Boost/boost_1_60_0 -c LadybugRecorderConsoleConfiguration.cpp -o obj/rel/LadybugRecorderConsoleConfiguration.o
In file included from LadybugRecorderConsoleConfiguration.cpp:17:0:
LadybugRecorderConsoleConfiguration.h:34:2: error: #error XSD runtime version mismatch
#error XSD runtime version mismatch
^
In file included from LadybugRecorderConsoleConfiguration.h:39:0,
from LadybugRecorderConsoleConfiguration.cpp:17:
/usr/include/xsd/cxx/xml/char-utf8.hxx:13:48: fatal error: xercesc/util/XercesDefs.hpp: 没有那个文件或目录
#include <xercesc/util/XercesDefs.hpp> // XMLCh
^
compilation terminated.
make: *** [obj/rel/LadybugRecorderConsoleConfiguration.o] 错误 1
之后安装sudo apt-get install libxerces-c3.1 还有 sudo apt-get install libxerces-c-dev
仍未解决
直接跑的程序:
/usr/bin/LadybugRecorderConsole
问题 libstdc++.so.6无此文件
做了软连接后,仍然不能通过。
使用github上的程序:
在/home/tangdi/Autoware/ros/src/computing/planning/common/lib/openplanner/op_simu
/home/tangdi/Autoware/ros/src/computing/perception/localization/packages/orb_localizer
/home/tangdi/Autoware/ros/src/computing/perception/localization/packages/orb_localizer/Thirdparty/g2o
的CMakeLists.txt 里把 find_package( Eigen3 REQUIRED ) 改成 INCLUDE_DIRECTORIES( "/usr/include/eigen3" )
但都换掉也会报错,而且是ros的问题,这时候需要在其中一个里面添加FindEigen3.cmake文件,我放在了最后一个
ros的问题是computing/perception/detection/lib/libvectormap/CMakeLists.txt
http://blog.csdn.net/dddccc1234/article/details/50535011可以把让Eigen能直接include但仍不能find_package()
ros调试报错:
1.运行 roslaunch pointgrey ladybug.launch,报错
NODES
/
ladybug_camera_node (pointgrey/ladybug_camera_node)
ROS_MASTER_URI=http://localhost:11311
ERROR: cannot launch node of type [pointgrey/ladybug_camera_node]: can't locate node [ladybug_camera_node] in package [pointgrey]
No processes to monitor
shutting down processing monitor...
... shutting down processing monitor complete
解决方法:
节点名称不对应,roslaunch文件内容为
<node pkg="pointgrey" type="ladybug_camera_node" name="ladybug_camera_node" output="screen">
根据其内容,节点名称应为ladybug_camera_node,但在cmakelist中节点的名称不对应,改成如下形式即可。
add_executable(ladybug_camera_node
nodes/ladybug/ladybug_node.cpp
nodes/ladybug/ladybug_cam.cpp
)
target_link_libraries(ladybug_camera_node
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${OpenCV_LIBS}
${XercesC_LIBRARIES}
ladybug
/usr/lib/libladybug.so
# ${Ladybug_LIBS}
)
2. ladybug读取失败,在/usr/src/ladybug/src/Ladybugrecordconsle 中自带的测试程序,测试通过,需要在sudo权限下才能运行,在运行ros节点时报错如下。
[ INFO] [1531834003.420883924]: Insufficient number of cameras detected.
[ INFO] [1531834003.420940674]: Error: Failed to initialize camera (Operation failed). Terminating...
解决:
1.电脑重启并将ladybug断电2分钟后,重新启动即可成功。
2.换ladybug的usb端口试试