Catkin build的坑--Learning High-Speed Flight in the Wild

环境Ubuntu20.04 + ROS noetic + anaconda
参考两篇大佬的环境配置后,在Ubuntu20.04的build过程中还是遇到很多问题

文章1:https://blog.csdn.net/wxm__/article/details/121220816
文章2:https://blog.csdn.net/qq_42412225/article/details/123537758

问题1 protobuf报错:

| #include 
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

查看protoc的版本,删除anaconda下的protoc,避免版本冲突(in terminal):

对于 apt-get:
export PATH=/usr/bin:$PATH
protoc --version

对于 source:
export PATH=/usr/local/bin:$PATH
protoc --version

方法(in terminal conda下):

conda uninstall protobuf

参考https://github.com/uzh-rpg/flightmare/issues/155#issuecomment-1286904974
问题2 rviz报错.

error: ‘class rviz::PointCloudCommon’ has no member named ‘getCallbackQueue’
   update_nh_.setCallbackQueue(point_cloud_common_->getCallbackQueue());

修改源代码:src/planning_rviz_plugins/map_display.cpp
删除39行:

update_nh_.setCallbackQueue(point_cloud_common_->getCallbackQueue());

增加73行:

void MapDisplay::onInitialize() {
  update_nh_.setCallbackQueue(context_->getThreadedQueue());
  MFDClass::onInitialize();
  point_cloud_common_->initialize(context_, scene_node_);
}

参考https://github.com/sikang/mpl_ros/pull/23/commits/9387813ea7eadce7ccff61ecfbbd83f4066a6e05
问题3 nunpy_eigen报错:

error: return-statement with a value, in function returning 'void' [-fpermissive]
 #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
                                                                                                                                                       ^

修改:numpy_eigen/src/autogen_module/numpy_eigen_export_module.cpp:256下
import_array() -> _import_array()
参考https://github.com/ethz-asl/kalibr/issues/423#issuecomment-813257725

你可能感兴趣的:(python,linux)