Code Monkey home page Code Monkey logo

ego-planner-swarm's Introduction

Quick Start within 3 Minutes

Compiling tests passed on ubuntu 16.04, 18.04, and 20.04 with ros installed. You can just execute the following commands one by one.

sudo apt-get install libarmadillo-dev
git clone https://github.com/ZJU-FAST-Lab/ego-planner-swarm.git
cd ego-planner-swarm
catkin_make -j1
source devel/setup.bash
roslaunch ego_planner simple_run.launch

If you find this work useful or interesting, please kindly give us a star ⭐, thanks!😀

Acknowledgements

EGO-Swarm

EGO-Swarm: A Fully Autonomous and Decentralized Quadrotor Swarm System in Cluttered Environments

EGO-Swarm is a decentralized and asynchronous systematic solution for multi-robot autonomous navigation in unknown obstacle-rich scenes using merely onboard resources.

Video Links: YouTube, bilibili (for Mainland China)

1. Related Paper

EGO-Swarm: A Fully Autonomous and Decentralized Quadrotor Swarm System in Cluttered Environments, Xin Zhou, Jiangchao Zhu, Hongyu Zhou, Chao Xu, and Fei Gao (Published in ICRA2021). Paper link and Science report.

2. Standard Compilation

Requirements: ubuntu 16.04, 18.04 or 20.04 with ros-desktop-full installation.

Step 1. Install Armadillo, which is required by uav_simulator.

sudo apt-get install libarmadillo-dev

Step 2. Clone the code from github or gitee. These two repositories synchronize automatically.

From github,

git clone https://github.com/ZJU-FAST-Lab/ego-planner-swarm.git

Step 3. Compile,

cd ego-planner
catkin_make -DCMAKE_BUILD_TYPE=Release -j1

Step 4. Run.

In a terminal at the ego-planner-swarm/ folder, open the rviz for visualization and interactions

source devel/setup.bash
roslaunch ego_planner rviz.launch

In another terminal at the ego-planner-swarm/, run the planner in simulation by

source devel/setup.bash
roslaunch ego_planner swarm.launch

Then you can follow the gif below to control the drone.

3. Using an IDE

We recommend using vscode, the project file has been included in the code you have cloned, which is the .vscode folder. This folder is hidden by default. Follow the steps below to configure the IDE for auto code completion & jump. It will take 3 minutes.

Step 1. Install C++ and CMake extentions in vscode.

Step 2. Re-compile the code using the command

catkin_make -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=Yes

It will export a compile commands file, which can help vscode to determine the code architecture.

Step 3. Launch vscode and select the ego-planner folder to open.

code ~/<......>/ego-planner-swarm/

Press Ctrl+Shift+B in vscode to compile the code. This command is defined in .vscode/tasks.json. You can add customized arguments after "args". The default is "-DCMAKE_BUILD_TYPE=Release".

Step 4. Close and re-launch vscode, you will see the vscode has already understood the code architecture and can perform auto completion & jump.

4. Use GPU or Not

Packages in this repo, local_sensing have GPU, CPU two different versions. By default, they are in CPU version for better compatibility. By changing

set(ENABLE_CUDA false)

in the CMakeList.txt in local_sensing packages, to

set(ENABLE_CUDA true)

CUDA will be turned-on to generate depth images as a real depth camera does.

Please remember to also change the 'arch' and 'code' flags in the line of

    set(CUDA_NVCC_FLAGS 
      -gencode arch=compute_61,code=sm_61;
    ) 

in CMakeList.txt. If you encounter compiling error due to different Nvidia graphics card you use or you can not see proper depth images as expected, you can check the right code via link1 or link2.

Don't forget to re-compile the code!

local_sensing is the simulated sensors. If ENABLE_CUDA true, it mimics the depth measured by stereo cameras and renders a depth image by GPU. If ENABLE_CUDA false, it will publish pointclouds with no ray-casting. Our local mapping module automatically selects whether depth images or pointclouds as its input.

For installation of CUDA, please go to CUDA ToolKit

5. Use Drone Simulation Considering Dynamics or Not

Typical simulations use a dynamic model to calculate the motion of the drone under given commands. However, it requires continuous iterations to solve a differential equation, which consumes quite a lot computation. When launching a swarm of drones, this computation burden may cause significant lag. On an i7 9700KF CPU I use, 15 drones are the upper limit. Therefore, for compatibility and scalability purposes, I use a "fake_drone" package to convert commands to drone odometry directly by default.

If you want to use a more realistic quadrotor model, you can un-comment the node quadrotor_simulator_so3 and so3_control/SO3ControlNodelet in simulator.xml to enable quadrotor simulation considering dynamics. Please don't forget to comment the package poscmd_2_odom right after the above two nodes.

6. Utilize the Full Performance of CPU

The computation time of our planner is too short for the OS to increase CPU frequency, which makes the computation time tend to be longer and unstable.

