美文网首页
Ubuntu18.04 SLAM环境搭建

Ubuntu18.04 SLAM环境搭建

作者: VellBibi | 来源:发表于2023-02-19 13:52 被阅读0次

    apt换源

    可以参考:https://blog.csdn.net/sinat_39110395/article/details/123378523

    sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
    sudo vim /etc/apt/sources.list
    sudo apt update
    

    中科大源:

    deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
    deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
    deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
    deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
    deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
    deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
    deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
    deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
    

    安装ros

    参照:http://wiki.ros.org/melodic/Installation/Ubuntu

    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 install curl # if you haven't already installed curl
    curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
    sudo apt update
    sudo apt install -y ros-melodic-desktop-full
    echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    

    修改用户组,加入到root用户组

    解决wsl访问windows文件系统权限问题,非必要,仅为了方便

    sudo vim /etc/passwd
    

    每行格式为:用户名:密码:Uid:Gid:描述:家目录:登录使用shell
    我用户名是vell,对应Uid:Gid修改为0:0:

    安装GTSAM

    https://gtsam.org/get_started/

    sudo add-apt-repository ppa:borglab/gtsam-release-4.1
    sudo apt update  # not necessary since Bionic
    # Install:
    sudo apt install libgtsam-dev libgtsam-unstable-dev
    

    安装GeographicLib

    wget https://sourceforge.net/projects/geographiclib/files/distrib-C%2B%2B/GeographicLib-2.1.2.tar.gz/download
    tar -xvf GeographicLib-2.1.2.tar.gz
    cd GeographicLib-2.1.2/
    mkdir build && cd build && cmake .. && make -j 8
    sudo make install
    

    cmake如果报版本低,直接修改CMakeLists.txt cmake_minimum_required (VERSION 3.10.0)

    安装octomap

    sudo apt-get install ros-melodic-octomap*
    

    安装Sophus

    git clone -b ubt18.04 https://github.com/vell001/Sophus.git
    mkdir build && cd build && cmake ..
    make -j 8 && sudo make install
    

    wsl挂载虚拟盘

    参照:https://zhuanlan.zhihu.com/p/432865918

    相关文章

      网友评论

          本文标题:Ubuntu18.04 SLAM环境搭建

          本文链接:https://www.haomeiwen.com/subject/lheikdtx.html