zoukankan      html  css  js  c++  java
  • Udacity Self-Driving Car Engineer Nanodegree 1:开发环境搭建

    仿真器和源代码

    term2 && term3: https://github.com/udacity/self-driving-car-sim/releases 

    Winodws 10 配置Udacity 开发环境

    CarND-Term2 — GCC Setup on Windows 和  Udacity project setup in Visual Studio with uWebSockets 或者 本人转自的

    注意高版本的vcpkg,在同样的操作下并不一定和博客中有一样的结论。

    Ubuntu 16.04 配置开发环境

    官方 CarND-MPC-Quizzes 里面有 install-ubuntu-MPC.sh 文件针对 Cppad和Ipopt安装配置,

    #! /bin/bash
    # update
    
    sudo apt-get update
    
    
    # gfortran dependency
    
    sudo apt-get install gfortran
    
    
    # get unzip
    
    sudo apt-get install unzip
    
    
    # Ipopt: get, install, unzip
    
    wget https://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.11.zip && unzip Ipopt-3.12.11.zip && rm Ipopt-3.12.11.zip
    
    ./install_ipopt.sh ./Ipopt-3.12.11
    
    # CppAD
    
    sudo apt-get install cppad
    
    # Gnuplot
    
    sudo apt-get install gnuplot
    
    # python and matplotlib
    
    sudo apt-get install python-matplotlib
    
    sudo apt-get install python2.7-dev

    uWebsockets 的安装文件 install-ubuntu.sh 如下 

    #! /bin/bash
    sudo apt-get update
    sudo apt-get install git libuv1-dev libssl-dev gcc g++ cmake make
    git clone https://github.com/uWebSockets/uWebSockets 
    cd uWebSockets
    git checkout e94b6e1
    mkdir build
    cd build
    cmake ..
    make 
    sudo make install
    cd ../..
    sudo ln -s /usr/lib64/libuWS.so /usr/lib/libuWS.so
    sudo rm -r uWebSockets

     单独安装 Ipopt 参考install_ipopt.sh

    # Pass the Ipopt source directory as the first argument
    if [ -z $1 ]
    then
        echo "Specifiy the location of the Ipopt source directory in the first argument."
        exit
    fi
    cd $1
    
    prefix=/usr/local
    srcdir=$PWD
    
    echo "Building Ipopt from ${srcdir}"
    echo "Saving headers and libraries to ${prefix}"
    
    # BLAS
    cd $srcdir/ThirdParty/Blas
    ./get.Blas
    mkdir -p build && cd build
    ../configure --prefix=$prefix --disable-shared --with-pic
    make install
    
    # Lapack
    cd $srcdir/ThirdParty/Lapack
    ./get.Lapack
    mkdir -p build && cd build
    ../configure --prefix=$prefix --disable-shared --with-pic 
        --with-blas="$prefix/lib/libcoinblas.a -lgfortran"
    make install
    
    # ASL
    cd $srcdir/ThirdParty/ASL
    ./get.ASL
    
    # MUMPS
    cd $srcdir/ThirdParty/Mumps
    ./get.Mumps
    
    # build everything
    cd $srcdir
    ./configure --prefix=$prefix coin_skip_warn_cxxflags=yes 
        --with-blas="$prefix/lib/libcoinblas.a -lgfortran" 
        --with-lapack=$prefix/lib/libcoinlapack.a
    make
    make test
    make -j1 install

    之后需要下载Ipopt源码包

    sudo apt-get install gfortran
    sudo apt-get install unzip
    wget https://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.11.zip && unzip Ipopt-3.12.11.zip && rm Ipopt-3.12.11.zip
    sudo ./install_ipopt.sh Ipopt-3.12.11

    安装CppAD

    sudo apt-get install cppad

    编译成功后,如果运行程序出现以下错误:

    error while loading shared libraries: libcoinmumps.so.1: cannot open shared

    对于这个错误,是因为系统是64位的,但是程序用到的某个32版本的库。运行以下命令就解决了。

    sudo apt-get update
    sudo apt-get install lib32z1
  • 相关阅读:
    ZOJ 3818 Pretty Poem
    HDU 4597 Play Game
    HDU 4497 GCD and LCM
    CSU 1335 高桥和低桥
    UVA 10791 Minimum Sum LCM
    CSU 1119 Collecting Coins
    CSU 1120 病毒
    UVA 12169 Disgruntled Judge
    HDU 1301 Jungle Roads
    POJ 1258 Agri-Net
  • 原文地址:https://www.cnblogs.com/flyinggod/p/12640827.html
Copyright © 2011-2022 走看看