Therefore, we recommend you to manually set the CPU frequency to the maximum. Firstly, install a tool by

sudo apt install cpufrequtils

Then you can set the CPU frequency to the maximum allowed by

sudo cpufreq-set -g performance

More information can be found in http://www.thinkwiki.org/wiki/How_to_use_cpufrequtils.

Note that CPU frequency may still decrease due to high temperature in high load.

Licence

The source code is released under GPLv3 license.

Maintenance

We are still working on extending the proposed system and improving code reliability.

For any technical issues, please contact Xin Zhou ([email protected]) or Fei GAO ([email protected]).

For commercial inquiries, please contact Fei GAO ([email protected]).

ego-planner-swarm's People

Contributors

bigsuperzzzx avatar ustfgaoaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ego-planner-swarm's Issues

如何在无人机飞行过程中更改它的目标点

如题,我测试了直接在ego_replan_fsm.cpp内的void EGOReplanFSM::init(ros::NodeHandle &nh)中修改planNextWaypoint进一个循环中,从而循环发布全局目标点,如下
sendpix0
但是无人机会不断抽搐,看起来像是计算有延迟,然后计算完毕后又回到了计算开始时的位置?那么应该如何在无人机飞行的过程中修改它的目标点同时让它能够平稳运行呢

record-2022-03-31_15.17.17.mp4

Ego planner map size constraints

Hi, @bigsuperZZZX
The planner is constrained by the map size that is initially given. here the size of the buffer becomes large which limits the maximum size.

are there any approaches to make the planner free from the map size constraints?

thanks

RLException: Unable to launch [ego_planner_node-3]

roslaunch ego_planner single_uav.launch
Then report an error
So how can I solve this problem
Please help me
ego planner节点无法执行

RLException: Unable to launch [iris_0_ego_planner_node-3].
If it is a script, you may be missing a '#!' declaration at the top.
The traceback for the exception was written to the log file

unknown catkin make error probably with Eigen

this happens while making ego-planner-swarm/src/planner/traj_utils/include/traj_utils/polynomial_traj.h

ego-planner-swarm/src/planner/traj_utils/include/traj_utils/polynomial_traj.h:237:107: error: no match for ‘operator=’ (operand types are ‘Eigen::internal::enable_if<true, Eigen::IndexedView<Eigen::Matrix<double, -1, -1>, double, double> >::type’ {aka ‘Eigen::IndexedView<Eigen::Matrix<double, -1, -1>, double, double>’} and ‘double’)
  237 |           mat_jerk(i, j) = i * (i - 1) * (i - 2) * j * (j - 1) * (j - 2) * pow(ts, i + j - 5) / (i + j - 5);
      |                                                                                                           ^

actually I don't see any wrong with Eigen::MatrixXd, everything seems correct

In file included from /usr/local/include/eigen3/Eigen/Core:273,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /usr/local/include/eigen3/Eigen/Eigen:1,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/plan_manage/include/plan_manage/ego_replan_fsm.h:4,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/plan_manage/src/ego_replan_fsm.cpp:2:
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:150:14: note: candidate: ‘template<class OtherDerived> Derived& Eigen::MatrixBase<Derived>::operator=(const Eigen::EigenBase<OtherDerived>&) [with OtherDerived = OtherDerived; Derived = Eigen::IndexedView<Eigen::Matrix<double, -1, -1>, double, double>]’
  150 |     Derived& operator=(const EigenBase<OtherDerived>& other);
      |              ^~~~~~~~
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:150:14: note:   template argument deduction/substitution failed:
In file included from /home/hazyparker/projects/ego-planner-swarm/src/planner/traj_utils/include/traj_utils/plan_container.hpp:9,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/bspline_opt/include/bspline_opt/bspline_optimizer.h:11,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/plan_manage/include/plan_manage/ego_replan_fsm.h:14,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/plan_manage/src/ego_replan_fsm.cpp:2:
/home/hazyparker/projects/ego-planner-swarm/src/planner/traj_utils/include/traj_utils/polynomial_traj.h:237:107: note:   mismatched types ‘const Eigen::EigenBase<Derived>’ and ‘double’
  237 |           mat_jerk(i, j) = i * (i - 1) * (i - 2) * j * (j - 1) * (j - 2) * pow(ts, i + j - 5) / (i + j - 5);
      |                                                                                                           ^
In file included from /usr/local/include/eigen3/Eigen/Core:273,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /usr/local/include/eigen3/Eigen/Eigen:1,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/plan_manage/include/plan_manage/ego_replan_fsm.h:4,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/plan_manage/src/ego_replan_fsm.cpp:2:
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:146:14: note: candidate: ‘template<class OtherDerived> Derived& Eigen::MatrixBase<Derived>::operator=(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = OtherDerived; Derived = Eigen::IndexedView<Eigen::Matrix<double, -1, -1>, double, double>]’
  146 |     Derived& operator=(const DenseBase<OtherDerived>& other);
      |              ^~~~~~~~
