2

阿木币

0

精华

1 小时

在线时间

应届白菜

Rank: 1

发表于 2019-11-6 21:10:46 6502 浏览 2 回复

激光雷达编译出错

1阿木币
本帖最后由 zwj001 于 2019-11-6 21:12 编辑

在github上download下来后,catkin_make无法编译通过,是什么原因啊
2019-11-06 21-07-50屏幕截图.png
2019-11-06 21-07-50屏幕截图.png

最佳答案

查看完整内容

在px4_command目录下面,打开CMakeLists.txt文件.把第五行注释取消掉,重新catkin_make. 取消注释后代码为add_compile_options(-std=c++11)

扫一扫浏览分享
回复

使用道具 举报

149

阿木币

1

精华

429 小时

在线时间

技术大V

Rank: 4

发表于 2019-11-6 21:10:47
在px4_command目录下面,打开CMakeLists.txt文件.把第五行注释取消掉,重新catkin_make.
取消注释后代码为add_compile_options(-std=c++11)
回复

使用道具 举报

2

阿木币

0

精华

1 小时

在线时间

应届白菜

Rank: 1

 楼主| 发表于 2019-11-6 21:17:38
报错如下:

[ 81%] Building CXX object px4_command/CMakeFiles/eigen_test.dir/src/Utilities/eigen_test.cpp.o
[ 82%] Building CXX object px4_command/CMakeFiles/px4_pos_controller.dir/src/px4_pos_controller.cpp.o
[ 83%] Building CXX object px4_command/CMakeFiles/ground_station.dir/src/ground_station.cpp.o
In file included from /usr/include/c++/5/array:35:0,
                 from /opt/ros/kinetic/include/mavros/frame_tf.h:22,
                 from /media/zhu/software/UAV/px4_ws/src/px4_command/src/Application/collision_avoidance_vfh.cpp:27:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
  ^
