目录
3. Dependencies for building packages
3. 至此VINS-Fusion编译完成,后面需要打开四个shell窗口分别运行ros命令,为了避免每次打开新的shell都需要source,我们将其添加到bash配置文件中
一. 安装ros
不同的ubuntu版本对应不同版本的ros,具体可查询ros官网
http://wiki.ros.org/ROS/Installation
ubuntu16.04以及更老的版本对应ROS Kinetic Kame
ubuntu18.04对应ROS Melodic Morenia
ubuntu20.04对应ROS Noetic Ninjemys
下面开始安装ROS Melodic,详细安装教程可以参考下面的官网连接:
http://wiki.ros.org/melodic/Installation/Ubuntu
1. Installation
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
sudo apt install ros-melodic-desktop-full
2. Environment setup
If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
3. Dependencies for building packages
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo apt install python-rosdep
sudo rosdep init
rosdep update
4. 安装ros与opencv的桥接工具包
sudo apt-get install ros-melodic-cv-bridge ros-melodic-tf ros-melodic-message-filters ros-melodic-image-transport
5.验证ros是否安装成功
roscore