/usr/local/include/eigen3/Eigen/src/Core/MatrixBase.h:146:14: note:   template argument deduction/substitution failed:
In file included from /home/hazyparker/projects/ego-planner-swarm/src/planner/traj_utils/include/traj_utils/plan_container.hpp:9,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/bspline_opt/include/bspline_opt/bspline_optimizer.h:11,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/plan_manage/include/plan_manage/ego_replan_fsm.h:14,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/plan_manage/src/ego_replan_fsm.cpp:2:
/home/hazyparker/projects/ego-planner-swarm/src/planner/traj_utils/include/traj_utils/polynomial_traj.h:237:107: note:   mismatched types ‘const Eigen::DenseBase<Derived>’ and ‘double’
  237 |           mat_jerk(i, j) = i * (i - 1) * (i - 2) * j * (j - 1) * (j - 2) * pow(ts, i + j - 5) / (i + j - 5);
      |                                                                                                           ^
In file included from /usr/local/include/eigen3/Eigen/Core:282,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /usr/local/include/eigen3/Eigen/Eigen:1,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/plan_manage/include/plan_manage/ego_replan_fsm.h:4,
                 from /home/hazyparker/projects/ego-planner-swarm/src/planner/plan_manage/src/ego_replan_fsm.cpp:2:
/usr/local/include/eigen3/Eigen/src/Core/Assign.h:55:30: note: candidate: ‘Derived& Eigen::MatrixBase<Derived>::operator=(const Eigen::MatrixBase<Derived>&) [with Derived = Eigen::IndexedView<Eigen::Matrix<double, -1, -1>, double, double>]’
   55 | EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const MatrixBase& other)
      |                              ^~~~~~~~~~~~~~~~~~~
/usr/local/include/eigen3/Eigen/src/Core/Assign.h:55:79: note:   no known conversion for argument 1 from ‘double’ to ‘const Eigen::MatrixBase<Eigen::IndexedView<Eigen::Matrix<double, -1, -1>, double, double> >&’
   55 | EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>::operator=(const MatrixBase& other)
      |                                                             ~~~~~~~~~~~~~~~~~~^~~~~