In file included from /media/zhu/software/UAV/px4_ws/src/px4_command/src/Application/collision_avoidance_vfh.cpp:27:0:
/opt/ros/kinetic/include/mavros/frame_tf.h:37:7: error: expected nested-name-specifier before ‘Covariance3d’
using Covariance3d = sensor_msgs::Imu::_angular_velocity_covariance_type;
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:40:7: error: expected nested-name-specifier before ‘Covariance6d’
using Covariance6d = geometry_msgs::PoseWithCovariance::_covariance_type;
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:43:7: error: expected nested-name-specifier before ‘Covariance9d’
using Covariance9d = boost::array<double, 81>;
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:46:7: error: expected nested-name-specifier before ‘EigenMapCovariance3d’
using EigenMapCovariance3d = Eigen::Map<Eigen::Matrix<double, 3, 3, Eigen::RowM
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:47:7: error: expected nested-name-specifier before ‘EigenMapConstCovariance3d’
using EigenMapConstCovariance3d = Eigen::Map<const Eigen::Matrix<double, 3, 3,
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:50:7: error: expected nested-name-specifier before ‘EigenMapCovariance6d’
using EigenMapCovariance6d = Eigen::Map<Eigen::Matrix<double, 6, 6, Eigen::RowM
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:51:7: error: expected nested-name-specifier before ‘EigenMapConstCovariance6d’
using EigenMapConstCovariance6d = Eigen::Map<const Eigen::Matrix<double, 6, 6,
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:54:7: error: expected nested-name-specifier before ‘EigenMapCovariance9d’
using EigenMapCovariance9d = Eigen::Map<Eigen::Matrix<double, 9, 9, Eigen::RowM
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:55:7: error: expected nested-name-specifier before ‘EigenMapConstCovariance9d’
using EigenMapConstCovariance9d = Eigen::Map<const Eigen::Matrix<double, 9, 9,
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:60:1: warning: scoped enums only available with -std=c++11 or -std=gnu++11
enum class StaticTF {
^
/opt/ros/kinetic/include/mavros/frame_tf.h:91:1: error: ‘Covariance3d’ does not name a type
Covariance3d transform_frame(const Covariance3d &cov, const Eigen::Quaterniond
^
/opt/ros/kinetic/include/mavros/frame_tf.h:98:1: error: ‘Covariance6d’ does not name a type
Covariance6d transform_frame(const Covariance6d &cov, const Eigen::Quaterniond
^
/opt/ros/kinetic/include/mavros/frame_tf.h:105:1: error: ‘Covariance9d’ does not name a type
Covariance9d transform_frame(const Covariance9d &cov, const Eigen::Quaterniond
^
/opt/ros/kinetic/include/mavros/frame_tf.h:119:1: error: ‘Covariance3d’ does not name a type
Covariance3d transform_static_frame(const Covariance3d &cov, const StaticTF tra
^
/opt/ros/kinetic/include/mavros/frame_tf.h:126:1: error: ‘Covariance6d’ does not name a type
Covariance6d transform_static_frame(const Covariance6d &cov, const StaticTF tra
^
/opt/ros/kinetic/include/mavros/frame_tf.h:133:1: error: ‘Covariance9d’ does not name a type
Covariance9d transform_static_frame(const Covariance9d &cov, const StaticTF tra
^
In file included from /media/zhu/software/UAV/px4_ws/src/px4_command/src/Application/collision_avoidance_vfh.cpp:27:0:
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘T mavros::ftf::transform_orientation_ned_enu(const T&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:153:43: error: ‘StaticTF’ is not a class or namespace
  return detail::transform_orientation(in, StaticTF::NED_TO_ENU);
                                           ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘T mavros::ftf::transform_orientation_enu_ned(const T&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:162:43: error: ‘StaticTF’ is not a class or namespace
  return detail::transform_orientation(in, StaticTF::ENU_TO_NED);
                                           ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘T mavros::ftf::transform_orientation_aircraft_baselink(const T&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:171:43: error: ‘StaticTF’ is not a class or namespace
  return detail::transform_orientation(in, StaticTF::AIRCRAFT_TO_BASELINK);
                                           ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘T mavros::ftf::transform_orientation_baselink_aircraft(const T&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:180:43: error: ‘StaticTF’ is not a class or namespace
  return detail::transform_orientation(in, StaticTF::BASELINK_TO_AIRCRAFT);
                                           ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘T mavros::ftf::transform_frame_ned_enu(const T&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:188:44: error: ‘StaticTF’ is not a class or namespace
  return detail::transform_static_frame(in, StaticTF::NED_TO_ENU);
                                            ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘T mavros::ftf::transform_frame_enu_ned(const T&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:197:44: error: ‘StaticTF’ is not a class or namespace
  return detail::transform_static_frame(in, StaticTF::ENU_TO_NED);
                                            ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘T mavros::ftf::transform_frame_aircraft_baselink(const T&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:206:44: error: ‘StaticTF’ is not a class or namespace
  return detail::transform_static_frame(in, StaticTF::AIRCRAFT_TO_BASELINK);
                                            ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘T mavros::ftf::transform_frame_baselink_aircraft(const T&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:215:44: error: ‘StaticTF’ is not a class or namespace
  return detail::transform_static_frame(in, StaticTF::BASELINK_TO_AIRCRAFT);
                                            ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘T mavros::ftf::transform_frame_ecef_enu(const T&, const T&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:227:56: error: ‘StaticTF’ is not a class or namespace
  return detail::transform_static_frame(in, map_origin, StaticTF::ECEF_TO_ENU);
                                                        ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘T mavros::ftf::transform_frame_enu_ecef(const T&, const T&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:239:56: error: ‘StaticTF’ is not a class or namespace
  return detail::transform_static_frame(in, map_origin, StaticTF::ENU_TO_ECEF);
                                                        ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘void mavros::ftf::quaternion_to_rpy(const Quaterniond&, double&, double&, double&)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:325:13: error: ‘rpy’ does not name a type
  const auto rpy = quaternion_to_rpy(q);
             ^
/opt/ros/kinetic/include/mavros/frame_tf.h:326:9: error: ‘rpy’ was not declared in this scope
  roll = rpy.x();
         ^
/opt/ros/kinetic/include/mavros/frame_tf.h: At global scope:
/opt/ros/kinetic/include/mavros/frame_tf.h:344:69: error: ‘std::array’ has not been declared
inline void quaternion_to_mavlink(const Eigen::Quaterniond &q, std::array<float
                                                                     ^
/opt/ros/kinetic/include/mavros/frame_tf.h:344:74: error: expected ‘,’ or ‘...’ before ‘<’ token
e void quaternion_to_mavlink(const Eigen::Quaterniond &q, std::array<float, 4>
                                                                     ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘void mavros::ftf::quaternion_to_mavlink(const Quaterniond&, int)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:346:2: error: ‘qmsg’ was not declared in this scope
  qmsg[0] = q.w();
  ^
/opt/ros/kinetic/include/mavros/frame_tf.h: At global scope:
/opt/ros/kinetic/include/mavros/frame_tf.h:355:60: error: ‘array’ in namespace ‘std’ does not name a template type
inline Eigen::Quaterniond mavlink_to_quaternion(const std::array<float, 4> &q)
                                                            ^
/opt/ros/kinetic/include/mavros/frame_tf.h:355:65: error: expected ‘,’ or ‘...’ before ‘<’ token
inline Eigen::Quaterniond mavlink_to_quaternion(const std::array<float, 4> &q)
                                                                 ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘Eigen::Quaterniond mavros::ftf::mavlink_to_quaternion(int)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:357:28: error: ‘q’ was not declared in this scope
  return Eigen::Quaterniond(q[0], q[1], q[2], q[3]);
                            ^
/opt/ros/kinetic/include/mavros/frame_tf.h: At global scope:
/opt/ros/kinetic/include/mavros/frame_tf.h:364:54: error: ‘std::array’ has not been declared
inline void covariance_to_mavlink(const T &cov, std::array<float, SIZE> &covmsg
                                                      ^
/opt/ros/kinetic/include/mavros/frame_tf.h:364:59: error: expected ‘,’ or ‘...’ before ‘<’ token
inline void covariance_to_mavlink(const T &cov, std::array<float, SIZE> &covmsg
                                                           ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘void mavros::ftf::covariance_to_mavlink(const T&, int)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:366:38: error: ‘covmsg’ was not declared in this scope
  std::copy(cov.cbegin(), cov.cend(), covmsg.begin());
                                      ^
/opt/ros/kinetic/include/mavros/frame_tf.h: At global scope:
/opt/ros/kinetic/include/mavros/frame_tf.h:373:61: error: ‘std::array’ has not been declared
inline void covariance_urt_to_mavlink(const T &covmap, std::array<float, ARR_SI
                                                             ^
/opt/ros/kinetic/include/mavros/frame_tf.h:373:66: error: expected ‘,’ or ‘...’ before ‘<’ token
inline void covariance_urt_to_mavlink(const T &covmap, std::array<float, ARR_SI
                                                                  ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘void mavros::ftf::covariance_urt_to_mavlink(const T&, int)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:375:7: error: ‘m’ does not name a type
  auto m = covmap;
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:376:25: error: ‘m’ was not declared in this scope
  std::size_t COV_SIZE = m.rows() * (m.rows() + 1) / 2;
                         ^
/opt/ros/kinetic/include/mavros/frame_tf.h:381:7: error: ‘out’ does not name a type
  auto out = covmsg.begin();
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:385:5: error: ‘out’ was not declared in this scope
    *out++ = m(y, x);
     ^
/opt/ros/kinetic/include/mavros/frame_tf.h: At global scope:
/opt/ros/kinetic/include/mavros/frame_tf.h:394:57: error: ‘array’ in namespace ‘std’ does not name a template type
inline void mavlink_urt_to_covariance_matrix(const std::array<float, ARR_SIZE>
                                                         ^
/opt/ros/kinetic/include/mavros/frame_tf.h:394:62: error: expected ‘,’ or ‘...’ before ‘<’ token
inline void mavlink_urt_to_covariance_matrix(const std::array<float, ARR_SIZE>
                                                              ^
/opt/ros/kinetic/include/mavros/frame_tf.h: In function ‘void mavros::ftf::mavlink_urt_to_covariance_matrix(int)’:
/opt/ros/kinetic/include/mavros/frame_tf.h:396:25: error: ‘covmat’ was not declared in this scope
  std::size_t COV_SIZE = covmat.rows() * (covmat.rows() + 1) / 2;
                         ^
/opt/ros/kinetic/include/mavros/frame_tf.h:401:7: error: ‘in’ does not name a type
  auto in = covmsg.begin();
       ^
/opt/ros/kinetic/include/mavros/frame_tf.h:405:40: error: ‘in’ was not declared in this scope
    covmat(x, y) = static_cast<double>(*in++);
                                        ^
/media/zhu/software/UAV/px4_ws/src/px4_command/src/Application/collision_avoidance_vfh.cpp: In function ‘float CalculDirection(Point2D&)’:
/media/zhu/software/UAV/px4_ws/src/px4_command/src/Application/collision_avoidance_vfh.cpp:193:14: error: ISO C++ forbids declaration of ‘dir_ite’ with no type [-fpermissive]
   for (auto &dir_ite : cand_dir) {
              ^
/media/zhu/software/UAV/px4_ws/src/px4_command/src/Application/collision_avoidance_vfh.cpp:193:24: warning: range-based ‘for’ loops only available with -std=c++11 or -std=gnu++11
   for (auto &dir_ite : cand_dir) {
                        ^
/media/zhu/software/UAV/px4_ws/src/px4_command/src/Application/collision_avoidance_vfh.cpp: In function ‘void gps_cb(const ConstPtr&)’:
/media/zhu/software/UAV/px4_ws/src/px4_command/src/Application/collision_avoidance_vfh.cpp:264:63: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
  current_gps = { msg->latitude, msg->longitude, msg->altitude };
                                                               ^
/media/zhu/software/UAV/px4_ws/src/px4_command/src/Application/collision_avoidance_vfh.cpp:264:14: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
  current_gps = { msg->latitude, msg->longitude, msg->altitude };
              ^
px4_command/CMakeFiles/collision_avoidance_vfh.dir/build.make:62: recipe for target 'px4_command/CMakeFiles/collision_avoidance_vfh.dir/src/Application/collision_avoidance_vfh.cpp.o' failed
make[2]: *** [px4_command/CMakeFiles/collision_avoidance_vfh.dir/src/Application/collision_avoidance_vfh.cpp.o] Error 1
CMakeFiles/Makefile2:696: recipe for target 'px4_command/CMakeFiles/collision_avoidance_vfh.dir/all' failed
make[1]: *** [px4_command/CMakeFiles/collision_avoidance_vfh.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
[ 84%] Linking CXX executable /media/zhu/software/UAV/px4_ws/devel/lib/px4_command/eigen_test
[ 84%] Built target eigen_test
[ 85%] Linking CXX executable /media/zhu/software/UAV/px4_ws/devel/lib/px4_command/ground_station
[ 85%] Built target ground_station
[ 87%] Linking CXX executable /media/zhu/software/UAV/px4_ws/devel/lib/px4_command/px4_pos_controller
[ 87%] Built target px4_pos_controller
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
回复

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表