写一下我的安装gridmap的心酸泪


a:首先出现
Could not find a package configuration file provided by “ros_pcl" with any of the following names: ros_pclConfig.cmake ros_pcl-config.cmake
然后我以为是pcl没有安装好,就努力的安装pcl,中间有步骤会删除ros的一些东西,你得重新搞回来,
pcl安装你懂的一般需要源码安装
ubuntu16.04 安装PCL库
1.安装依赖项
sudo apt-get update sudo apt-get install git build-essential linux-libc-dev sudo apt-get install cmake cmake-gui sudo apt-get install libusb-1.0-0-dev libusb-dev libudev-dev sudo apt-get install mpi-default-dev openmpi-bin openmpi-common sudo apt-get install libflann1.8 libflann-dev sudo apt-get install libeigen3-dev sudo apt-get install libboost-all-dev sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev #1 sudo apt-get install libqhull* libgtest-dev sudo apt-get install freeglut3-dev pkg-config sudo apt-get install libxmu-dev libxi-dev sudo apt-get install mono-complete sudo apt-get install qt-sdk openjdk-8-jdk openjdk-8-jre #2
注意:1处的命令我没有执行,它在安装的时候会卸掉一些东西,如下图所示,基本都是ros的东西,后来我又重新补上,此处不建议执行该命令
这里写图片描述
2处的 qt-sdk 是安装qt4.8的一些组建,由于我之前自己装了5.6.1,所以2处的命令只是安装了后面两项
写这片博客的 主要目的 是想记录这两句话自己是怎么执行的,以及整个的教程。
2. Build Point Cloud Library
-DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON \ 
-DCMAKE_INSTALL_PREFIX=/usr ..
  • sudo make -j16
  • sudo make install
3.测试
HOME目录下 software_installed->pcl->tutorials->content->sources下有PCL例程,在cloud_viewer文件夹下有cpp和cmake,cmake编译一下就可以生成可执行文件,直接./测试就行
4.卸载掉ros的东西后的解决方法
如果自己执行了1处的命令,会卸掉一些常用的ros 的包导致在编译的时候一般都会出错,自己试过,用catkin_make 基本编译不了东西,因为好多包我都用了cv_bridge导致编译不了,解决方法,重新安装ros:
sudo apt-get update 
sudo apt-get install ros-kinetic-desktop-full 
这两句话只是安装了之前卸掉的包,并没有完全安装ros,如下图所示,很快 
这里写图片描述

b:然后出现
Could not find a package configuration file provided by "costmap_2d" with any of the following names: costmap_2dConfig.cmake costmap_2d-config.cmake
一番baidu google 我觉得是ros安装的不完全,我重新安装ros的完整版本;根据官网做了一遍。
Configure your Ubuntu repositories
Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." You can  follow the Ubuntu guide  for instructions on doing this.
Setup your sources.list
Setup your computer to accept software from packages.ros.org.
  • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Source Debs  are also available
Set up your keys
  • sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
If you experience issues connecting to the keyserver, you can try substituting  hkp://pgp.mit.edu:80  or  hkp://keyserver.ubuntu.com:80  in the previous command.
Installation
First, make sure your Debian package index is up-to-date:
  • sudo apt-get update
There are many different libraries and tools in ROS. We provided four default configurations to get you started. You can also install ROS packages individually.
In case of problems with the next step, you can use following repositories instead of the ones mentioned above  ros-shadow-fixed
  • Desktop-Full Install: (Recommended) : ROS, rqtrviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
  • sudo apt-get install ros-kinetic-desktop-full
or  click here
Desktop Install:  ROS,  rqt rviz , and robot-generic libraries
  • sudo apt-get install ros-kinetic-desktop
or  click here
ROS-Base: (Bare Bones)  ROS package, build, and communication libraries. No GUI tools.
  • sudo apt-get install ros-kinetic-ros-base
or  click here
Individual Package:  You can also install a specific ROS package (replace underscores with dashes of the package name):
  • sudo apt-get install ros-kinetic-PACKAGE
e.g.
sudo apt-get install ros-kinetic-slam-gmapping
To find available packages, use:
apt-cache search ros-kinetic
Initialize rosdep
Before you can use ROS, you will need to initialize  rosdep rosdep  enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.
sudo rosdep initrosdep update
Environment setup
It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrcsource ~/.bashrc
If you have more than one ROS distribution installed,  ~/.bashrc  must only source the  setup.bash  for the version you are currently using.
If you just want to change the environment of your current shell, instead of the above you can type:
source /opt/ros/kinetic/setup.bash
If you use zsh instead of bash you need to run the following commands to set up your shell:
echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrcsource ~/.zshrc
Dependencies for building packages
Up to now you have installed what you need to run the core ROS packages. To create and manage your own ROS workspaces, there are various tools and requirements that are distributed separately. For example,  rosinstall  is a frequently used command-line tool that enables you to easily download many source trees for ROS packages with one command.
To install this tool and other dependencies for building ROS packages, run:
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

执行一遍问题还是没有解决,突然想到 To find available packages, use: apt-cache search ros-kinetic 官网上这句话,然后执行该语句,找寻costmap_2d的包:
c:出现
Could not find a package configuration file provided by "ros-kinetic-octomap-msgs " with any of the following names: octomap Config.cmake octomap -config.cmake
终于顺利通过编译,需要庆祝一下:

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值