PANTHER安装

今天把PANTHER在Ubuntu18.04装了一下,遇到了两个问题,下面是完整教程(官网翻译过来的)
我记得之前网页上写的是PANTHER已经在Ubuntu18.04和Ubuntu20.04测试过,但是现在变成在Ubuntu20.04上测试过,其他Ubuntu版本可能存在小的修正,可以创建issue来提问。

先装依赖:

CGAL:

sudo apt-get install libgmp3-dev libmpfr-dev -y
mkdir -p ~/installations/cgal && cd ~/installations/cgal
wget https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.14.2/CGAL-4.14.2.tar.xz
tar -xf CGAL-4.14.2.tar.xz && cd CGAL-4.14.2/ && cmake . -DCMAKE_BUILD_TYPE=Release && sudo make install

这个没啥问题,按照步骤装就行。

CasADi

sudo apt-get install gcc g++ gfortran git cmake liblapack-dev pkg-config --install-recommends
sudo apt-get install swig
sudo apt-get install coinor-libipopt-dev
cd ~/installations #Or any other folder of your choice
git clone https://github.com/casadi/casadi.git -b master casadi
cd casadi && mkdir build && cd build
cmake . -DCMAKE_BUILD_TYPE=Release -DWITH_PYTHON=ON -DWITH_IPOPT=ON .. 
sudo make install

IPOPT

这个他让去官网申请一个Personal Licence,但是我看个人的Licence和他的版本不一样,会出问题,他那个版本是要申请教育版需要用教育邮箱,我也申请了,但是说是一个工作日,等不及了看到知乎这篇文章有,于是就在这下载了。

cd ~/installations/coinhsl-2015.06.23
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz #This is the metis version used in the configure file of coinhsl
tar xvzf metis-4.0.3.tar.gz
#sudo make uninstall && sudo make clean #Only needed if you have installed it before
./configure LIBS="-llapack" --with-blas="-L/usr/lib -lblas" CXXFLAGS="-g -O3 -fopenmp" FCFLAGS="-g -O3 -fopenmp" CFLAGS="-g -O3 -fopenmp" #the output should say `checking for metis to compile... yes`
sudo make install #(the files will go to /usr/local/lib)
cd /usr/local/lib
sudo ln -s libcoinhsl.so libhsl.so #(This creates a symbolic link `libhsl.so` pointing to `libcoinhsl.so`). See https://github.com/casadi/casadi/issues/1437
echo "export LD_LIBRARY_PATH='\${LD_LIBRARY_PATH}:/usr/local/lib'" >> ~/.bashrc

然后按照这个步骤来就可以了。
运行./configure这句话时显示权限不够,运行下面这句话就可以了

chmod +x configure

其他依赖

sudo apt-get install ros-"${ROS_DISTRO}"-rviz-visual-tools  ros-"${ROS_DISTRO}"-tf2-sensor-msgs
sudo apt-get install git-lfs ccache 

如果你是Ubuntu18.04则运行

sudo apt-get install python-catkin-tools -y

如果你是Ubuntu20.04则运行

sudo apt-get install python3-osrf-pycommon python3-catkin-tools -y
sudo apt-get install python-is-python3 -y

最后安装panther

cd ~/Desktop && mkdir ws && cd ws && mkdir src && cd src
git clone https://github.com/mit-acl/panther.git
cd panther
git lfs install
git submodule init && git submodule update
cd ../../ && catkin build
echo "source ~/Desktop/ws/devel/setup.bash" >> ~/.bashrc

然后运行就可以了

roslaunch panther simulation.launch quad:=SQ01s

但是我到这出现问题,会报错,终端会出现几行红色的字,上官网搜issues发现可能是Ubuntu版本的问题,作者回答说d58b025是最后一次在Ubuntu18.04上测试过的版本,让回退到这个版本尝试一下。
那就运行

git reset --hard d58b025

然后重新编译了一下,就可以运行了,可是不知道这个版本有没有啥问题,就还没深入去看,但是运行是可以的。在rviz里按G或者点上面2D nav Goal也可以设置目标点。
在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Jeremy_dut

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值