make[2]: *** [planner/plan_manage/CMakeFiles/ego_planner_node.dir/build.make:76: planner/plan_manage/CMakeFiles/ego_planner_node.dir/src/ego_planner_node.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [planner/plan_manage/CMakeFiles/ego_planner_node.dir/build.make:104: planner/plan_manage/CMakeFiles/ego_planner_node.dir/src/planner_manager.cpp.o] Error 1
make[2]: *** [planner/plan_manage/CMakeFiles/ego_planner_node.dir/build.make:90: planner/plan_manage/CMakeFiles/ego_planner_node.dir/src/ego_replan_fsm.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5277: planner/plan_manage/CMakeFiles/ego_planner_node.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Invoking "make -j8 -l8" failed

Yaw speed and height constraints

Hello, I see that there are constraints for velocity max_veland acceleration max_acc in the launch file. Is there any way to constraint the yaw speed because the large yaw speed may cause VIO failure.

Moreover, I see grid_map/virtual_ceil_height, grid_map/visualization_truncate_height and map_size_z in the launch files. But it seems that they cannot limit the z position setpoint.

Terminal cost

In ego-planner, rebound cost only considers smoothness,distance and feasibility.In ego-swarm, terminal cost and swarm cost are added. I understand the swarm cost function, but don't know the usage of terminal cost. It seems that it will help terminal 3 points be closed to local target point, but ego-planner doesn't use it which also works well.

Yaw for trajectory optimization?

Thanks for the great work. I am no expert in path planning but after brief overview of the code, I noticed that yaw is not used for optimizations and is generated using interpolation from traj_server. Am I right? If yes, why so?

UAV unable to replan due to terminal point of trajectory in collision

#1 A major problem I've noticed with the planner is that it can't plan when tall or wide structures are in front of it, and because of its limited FOV, it gets stuck in an infinite loop of re-planning. This is what replan looks like in rviz -
ezgif com-video-to-gif
If you look closely in the point cloud, there is a tall obstacle in front of the drone, my theory is that its limited FOV makes it impossible to plan through.

This is what the ego_planner node continuously prints:
截图自 2023-03-13 02-17-02

The node also prints this if it's of any help, what does "base_point and control_point too close" mean?
截图自 2023-03-14 15-44-19

I wonder if we need hamiltonian perturbation to solve this problem?

#2 I also noticed the fact that although $dist=0.5$ the drone is still afraid to enter obstacles more than 2 meters most of the time, while again when it is slightly out of its range it will directly hit the obstacle when it yaws suddenly. I think this is due to lack of mapping with history.

#3 I want to ask why start_pos is different from odom_pos in ego_replan_fsm , according to me, the trajectory should start planning the drone from the current position, otherwise, if the controller lags slightly, the trajectory will run without considering the position of the drone. This raises the question, shouldn't we have closed-loop feedback between the controller and the trajectory planner? Any idea how to merge?

@bigsuperZZZX Any help in modifying the codebase is appreciated. Thank you.

catkin_make -j1

fubction catkin_make -j1,an error occurred
/usr/local/include/eigen3/Eigen/src/Core/Assign.h:55:30: note: no known conversion for argument 1 from ‘double’ to ‘const Eigen::MatrixBase<Eigen::IndexedView<Eigen::Matrix<double, -1, -1>, double, double> >&’
planner/traj_utils/CMakeFiles/traj_utils.dir/build.make:86: recipe for target 'planner/traj_utils/CMakeFiles/traj_utils.dir/src/polynomial_traj.cpp.o' failed
make[2]: *** [planner/traj_utils/CMakeFiles/traj_utils.dir/src/polynomial_traj.cpp.o] Error 1
CMakeFiles/Makefile2:5925: recipe for target 'planner/traj_utils/CMakeFiles/traj_utils.dir/all' failed
make[1]: *** [planner/traj_utils/CMakeFiles/traj_utils.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1" failed

“catkin_make -j1”

function catkin_make -j1,an error occurred.

/usr/local/include/eigen3/Eigen/src/Core/Assign.h:55:30: note: no known conversion for argument 1 from ‘double’ to ‘const Eigen::MatrixBase<Eigen::IndexedView<Eigen::Matrix<double, -1, -1>, double, double> >&’
planner/traj_utils/CMakeFiles/traj_utils.dir/build.make:86: recipe for target 'planner/traj_utils/CMakeFiles/traj_utils.dir/src/polynomial_traj.cpp.o' failed
make[2]: *** [planner/traj_utils/CMakeFiles/traj_utils.dir/src/polynomial_traj.cpp.o] Error 1
CMakeFiles/Makefile2:5925: recipe for target 'planner/traj_utils/CMakeFiles/traj_utils.dir/all' failed
make[1]: *** [planner/traj_utils/CMakeFiles/traj_utils.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1" failed

Question about the effect of localization drift and stabilization in planner and controller

大佬你好,想请教一个问题,就是定位模块的漂移会对实际实验的避障效果带来影响么?
我个人的想法使如果定位模块是视觉定位那种,漂移只是慢慢累积的,每帧间的相对定位还是稳定变化的,那么应该不会对规划和控制造成什么影响吧。我有这个想法是因为,看到在规划器里,定位odom信息主要是用在更新占据地图上,而不是规划轨迹里,因为除了一开始,大部分时间轨迹规划的起点都是上一条轨迹在该时刻的状态,而不是当前的定位,我就想这样如果一直不触发GEN_NEW_TRAJ的状态,然后定位越来越漂,是否会对避障起到影响。但是又想了想,控制器应该是一直趋于把当前状态拉向和期望轨迹差不多,所以就算定位漂也没关系,同时轨迹自己也会根据占据地图去刷新,而占据地图本身是相对漂了的定位投影的,所以定位漂了对避障是没有实际影响的。
但是如果定位模块精度比较低,像GPS那样,会在定位的真实值附近来回跳变,会对planner和controller有影响么,如果有,对谁的影响比较大呢?希望大佬可以帮忙解答,实在是想不明白。

Random forest compile error

#### Running command: "make -j1" in "/home/lr-2002/code/ego-planner-swarm/build"
####
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_StatusData
[  0%] Built target geometry_msgs_generate_messages_py
[  0%] Built target nav_msgs_generate_messages_py
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_Odometry
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_LQRTrajectory
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_AuxCommand
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_Corrections
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_Gains
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_OutputData
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_PositionCommand
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_PPROutputData
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_Serial
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_PolynomialTrajectory
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_SO3Command
[  0%] Built target _quadrotor_msgs_generate_messages_check_deps_TRPYCommand
[  7%] Built target quadrotor_msgs_generate_messages_py
[  7%] Built target nav_msgs_generate_messages_nodejs
[  7%] Built target geometry_msgs_generate_messages_nodejs
[ 14%] Built target quadrotor_msgs_generate_messages_nodejs
[ 14%] Built target nav_msgs_generate_messages_cpp
[ 14%] Built target geometry_msgs_generate_messages_cpp
[ 22%] Built target quadrotor_msgs_generate_messages_cpp
[ 22%] Built target nav_msgs_generate_messages_eus
[ 22%] Built target geometry_msgs_generate_messages_eus
[ 29%] Built target quadrotor_msgs_generate_messages_eus
[ 29%] Built target nav_msgs_generate_messages_lisp
[ 29%] Built target geometry_msgs_generate_messages_lisp
[ 36%] Built target quadrotor_msgs_generate_messages_lisp
[ 36%] Built target quadrotor_msgs_generate_messages
[ 37%] Built target encode_msgs
[ 38%] Built target decode_msgs
[ 38%] Linking CXX executable /home/lr-2002/code/ego-planner-swarm/devel/lib/map_generator/random_forest
/usr/bin/ld: CMakeFiles/random_forest.dir/src/random_forest_sensing.cpp.o: in function `RandomMapGenerateCylinder()':
/home/lr-2002/code/ego-planner-swarm/src/uav_simulator/map_generator/src/random_forest_sensing.cpp:269: undefined reference to `pcl::KdTreeFLANN<pcl::PointXYZ, flann::L2_Simple<float> >::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&, boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&)'
/usr/bin/ld: CMakeFiles/random_forest.dir/src/random_forest_sensing.cpp.o: in function `RandomMapGenerate()':
/home/lr-2002/code/ego-planner-swarm/src/uav_simulator/map_generator/src/random_forest_sensing.cpp:152: undefined reference to `pcl::KdTreeFLANN<pcl::PointXYZ, flann::L2_Simple<float> >::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&, boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&)'
/usr/bin/ld: CMakeFiles/random_forest.dir/src/random_forest_sensing.cpp.o:(.data.rel.ro._ZTVN3pcl11KdTreeFLANNINS_8PointXYZEN5flann9L2_SimpleIfEEEE[_ZTVN3pcl11KdTreeFLANNINS_8PointXYZEN5flann9L2_SimpleIfEEEE]+0x10): undefined reference to `pcl::KdTreeFLANN<pcl::PointXYZ, flann::L2_Simple<float> >::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&, boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&)'
/usr/bin/ld: CMakeFiles/random_forest.dir/src/random_forest_sensing.cpp.o:(.data.rel.ro._ZTVN3pcl11KdTreeFLANNINS_8PointXYZEN5flann9L2_SimpleIfEEEE[_ZTVN3pcl11KdTreeFLANNINS_8PointXYZEN5flann9L2_SimpleIfEEEE]+0x28): undefined reference to `pcl::KdTreeFLANN<pcl::PointXYZ, flann::L2_Simple<float> >::nearestKSearch(pcl::PointXYZ const&, int, std::vector<int, std::allocator<int> >&, std::vector<float, std::allocator<float> >&) const'
collect2: error: ld returned 1 exit status
make[2]: *** [uav_simulator/map_generator/CMakeFiles/random_forest.dir/build.make:244:/home/lr-2002/code/ego-planner-swarm/devel/lib/map_generator/random_forest] 错误 1
make[1]: *** [CMakeFiles/Makefile2:2719:uav_simulator/map_generator/CMakeFiles/random_forest.dir/all] 错误 2
make: *** [Makefile:141:all] 错误 2
Invoking "make -j1" failed

"catkin_make -j1"出错如上
从log看应该是pcl_flann的问题
我已经尝试过apt 删除重新安装,但是结果同样不行

现在电脑上有
flann和pcl以及和ros的连接

我找不到原因了,会是版本的问题吗?
pcl 是 1.10
libflann-dev 是1.9.1

catkin build error

I tried different version of eigen and ceres, but always got the following error:

2023-02-16 18-12-06屏幕截图

Stuck here 2 days, any help, thks.

error: static assertion failed: THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES

When compiling this repo, I encounter a problem with Eigen, and my version of Eigen is 3.1.4.
eg.
/ego-planner-swarm/src/planner/path_searching/src/dyn_a_star.cpp:74:47: required from here /usr/local/include/eigen3/Eigen/src/Core/MathFunctions.h:429:5: error: static assertion failed: THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar)

Gazebo and PX4 sitl simulation

Hi, I am very interested in this trajectory planner and would like to integrate it into a Gazebo+PX4-sitl simulation and then onto a real drone.
The tf transformation from base_link to world frame is published by px4.
I give as input only the point-cloud from a simulated velodyne VLP-16, no images, no depth.
At runtime the point cloud of the velodyne is correctly oriented but the grid_map is correct until the drone does not make a rotation, in this case the map rotates with respect to the world and the generated trajectories collide with the obstacles.
I am missing something in the configuration, I think. Attached is the view_frames and the ros_graph.
Has anyone successfully integrated ego-planner-swarm into px4 sitl? Can you give me a hand?

rosgraph
frames.pdf

Video:
https://youtu.be/hhEcDnhjNcQ

When using your so3 simulator, I publish the command

When using your so3 simulator, I publish the command

header: 
  seq: 21
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: ''
position: 
  x: nan
  y: nan
  z: nan
velocity: 
  x: 0.0
  y: 0.0
  z: 0.0
acceleration: 
  x: 0.0
  y: 0.0
  z: 0.0
yaw: 2.0
yaw_dot: 0.0
kx: [0.0, 0.0, 0.0]
kv: [0.0, 0.0, 0.0]
trajectory_id: 0
trajectory_flag: 0

the height of uav is not correct, I think it should be at original point

Trajectory tracking

Hi @bigsuperZZZX,
as mentioned in the ego swarm paper, for trajectory tracking, the following paper is referred to. I was curious if the codebase is open source for the trajectory tracker?

thanks

Real world vision SLAM

你们工程当中在仿真中是没有视觉SLAM的部分吗? 如果移植真是无人机的话,是不是要完成视觉定位的部分

Swarm configuration

Hi @bigsuperZZZX,
To use this package for the swarm, do we need to run this package on each drone, or this package will run on one drone, listen to other drone's odometry and publish trajectories for other drones.

Thanks

double free or corruption (out)

double free or corruption (out)
[drone_2_ego_planner_node-13] process has died [pid 16724, exit code -6, cmd /home/naman/Program/ego-planner-swarm/devel/lib/ego_planner/ego_planner_node ~odom_world:=/drone_2_visual_slam/odom ~planning/bspline:=/drone_2_planning/bspline ~planning/data_display:=/drone_2_planning/data_display ~planning/broadcast_bspline_from_planner:=/broadcast_bspline ~planning/broadcast_bspline_to_planner:=/broadcast_bspline ~grid_map/odom:=/drone_2_visual_slam/odom ~grid_map/cloud:=/drone_2_pcl_render_node/cloud ~grid_map/pose:=/drone_2_pcl_render_node/camera_pose ~grid_map/depth:=/drone_2_pcl_render_node/depth __name:=drone_2_ego_planner_node __log:=/home/naman/.ros/log/2fe9fc80-e44c-11eb-8017-ccf9e4e8181d/drone_2_ego_planner_node-13.log].
log file: /home/naman/.ros/log/2fe9fc80-e44c-11eb-8017-ccf9e4e8181d/drone_2_ego_planner_node-13*.log

请问这是什么情况呢

gif can't display

Hello, I don't know where the problem is. Follow the steps you said, this gif can't display when I run "roslaunch ego_planner swarm.launch".
Thank you very much!

Fix for missing MultiOccupancyGrid.h

If you try to build on a clean machine (tested on 18.04 & 20.04), you'll get an error due to a missing header file multi_map_server/MultiOccupancyGrid.h.

To fix this, edit the file:

src/uav_simulator/Utils/multi_map_server/CMakeLists.txt

Comment out the executable generation code per below:

## Declare a cpp executable
# COMMENT OUT FOR FIRST COMPILE PASS
# add_executable(multi_map_visualization src/multi_map_visualization.cc)

## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
# COMMENT OUT FOR FIRST COMPILE PASS
# add_dependencies(multi_map_visualization multi_map_server_messages_cpp)

## Specify libraries to link a library or executable target against
# COMMENT OUT FOR FIRST COMPILE PASS
# target_link_libraries(multi_map_visualization
#    ${catkin_LIBRARIES}
#    ${ARMADILLO_LIBRARIES}
#   pose_utils
# )

Then compile first pass, e.g.

catkin_make -j1

Now, you'll have devel/include/multi_map_server/MultiOccupancyGrid.h available.

Then, uncomment the file:

## Declare a cpp executable
# COMMENT OUT FOR FIRST COMPILE PASS
add_executable(multi_map_visualization src/multi_map_visualization.cc)

## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
# COMMENT OUT FOR FIRST COMPILE PASS
add_dependencies(multi_map_visualization multi_map_server_messages_cpp)

## Specify libraries to link a library or executable target against
# COMMENT OUT FOR FIRST COMPILE PASS
target_link_libraries(multi_map_visualization
   ${catkin_LIBRARIES}
   ${ARMADILLO_LIBRARIES}
   pose_utils
)

and recompile:

catkin_make -DCMAKE_BUILD_TYPE=Release -j1

Should work now!

catkin_make

/home/jetson/ego-planner-swarm/src/planner/bspline_opt/include/bspline_opt/uniform_bspline.h:59:63: error: ‘vector’ does not name a type; did you mean ‘perror’?
static void parameterizeToBspline(const double &ts, const vectorEigen::Vector3d &point_set,
^~~~~~
perror
/home/jetson/ego-planner-swarm/src/planner/bspline_opt/include/bspline_opt/uniform_bspline.h:59:69: error: expected ‘,’ or ‘...’ before ‘<’ token
static void parameterizeToBspline(const double &ts, const vectorEigen::Vector3d &point_set,
^
/home/jetson/ego-planner-swarm/src/planner/bspline_opt/src/uniform_bspline.cpp:211:8: error: prototype for ‘void ego_planner::UniformBspline::parameterizeToBspline(const double&, const std::vector<Eigen::Matrix<double, 3, 1> >&, const std::vector<Eigen::Matrix<double, 3, 1> >&, Eigen::MatrixXd&)’ does not match any in class ‘ego_planner::UniformBspline’
void UniformBspline::parameterizeToBspline(const double &ts, const vectorEigen::Vector3d &point_set,
^~~~~~~~~~~~~~
In file included from /home/jetson/ego-planner-swarm/src/planner/bspline_opt/src/uniform_bspline.cpp:1:0:
/home/jetson/ego-planner-swarm/src/planner/bspline_opt/include/bspline_opt/uniform_bspline.h:59:17: error: candidate is: static void ego_planner::UniformBspline::parameterizeToBspline(const double&, int)
static void parameterizeToBspline(const double &ts, const vectorEigen::Vector3d &point_set,
^~~~~~~~~~~~~~~~~~~~~
planner/bspline_opt/CMakeFiles/bspline_opt.dir/build.make:75: recipe for target 'planner/bspline_opt/CMakeFiles/bspline_opt.dir/src/uniform_bspline.cpp.o' failed
make[2]: *** [planner/bspline_opt/CMakeFiles/bspline_opt.dir/src/uniform_bspline.cpp.o] Error 1
CMakeFiles/Makefile2:5244: recipe for target 'planner/bspline_opt/CMakeFiles/bspline_opt.dir/all' failed
make[1]: *** [planner/bspline_opt/CMakeFiles/bspline_opt.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1" failed
是因为版本的问题吗

Some questions about reboundreplan function

I read the code about reboundreplan function and have some confusion:
This project doesn't use ESDF map, instead of base point and vector. But it only finds the {p,v} pair within collision segments consisted of control points. Sometimes the generated trajs may be too close to some obstacles, because collision-free optimal problem doesn't care about the segment which is close to obstacles but no happen collision. I want to improve this by increasing inflation. It's effective but not changes this problem fundamentally. I want to know whether your lab try to solve the problem and how to do?

真机复现问题

作者您好,我有幸在b站看到了贵实验室上传的ego-planner真机实验视频,并成功完成了复现。在学习ego-planner-swarm代码的过程中,我开始思考能否在多机上复现该算法。在此希望作者能够就如何复现指点一二。最后,感谢您为社区做的贡献,如能收到您的回复,我将不胜感激。

How to define the drone footprint for collision free path planning?

Thanks for the great work. Are we defining the drone footprint for collision free path planning in ego-planner-swarm? If yes, how? Is there any parameter for the same?
Do we have to configure the obstacle inflation to control the same?

In general, a brief documentation of the planner params would help a lot.

roslaunch以后rviz一片空白

roslaunch ego_planner simple_run.launch之后出现了空白的rviz,飞机模型和轨迹都没有显示。
终端一直报
[FSM]: state: INIT
no odom.
wait for goal or trigger.
请问这是少安了什么依赖吗?我是ubuntu20.04
image

Potential minor bug in depth map projectection?

Thanks for your great work!

depth = (*row_ptr) * inv_factor;
row_ptr = row_ptr + mp_.skip_pixel_;
// filter depth
// depth += rand_noise_(eng_);
// if (depth > 0.01) depth += rand_noise2_(eng_);
if (*row_ptr == 0)
{
depth = mp_.max_ray_length_ + 0.1;
}

To the best of my understanding, the code here (L282-L285) should function as if (depth == 0) depth = mp_.max_ray_length_ + 0.1;.
However, the pointer row_ptr is incremented in L276 so (*row_ptr) gets the depth of the next pixel.

I'm wondering if this is a design choice or an implementation issue. Thanks!

catkin make error missing files

[ 56%] Building CXX object ego-planner-swarm/src/uav_simulator/Utils/multi_map_server/CMakeFiles/multi_map_visualization.dir/src/multi_map_visualization.cc.o
/home/oem/ego_ws/src/ego-planner-swarm/src/uav_simulator/Utils/multi_map_server/src/multi_map_visualization.cc:5:10: fatal error: multi_map_server/MultiOccupancyGrid.h: No such file or directory
5 | #include <multi_map_server/MultiOccupancyGrid.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [ego-planner-swarm/src/uav_simulator/Utils/multi_map_server/CMakeFiles/multi_map_visualization.dir/build.make:63: ego-planner-swarm/src/uav_simulator/Utils/multi_map_server/CMakeFiles/multi_map_visualization.dir/src/multi_map_visualization.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4588: ego-planner-swarm/src/uav_simulator/Utils/multi_map_server/CMakeFiles/multi_map_visualization.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j1" failed

您好,代码相关问题

想问一下您这边现在是之开源了算法的代码和仿真的代码是嘛?之前B站视频讲的硬件相关的代码是得自己开发吗

Terminal point of the current trajectory is in obstacle, skip this planning

Hello, I sometimes meet continuous warning terminal point of the current trajectory is in obstacle, skip this planning in my PX4 SITL Simulation and the UAV will stop. I think this will happen when there's no solution to reach the goal, but indeed when this happens no obstacle is in front of the UAV.

In most cases, ego_planner works quite well. Thanks for the wonderful work.

image

image

运行catkin_make -j1出错

运行catkin_make -j1时,出现错误:
fatal error: multi_map_server/MultiOccupancyGrid.h: 没有那个文件或目录

启动ego_planner时报错

Ubuntu18.04 Melodic
运行命令/ran the command
roslaunch ego_planner single_uav.launch
error:
[ WARN] [1673777077.594699933, 1980.133000000]: Waiting for trigger from [n3ctrl] from RC [iris_0_ego_planner_node-3] process has died [pid 26423, exit code -9, cmd /home/lad/catkin_ws/devel/lib/ego_planner/ego_planner_node ~odom_world:=/vins_estimator/odometry ~planning/bspline:=/xtdrone/iris_0/planning/bspline ~planning/data_display:=/xtdrone/iris_0/planning/data_display ~planning/broadcast_bspline_from_planner:=/broadcast_bspline ~planning/broadcast_bspline_to_planner:=/broadcast_bspline ~grid_map/odom:=/xtdrone/iris_0/vins_estimator/odometry ~grid_map/cloud:=/iris_0/pcl_render_node/points ~grid_map/pose:=/iris_0/camera_pose ~grid_map/depth:=/iris_0/realsense/depth_camera/depth/image_raw __name:=iris_0_ego_planner_node __log:=/home/lad/.ros/log/8e05f104-94bb-11ed-b8dc-08002717c910/iris_0_ego_planner_node-3.log]. log file: /home/lad/.ros/log/8e05f104-94bb-11ed-b8dc-08002717c910/iris_0_ego_planner_node-3*.log
请问该怎么解决啊

swarm_trajs_sub_ is not used

in ego_replan_fsm.cpp, swarm_trajs_sub_ is not used. berhaps it should be used in callReboundReplan, to publish traj to the next drone of swarm

issue with path planning

Hi, @bigsuperZZZX
I am having an issue with tall and narrow obstacles, The planner tries to search path from top and bottom rather than finding paths from sides (favourable for this case). How can solve this

all your help is appreciated

thanks

OA problem for GPU version

I am interested in the GPU version. I followed the instructions in Use GPU or Not and was able to build it with no error. However it seems the drones stopped avoiding any obstacle. They are only avoiding other drones, then fly straight forward despite of the obstacles in the map, see the attached picture. The CPU version works well, this problem only happens when I change ENABLE_CUDA to true. How should I solve it? Thanks!
Screenshot_20221026_234243

Manually trigger replanning

Hello. Thanks for the great work.

I am interested in using this package in conjunction with a custom exploration planner, which provides path segments at some fixed interval of time.

I can see that the ego_replan_fsm file can be modified to accept waypoints from a external topic, however I am unclear as to how to make the planner track a new set of waypoints, while it's already executing the previous one.

Thanks in advance!!

How is your depth image implemented?

Hi,

Thank you for sharing your artifact. This is excellent work. I have a question about how your depth image is implemented. I noticed that when I am using it in the original scenario, obstacles that are further away are white, while obstacles close to the drone become black. I also noticed that both the floor and sky are rendered as black (and therefor must have the same values). You can see this below:

original

What confuses me, is that both the floor, sky and obstacles really close to the drone are rendered as black (they must all have similar values in the depth image). If this is true, how is the drone able to avoid obstacles close to the drone, and avoid flying into the ground?

The reason I am asking is because I am trying to use my own depth image. For example here you can see a Unity simulation where the drone is highlighted in the red circle. Above that you can see both the image from the drones camera, and the generated depth image. The depth image is generated using the Monocular Depth Estimation MiDaS algorithm.

mine

You will notice that the both the obstacle and floor in my example are registered as white in the depth image (As they are closer to the drone than the sky). This is opposite of your approach which has closer obstacles as black. In my example, the drone flys into the obstacles (which can be explained by my depth image being opposite to yours). However before I go and try and invert my depth image, I was hoping you could provide a few details on how your depth image is constructed (so that I can replicate it, i.e. why the floor, and the sky are both the same depth as obstacles that are close to the drone etc).

Thanks again for this awesome work!

运行catkin_make -j1出现错误

/issues/40

运行catkin_make -j1时,出现错误:
fatal error: multi_map_server/MultiOccupancyGrid.h: 没有那个文件或目录

我编译也遇到这个问题,奈何对cmake了解甚浅,找不到“确保它被优先编译”的实现办法,希望大佬们不吝赐教。

另外想问这种编译错误是由什么原因导致的,ego-planner同样的simulator就可以编译通过。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.