仿人机器人开源平台安装说明
- 1.安装虚拟机
- 2.安装ros kinect
- 3. 安装nimbro包
- 3.1 installation
- 3.1.1 参考网址进行
- 3.1.2 bug list
- 3.1.2.1. Depends: libguvcview-2.0-0 but it is not going to be installed
- 3.1.2.2 No package 'gsl' found
- 3.1.2.3 The following variables are used in this project, but they are set to NOTFOUND
- 3.1.2.4 Make Error: The following variables are used in this project, but they are set to NOTFOUND.
- 3.1.2.5 Parse error at "BOOST_JOIN"
- 3.1.2.6 error: no matching function for call to ‘qglviewer::Quaternion::getRotationMatrix(float [3][3]) 数据类型不匹配导致函数无法被找到!!!!
- 3.1.2.7 error: cannot convert ‘qreal (*)[3][3] {aka double (*)[3][3]}’ to ‘float (*)[3][3]’ in assignment 数据类型不匹配导致函数无法被找到!!!!
- 3.1.2.8 error: no matching function for call to ‘g2o::BlockSolver 数据类型不匹配导致函数无法被找到!!!!
- 3.1.2.8 error: ‘Vector’ was not declared in this scope
- 3.1.2.9 error: Killed (program cc1plus) Please submit a full bug report
1.安装虚拟机
(1)安装Vimware虚拟机软件
(2)安装 虚拟机到vimware中
2.安装ros kinect
2.1. 参考下面网址步骤进行
http://wiki.ros.org/kinetic/Installation/Ubuntu
2.2. bug list
2.2.1. ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.
anwser:网址被墙,使用clash翻墙后问题解决参考网址
https://www.qwqjsq8.com/user/tutorial?os=linux&client=clash
3. 安装nimbro包
3.1 installation
3.1.1 参考网址进行
http://nimbro.net/OP/Doc/html/installation.html
由于ros版本由indigo变为kinetic版本,命令中所有indigo均应替换为kinetic
3.1.2 bug list
3.1.2.1. Depends: libguvcview-2.0-0 but it is not going to be installed
The following information may help to resolve the situation:
The following packages have unmet dependencies:
guvcview : Depends: libguvcview-2.0-0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install libgsl2
sudo apt-get install libguvcview-2.0-0
3.1.2.2 No package ‘gsl’ found
Could NOT find CHOLMOD (missing: CHOLMOD_INCLUDE_DIR CHOLMOD_LIBRARIES)
– Checking for module ‘gsl’
– No package ‘gsl’ found
sudo apt install libgsl-dev
3.1.2.3 The following variables are used in this project, but they are set to NOTFOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
G2O_CORE_LIBRARY
linked by target “vision_module” in directory /home/lian/humanoid_op_ros-master/src/nimbro/cv/vision_module
G2O_INCLUDE_DIR
used as include direct
https://blog.csdn.net/qq_22403265/article/details/54408945
3.1.2.4 Make Error: The following variables are used in this project, but they are set to NOTFOUND.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CHOLMOD_INCLUDE_DIR
G2O_INCLUDE_DIR
https://blog.csdn.net/qq_22403265/article/details/54408945
3.1.2.5 Parse error at “BOOST_JOIN”
usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at “BOOST_JOIN”
解决方法:
http://blog.csdn.net/h321654/article/… The steps: 1. sudo gedit /usr/include/boost/type_traits/detail/has_binary_operator.hpp 2. Modify “namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {…}” to " #ifndef Q_MOC_RUN namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) { #endif … #ifndef Q_MOC_RUN } #endif "
3.1.2.6 error: no matching function for call to ‘qglviewer::Quaternion::getRotationMatrix(float [3][3]) 数据类型不匹配导致函数无法被找到!!!!
In file included from /home/lian/humanoid_op_ros-master/src/nimbro/motion/gait_engines/cap_gait/include/cap_gait/cap_gait.h:34:0,
from /home/lian/humanoid_op_ros-master/src/nimbro/motion/gait_engines/cap_gait/src/cap_gait.cpp:13:
/home/lian/humanoid_op_ros-master/src/nimbro/motion/gait_engines/cap_gait/include/cap_gait/contrib/RobotModelVis.h: In member function ‘void margait_contrib::RobotModelVis::updateMarkers()’:
/home/lian/humanoid_op_ros-master/src/nimbro/motion/gait_engines/cap_gait/include/cap_gait/contrib/RobotModelVis.h:601:35: error: no matching function for call to ‘qglviewer::Quaternion::getRotationMatrix(float [3][3])’
lFootRot.getRotationMatrix(lMat);
^
In file included from /usr/include/QGLViewer/constraint.h:27:0,
gedit /home/lian/humanoid_op_ros-master/src/nimbro/motion/gait_engines/cap_gait/include/cap_gait/contrib/RobotModelVis.h
将
float lMat[3][3] = {{0}};
float rMat[3][3] = {{0}};
float lFSMat[3][3] = {{0}};
float rFSMat[3][3] = {{0}};
改为
qreal lMat[3][3] = {{0}};
qreal rMat[3][3] = {{0}};
qreal lFSMat[3][3] = {{0}};
qreal rFSMat[3][3] = {{0}};
3.1.2.7 error: cannot convert ‘qreal ()[3][3] {aka double ()[3][3]}’ to ‘float (*)[3][3]’ in assignment 数据类型不匹配导致函数无法被找到!!!!
suppFootMat = &rMat;
In file included from /home/lian/humanoid_op_ros-master/src/nimbro/motion/gait_engines/cap_gait/include/cap_gait/cap_gait.h:34:0,
from /home/lian/humanoid_op_ros-master/src/nimbro/motion/gait_engines/cap_gait/src/cap_gait.cpp:13:
/home/lian/humanoid_op_ros-master/src/nimbro/motion/gait_engines/cap_gait/include/cap_gait/contrib/RobotModelVis.h: In member function ‘void margait_contrib::RobotModelVis::updateMarkers()’:
/home/lian/humanoid_op_ros-master/src/nimbro/motion/gait_engines/cap_gait/include/cap_gait/contrib/RobotModelVis.h:653:17: error: cannot convert ‘qreal ()[3][3] {aka double ()[3][3]}’ to ‘float (*)[3][3]’ in assignment
suppFootMat = &rMat;
gedit /home/lian/humanoid_op_ros-master/src/nimbro/motion/gait_engines/cap_gait/include/cap_gait/contrib/RobotModelVis.h
将
float (*suppFootMat)[3][3];
float (*supnFootMat)[3][3];
改为
qreal (*suppFootMat)[3][3];
qreal (*supnFootMat)[3][3];
3.1.2.8 error: no matching function for call to ‘g2o::BlockSolver 数据类型不匹配导致函数无法被找到!!!!
error: no matching function for call to ‘g2o::BlockSolver<g2o::BlockSolverTraits<-1, -1> >::BlockSolver(g2o::BlockSolver<g2o::BlockSolverTraits<-1, -1> >::LinearSolverType*&)’
blockSolver = new BlockSolverX(linearSolver);
error: no matching function for call to ‘g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(g2o::BlockSolverX*&)’
optimizationAlgorithm = new OptimizationAlgorithmLevenberg(blockSolver);
数据类型不匹配导致函数无法被找到!!!!
首先贴出报错部分代码:
typedef g2o::BlockSolver< g2o::BlockSolverTraits<3,1> > Block;
Block::LinearSolverType* linearSolver = new g2o::LinearSolverDense<Block::PoseMatrixType>();
Block* solver_ptr = new Block( linearSolver );
g2o::OptimizationAlgorithmLevenberg* solver = new g2o::OptimizationAlgorithmLevenberg( solver_ptr );
g2o::SparseOptimizer optimizer;
optimizer.setAlgorithm( solver );
optimizer.setVerbose( true );
修改代码如下:
typedef g2o::BlockSolver< g2o::BlockSolverTraits<3,1> > Block;
Block::LinearSolverType* linearSolver = new g2o::LinearSolverDense<Block::PoseMatrixType>();
Block* solver_ptr = new Block( std::unique_ptr<Block::LinearSolverType>(linearSolver) );
g2o::OptimizationAlgorithmLevenberg* solver = new g2o::OptimizationAlgorithmLevenberg(std::unique_ptr<Block>(solver_ptr) );
g2o::SparseOptimizer optimizer;
optimizer.setAlgorithm( solver );
optimizer.setVerbose( true );
报错代码
linearSolver = new LinearSolverCSparse<BlockSolverX::PoseMatrixType>();
// create the block solver on the top of the linear solver
blockSolver = new BlockSolverX(linearSolver);
//create the algorithm to carry out the optimization
optimizationAlgorithm = new OptimizationAlgorithmLevenberg(blockSolver);
更改后代码
// create the linear solver
linearSolver = new g2o::LinearSolverCSparse<BlockSolverX::PoseMatrixType>();
// create the block solver on the top of the linear solver
blockSolver = new BlockSolverX(std::unique_ptr<BlockSolverX::LinearSolverType>(linearSolver));
//create the algorithm to carry out the optimization
optimizationAlgorithm = new OptimizationAlgorithmLevenberg(std::unique_ptr<BlockSolverX>blockSolver);
3.1.2.8 error: ‘Vector’ was not declared in this scope
Vector circles; 大小写错误!!!
/home/lian/humanoid_op_ros-master/src/nimbro/cv/vision_module/src/vision_module/SoccerObjects/BallDetector.cpp: In member function ‘std::vector BallDetector::GetBall(const cv::Mat&, const std::vector<cv::Point_ >&, const cv::Mat&, cv::Mat&, const cv::Mat&, const cv::Mat&, CameraProjections&, cv::Mat&, GuiManager*, cv::Mat&, bool)’:
/home/lian/humanoid_op_ros-master/src/nimbro/cv/vision_module/src/vision_module/SoccerObjects/BallDetector.cpp:645:2: error: ‘Vector’ was not declared in this scope
Vector circles;
^
/home/lian/humanoid_op_ros-master/src/nimbro/cv/vision_module/src/vision_module/SoccerObjects/BallDetector.cpp:645:16: error: expected primary-expression before ‘>’ token
Vector circles;
^
/home/lian/humanoid_op_ros-master/src/nimbro/cv/vision_module/src/vision_module/SoccerObjects/BallDetector.cpp:645:18: error: ‘circles’ was not declared in this scope
Vector circles;
^
nimbro/cv/vision_module/CMakeFiles/vision_module.dir/build.make:446: recipe for target ‘nimbro/cv/vision_module/CMakeFiles/vision_module.dir/src/vision_module/SoccerObjects/BallDetector.cpp.o’ failed
/home/lian/humanoid_op_ros-master/src/nimbro/cv/vision_module/include/vision_module/Tools/LineSegmentTester.hpp:23:2: error: ‘Vector’ does not name a type
Vector Lines;
Vector<LineSegment> Lines;
Vector 变为 vector
3.1.2.9 error: Killed (program cc1plus) Please submit a full bug report
g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report,
Try running (just after the failure) dmesg.
Do you see a line like this
Out of memory: Kill process 23747 (cc1plus) score 15 or sacrifice child
Killed process 23747, UID 2243, (cc1plus) total-vm:214456kB, anon-rss:178936kB, file-rss:5908kB
Most likely that is your problem. Running make -j 8 runs lots of process which use more memory. The problem above occurs when your system runs out of memory. In this case rather than the whole system falling over, the operating systems runs a process to score each process on the system. The one that scores the highest gets killed by the operating system to free up memory. If the process that is killed is cc1plus, gcc (perhaps incorrectly) interprets this as the process crashing and hence assumes that it must be a compiler bug. But it isn’t really, the problem is the OS killed cc1plus, rather than it crashed.
If this is the case, you are running out of memory. So run perhaps make -j 4 instead. This will mean fewer parallel jobs and will mean the compilation will take longer but hopefully will not exhaust your system memory.
https://stackoverflow.com/questions/30887143/make-j-8-g-internal-compiler-error-killed-program-cc1plus
编辑虚拟机加大内存