参考
https://blog.csdn.net/qq_42412225/article/details/123537758?spm=1001.2014.3001.5506
https://blog.csdn.net/wxm__/article/details/121220816?spm=1001.2014.3001.5506
一 、open3d安装
在这一部分踩坑无数,遇到了无数的问题。
在该论文的代码中,只能安装0.10.0版本以及0.9.0,其他高于0.10.0的版本,在编译过程中,均会报错。但是由于不知道什么原因,电脑上0.10.0的安装会报错。安装不上,最终安装上了0.9.0版本。
安装过程:
这里首先应该安装cmake,这里安装cmake以及make
sudo apt install cmake
sudo pip install --upgrade cmake==3.21.0
// make 如果先安装的显卡部分,会提示需要安装make
sudo apt install make
open3d
// 若没有git,则需要安装
git clone --recursive https://github.com/intel-isl/Open3D
// 在open3d文件夹内,输入下方指令,切换到指定版本
git checkout v0.9.0
#消息“HEAD is now at e5b Update: version bump to 0.9.0”意味着你已经成功地检出了版本0.9.0,并且当前的 HEAD 指向了该版本的最后一个提交(其提交哈希的前几个字符是e5b),实际上已经在v0.9.0版本上了。
// 在open3d文件夹内,输入如下指令,进行自动下载第三方支持库,这一步不要自己去下载第三方支持库,很容易出错,虽然速度有点慢,并且可能会失败,但多尝试几次,总会成功的。
git submodule update --init --recursive
// 安装相关库
util/scripts/install-deps-ubuntu.sh
// 安装
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/open3d_install ..
# On Ubuntu
make -j$(nproc)
make install
二、安装程序
export ROS_VERSION=noetic
mkdir agile_autonomy_ws
cd agile_autonomy_ws
export CATKIN_WS=./catkin_aa
mkdir -p $CATKIN_WS/src
cd $CATKIN_WS
catkin init
catkin config --extend /opt/ros/$ROS_VERSION
catkin config --merge-devel
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-fdiagnostics-color
cd src
git clone https://github.com/uzh-rpg/agile_autonomy.git
#如果报错,需要对dependencies.yaml进行修改,具体修改见下面
vcs-import < agile_autonomy/dependencies.yaml
cd rpg_mpl_ros
git submodule update --init --recursive
#install extra dependencies (might need more depending on your OS)
sudo apt-get install libqglviewer-dev-qt5
# Install external libraries for rpg_flightmare
sudo apt install -y libzmqpp-dev libeigen3-dev libglfw3-dev libglm-dev
# Install dependencies for rpg_flightmare renderer
sudo apt install -y libvulkan1 vulkan-utils gdb
# Add environment variables (Careful! Modify path according to your local setup)
# 这个地方路径要设置成自己的,并且不要有中文路径
echo 'export RPGQ_PARAM_DIR=/home/<path/to/>catkin_aa/src/rpg_flightmare' >> ~/.bashrc
三、程序编译
如果有python2的环境,首先设置软连接,切换到python3
设置软链接
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
# build
catkin build
# 在devel文件夹内
. ../devel/setup.bash
# Create your learning environment
roscd planner_learning
conda create --name tf_24 python=3.7
conda activate tf_24
conda install tensorflow-gpu
pip install rospkg==1.2.3,pyquaternion,open3d,opencv-python
四、测试
测试代码参考最上面的链接
报错
1、择修改下载依赖包的方式为https. 即修改 src/agile_autonomy/dependencies.yaml 的内容如下:
repositories:
catkin_boost_python_buildtool:
type: git
url: https://github.com/ethz-asl/catkin_boost_python_buildtool.git
version: master
catkin_simple:
type: git
url: https://github.com/catkin/catkin_simple.git
version: master
eigen_catkin:
type: git
url: https://github.com/ethz-asl/eigen_catkin.git
version: master
eigen_checks:
type: git
url: https://github.com/ethz-asl/eigen_checks.git
version: master
gflags_catkin:
type: git
url: https://github.com/ethz-asl/gflags_catkin.git
version: master
glog_catkin:
type: git
url: https://github.com/ethz-asl/glog_catkin.git
version: master
mav_comm:
type: git
url: https://github.com/ethz-asl/mav_comm.git
version: master
minimum_jerk_trajectories:
type: git
url: https://github.com/uzh-rpg/minimum_jerk_trajectories.git
version: master
minkindr:
type: git
url: https://github.com/ethz-asl/minkindr.git
version: master
minkindr_ros:
type: git
url: https://github.com/ethz-asl/minkindr_ros.git
version: master
numpy_eigen:
type: git
url: https://github.com/ethz-asl/numpy_eigen.git
version: master
rpg_common:
type: git
url: https://github.com/kelia/rpg_common.git
version: main
rotors_simulator:
type: git
url: https://github.com/ethz-asl/rotors_simulator.git
version: master
rpg_mpc:
type: git
url: https://github.com/uzh-rpg/rpg_mpc.git
version: feature/return_full_horizon
rpg_quadrotor_common:
type: git
url: https://github.com/uzh-rpg/rpg_quadrotor_common.git
version: master
rpg_quadrotor_control:
type: git
url: https://github.com/uzh-rpg/rpg_quadrotor_control.git
version: devel/elia
rpg_single_board_io:
type: git
url: https://github.com/uzh-rpg/rpg_single_board_io.git
version: master
rpg_flightmare:
type: git
url: https://github.com/antonilo/flightmare_agile_autonomy.git
version: main
rpg_mpl_ros:
type: git
url: https://github.com/uzh-rpg/rpg_mpl_ros.git
version: master
assimp_catkin:
type: git
url: https://github.com/uzh-rpg/assimp_catkin.git
version: master
2、CMake Error at /opt/ros/noetic/share/catkin/cmake/empy.cmake:30 (message):
Unable to find either executable ‘empy’ or Python module ‘em’… try
installing the package ‘python3-empy’
catkin clean #清楚工作空间
catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3
catkin build
3、其他缺失包的安装
# vcs-import 错误
sudo apt-get update
sudo apt-get install python3-vcstool
#catkin init 错误
sudo apt install python3-catkin-tools python3-osrf-pycommon
# 缺少octomap-msgs
sudo apt-get install ros-noetic-octomap-msgs
# 缺少empy库
sudo apt-get install python3-empy
4、Open3d的路径问题
由于安装时,将open3d安装到了home文件夹内,所以要CMakeLists.txt中更改open3d路径:
- rpg_mpl_ros/mpl_test_node/CMakeLists.txt
rpg_mpl_ros/open3d_conversions/CMakeLists.txt
agile_autonomy/data_generation/traj_sampler/CMakeLists.txt
find_package(Open3D HINTS /home/yourname/open3d_install/lib/cmake/)
5、其他报错参考
https://blog.csdn.net/Aadequate/article/details/127458367
6、ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29’ not found (required by /home/lhd/anaconda3/envs/tf_24/lib/python3.8/site-packages/scipy/spatial/_ckdtree.cpython-38-x86_64-linux-gnu.so)
查看当前有那些版本
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
查找当前系统中其他的同类型文件,找到一个版本较高的
sudo find / -name "libstdc++.so.6*"
复制到指定目录并建立新的链接
sudo cp /root/anaconda3/envs/list/lib/libstdc++.so.6.0.29 /usr/lib/x86_64-linux-gnu/
sudo rm /usr/lib/x86_64-linux-gnu/libstdc++.so.6
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.29 /usr/lib/x86_64-linux-gnu/libstdc++.so.6
五、ubuntu20.04安装UE4
安装前需要保证 github 账号的连接,具体操作方法参考以下链接:
https://www.unrealengine.com/en-US/ue-on-github
UnrealEngine 无法安装,点Setup.bat会报错,Failed to download ‘https://cdn.unrealengine.com/dependencies/UnrealEngine-…’
找到对应的Commit.gitdeps.xml,替换 Engine\Build\ 下的同名文件后就可以安装了,
参考
4.25:https://github.com/EpicGames/UnrealEngine/releases/tag/4.25.4-release
4.26:https://github.com/EpicGames/UnrealEngine/releases/tag/4.26.2-release
4.27:https://github.com/EpicGames/UnrealEngine/releases/tag/4.27.2-release
5.0:https://github.com/EpicGames/UnrealEngine/releases/tag/5.0.3-release
5.1:https://github.com/EpicGames/UnrealEngine/releases/tag/5.1.1-release