Linux 35.5 + JetPack v5.1.3@ ego-planner编译安装
- 1. 源由
- 2. 编译&安装
- Step 1:依赖库安装
- Step 2:建立工程
- Step 3:编译工程
- Step 4:安装工程
- 3. 问题汇总
- 3.1 planner/plan_env - OpenCV
- 3.2 uav_simulator/local_sensing - CUDA优化
- 4. 总结
1. 源由
- Fast-Planner
- FUEL
- RACER
- ego-planner
以上几份开源代码,基本上都是同一个性质的内容:在复杂环境中自主建模导航运行。
最近编译尝试运行下这几份代码,发现或多或少的出现了一些问题:
- Linux 35.5 + JetPack v5.1.3@Fast-Planner编译安装
- Linux 35.5 + JetPack v5.1.3@FUEL编译安装
- Linux 35.5 + JetPack v5.1.3@RACER编译安装
最后一份ego-planner代码,也来尝试下,获取有意外的收货。
2. 编译&安装
- 确认本地ROS版本:
$ rosversion --distro
noetic
- 本次编译代码版本:
$ git log -n 1
commit 0835f963dcfadce156dbec8ab66b93930955a87c (HEAD -> master, origin/master, origin/HEAD)
Author: Xin Zhou <923137104@qq.com>
Date: Thu Mar 16 21:01:05 2023 +0800Update README.md
- 系统安装不再赘述,详见:Linux 35.5 + JetPack v5.1.3@ros-noetic安装
Step 1:依赖库安装
$ sudo apt-get install libarmadillo-dev
Step 2:建立工程
$ mkdir -p ${YOUR_WORKSPACE_PATH}/src
$ cd ${YOUR_WORKSPACE_PATH}/src
$ git clone git@github.com:ZJU-FAST-Lab/ego-planner.git
Step 3:编译工程
$ cd ego-planner
$ catkin_make
或者
$ cd ego-planner
$ catkin_make -DCMAKE_BUILD_TYPE=Release
Step 4:安装工程
略,因为暂时不涉及软件的部署应用,相关模拟命令参考:
$ source devel/setup.bash && roslaunch ego_planner simple_run.launch
或者
- 运行Rviz虚拟环境
$ source devel/setup.bash
$ roslaunch ego_planner rviz.launch
- 运行模拟程序
$ source devel/setup.bash
$ roslaunch ego_planner run_in_sim.launch
3. 问题汇总
3.1 planner/plan_env - OpenCV
$ git diff src/planner/plan_env/CMakeLists.txt
diff --git a/src/planner/plan_env/CMakeLists.txt b/src/planner/plan_env/CMakeLists.txt
index 83219e3..e677639 100755
--- a/src/planner/plan_env/CMakeLists.txt
+++ b/src/planner/plan_env/CMakeLists.txt
@@ -46,4 +46,5 @@ add_library( plan_envtarget_link_libraries( plan_env${catkin_LIBRARIES}${PCL_LIBRARIES}
+ ${OpenCV_LIBS})
3.2 uav_simulator/local_sensing - CUDA优化
$ git diff src/uav_simulator/local_sensing/CMakeLists.txt
diff --git a/src/uav_simulator/local_sensing/CMakeLists.txt b/src/uav_simulator/local_sensing/CMakeLists.txt
index c2be3ac..5362408 100644
--- a/src/uav_simulator/local_sensing/CMakeLists.txt
+++ b/src/uav_simulator/local_sensing/CMakeLists.txt
@@ -5,8 +5,8 @@ SET(CMAKE_BUILD_TYPE Release) # Release, RelWithDebInfoADD_COMPILE_OPTIONS(-std=c++11 )ADD_COMPILE_OPTIONS(-std=c++14 )-set(ENABLE_CUDA false)
-#set(ENABLE_CUDA true)
+#set(ENABLE_CUDA false)
+set(ENABLE_CUDA true)if(ENABLE_CUDA)find_package(CUDA REQUIRED)
@@ -20,7 +20,8 @@ if(ENABLE_CUDA)# -gencode arch=compute_52,code=sm_52;# -gencode arch=compute_60,code=sm_60;# -gencode arch=compute_61,code=sm_61;
- -gencode arch=compute_75,code=sm_75;
+# -gencode arch=compute_75,code=sm_75;
+ -gencode arch=compute_87,code=sm_87;)SET(CUDA_PROPAGATE_HOST_FLAGS OFF)
4. 总结
本次顺利实现了Jetson Orin Nano上的模拟导航飞行。
Jetson Orin Nano | ego