{"id":13436180,"url":"https://github.com/ZJU-FAST-Lab/ego-planner","last_synced_at":"2025-03-18T20:31:02.883Z","repository":{"id":41283373,"uuid":"262742958","full_name":"ZJU-FAST-Lab/ego-planner","owner":"ZJU-FAST-Lab","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-08T09:23:46.000Z","size":55535,"stargazers_count":1637,"open_issues_count":29,"forks_count":311,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-14T18:04:43.359Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZJU-FAST-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-10T08:26:21.000Z","updated_at":"2025-03-14T12:41:38.000Z","dependencies_parsed_at":"2022-07-05T21:31:50.457Z","dependency_job_id":"8c99ce8f-e647-4480-92e1-7fef334c3153","html_url":"https://github.com/ZJU-FAST-Lab/ego-planner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2Fego-planner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2Fego-planner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2Fego-planner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2Fego-planner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZJU-FAST-Lab","download_url":"https://codeload.github.com/ZJU-FAST-Lab/ego-planner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244301340,"owners_count":20430924,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:00:45.165Z","updated_at":"2025-03-18T20:31:02.877Z","avatar_url":"https://github.com/ZJU-FAST-Lab.png","language":"C++","funding_links":[],"categories":["C++","6. Planning","Planning and Control","Softwares and Libraries","1. 机器人项目 | Robots"],"sub_categories":["3.4 High Performance Inference","Vector Map"],"readme":"# Note!\nOur recently developed planner [EGO-Swarm](https://github.com/ZJU-FAST-Lab/ego-planner-swarm) is an evolution from EGO-Planner. \nIt is more robust and safe, and therefore, is more recommended to use.\nIf you have only one drone, just set the `drone_id` to `0` in EGO-Swarm's launch files.\nOf course, some topic names are changed from EGO-Planner, check it using `rqt_graph` and `rosnode info \u003cpackage name\u003e`.\n\n# ROS2 Support\nFor the ROS2 version, please refer to the branch [ros2_version](https://github.com/ZJU-FAST-Lab/ego-planner-swarm/tree/ros2_version) of the repo ego-planner-swarm.\n\n# Quick Start within 3 Minutes \nCompiling tests passed on ubuntu **16.04, 18.04 and 20.04** with ros installed.\nYou can just execute the following commands one by one.\n```\nsudo apt-get install libarmadillo-dev\ngit clone https://github.com/ZJU-FAST-Lab/ego-planner.git\ncd ego-planner\ncatkin_make\nsource devel/setup.bash\nroslaunch ego_planner simple_run.launch\n```\nIf your network to github is slow, We recommend you to try the gitee repository [https://gitee.com/iszhouxin/ego-planner](https://gitee.com/iszhouxin/ego-planner). They synchronize automatically.\n\nIf you find this work useful or interesting, please kindly give us a star :star:, thanks!:grinning:\n\n# Acknowledgements\n- The framework of this repository is based on [Fast-Planner](https://github.com/HKUST-Aerial-Robotics/Fast-Planner) by Zhou Boyu who achieves impressive proformance on quadrotor local planning.\n\n- The L-BFGS solver we use is from [LBFGS-Lite](https://github.com/ZJU-FAST-Lab/LBFGS-Lite). \nIt is a C++ head-only single file, which is lightweight and easy to use.\n\n- The map generated in simulation is from [mockamap](https://github.com/HKUST-Aerial-Robotics/mockamap) by William Wu.\n\n- The hardware architecture is based on an open source implemation from [Teach-Repeat-Replan](https://github.com/HKUST-Aerial-Robotics/Teach-Repeat-Replan).\n\n# EGO-Planner \nEGO-Planner: An ESDF-free Gradient-based Local Planner for Quadrotors\n\n**EGO-Planner** is a lightweight gradient-based local planner without ESDF construction, which significantly reduces computation time compared to some state-of-the-art methods \u003c!--(EWOK and Fast-Planner)--\u003e. The total planning time is only **around 1ms** and don't need to compute ESDF.\n\n\u003cp align = \"center\"\u003e\n\u003cimg src=\"pictures/title.gif\" width = \"413\" height = \"232\" border=\"5\" /\u003e\n\u003cimg src=\"pictures/comp.jpg\" width = \"413\" height = \"232\" border=\"5\" /\u003e\n\u003cimg src=\"pictures/indoor.gif\" width = \"413\" height = \"232\" border=\"5\" /\u003e\n\u003cimg src=\"pictures/outdoor.gif\" width = \"413\" height = \"232\" border=\"5\" /\u003e\n\u003c/p\u003e\n\n**Video Links:** [YouTube](https://youtu.be/UKoaGW7t7Dk), [bilibili](https://www.bilibili.com/video/BV1VC4y1t7F4/) (for Mainland China)\n\n## 1. Related Paper\nEGO-Planner: An ESDF-free Gradient-based Local Planner for Quadrotors, Xin Zhou, Zhepei Wang, Chao Xu and Fei Gao (Accepted by RA-L). [arXiv Preprint](https://arxiv.org/abs/2008.08835), [IEEE Xplore](https://ieeexplore.ieee.org/abstract/document/9309347), and [IEEE Spectrum report](https://spectrum.ieee.org/automaton/robotics/robotics-hardware/video-friday-mit-media-lab-tf8-bionic-ankle).\n\n## 2. Standard Compilation\n\n**Requirements**: ubuntu 16.04, 18.04 or 20.04 with ros-desktop-full installation.\n\n**Step 1**. Install [Armadillo](http://arma.sourceforge.net/), which is required by **uav_simulator**.\n```\nsudo apt-get install libarmadillo-dev\n``` \n\n**Step 2**. Clone the code from github or gitee. This two repositories synchronize automaticly.\n\nFrom github,\n```\ngit clone https://github.com/ZJU-FAST-Lab/ego-planner.git\n```\n\nOr from gitee,\n```\ngit clone https://gitee.com/iszhouxin/ego-planner.git\n```\n\n**Step 3**. Compile,\n```\ncd ego-planner\ncatkin_make -DCMAKE_BUILD_TYPE=Release\n```\n\n**Step 4**. Run.\n\nIn a terminal at the _ego-planner/_ folder, open the rviz for visuallization and interactions\n```\nsource devel/setup.bash\nroslaunch ego_planner rviz.launch\n```\n\nIn another terminal at the _ego-planner/_, run the planner in simulation by\n```\nsource devel/setup.bash\nroslaunch ego_planner run_in_sim.launch\n```\n\nThen you can follow the gif below to control the drone.\n\n\u003cp align = \"center\"\u003e\n\u003cimg src=\"pictures/sim_demo.gif\" width = \"640\" height = \"438\" border=\"5\" /\u003e\n\u003c/p\u003e\n\n## 3. Using an IDE\nWe recommend using [vscode](https://code.visualstudio.com/), the project file has been included in the code you have cloned, which is the _.vscode_ folder.\nThis folder is **hidden** by default.\nFollow the steps below to configure the IDE for auto code completion \u0026 jump.\nIt will take 3 minutes.\n\n**Step 1**. Install C++ and CMake extentions in vscode.\n\n**Step 2**. Re-compile the code using command\n```\ncatkin_make -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=Yes\n```\nIt will export a compile commands file, which can help vscode to determine the code architecture.\n\n**Step 3**. Launch vscode and select the _ego-planner_ folder to open.\n```\ncode ~/\u003c......\u003e/ego-planner/\n```\n\nPress **Ctrl+Shift+B** in vscode to compile the code. This command is defined in _.vscode/tasks.json_.\nYou can add customized arguments after **\"args\"**. The default is **\"-DCMAKE_BUILD_TYPE=Release\"**.\n\n**Step 4**. Close and re-launch vscode, you will see the vscode has already understood the code architecture and can perform auto completion \u0026 jump.\n\n ## 4. Use GPU or Not\n Packages in this repo, **local_sensing** have GPU, CPU two different versions. By default, they are in CPU version for better compatibility. By changing\n \n ```\n set(ENABLE_CUDA false)\n ```\n \n in the _CMakeList.txt_ in **local_sensing** packages, to\n \n ```\n set(ENABLE_CUDA true)\n ```\n \nCUDA will be turned-on to generate depth images as a real depth camera does. \n\nPlease remember to also change the 'arch' and 'code' flags in the line of \n```\n    set(CUDA_NVCC_FLAGS \n      -gencode arch=compute_61,code=sm_61;\n    ) \n``` \nin _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](https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/) or [link2](https://github.com/tpruvot/ccminer/wiki/Compatibility).\n \nDon't forget to re-compile the code!\n\n**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.\n\nFor installation of CUDA, please go to [CUDA ToolKit](https://developer.nvidia.com/cuda-toolkit)\n\n## 5. Utilize the Full Performance of CPU\nThe 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.\n\nTherefore, we recommend you to manually set the CPU frequency to the maximum.\nFirstly, install a tool by\n```\nsudo apt install cpufrequtils\n```\nThen you can set the CPU frequency to the maximum allowed by\n```\nsudo cpufreq-set -g performance\n```\nMore information can be found in [http://www.thinkwiki.org/wiki/How_to_use_cpufrequtils](http://www.thinkwiki.org/wiki/How_to_use_cpufrequtils).\n\nNote that CPU frequency may still decrease due to high temperature in high load.\n\n# Improved ROS-RealSense Driver\n\nWe modified the ros-relasense driver to enable the laser emitter strobe every other frame, allowing the device to output high quality depth images with the help of emitter, and along with binocular images free from laser interference.\n\n\u003cp align = \"center\"\u003e\n\u003cimg src=\"pictures/realsense.PNG\" width = \"640\" height = \"158\" border=\"5\" /\u003e\n\u003c/p\u003e\n\nThis ros-driver is modified from [https://github.com/IntelRealSense/realsense-ros](https://github.com/IntelRealSense/realsense-ros) and is compatible with librealsense2 2.30.0.\nTests are performed on Intel RealSense D435 and D435i.\n\nParameter ```emitter_on_off``` is to turn on/off the added function.\nNote that if this function is turned on, the output frame rate from the device will be reduced to half of the frame rate you set, since the device uses half of the stream for depth estimation and the other half as binocular grayscale outputs.\nWhat's more, parameters ```depth_fps``` and ```infra_fps``` must be identical, and ```enable_emitter``` must be true as well under this setting.\n\n##  Install\n\nThe driver of librealsense2 2.30.0 should be installed explicitly.\nOn a x86 CPU, this can be performed easily within 5 minutes.\nFirstly, remove the currently installed driver by \n```\nsudo apt remove librealsense2-utils\n```\nor manually remove the files if you have installed the librealsense from source.\nThen, you can install the library of version 2.30.0 by\n```\nsudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE\n```\nFor ubuntu 16.04\n```\nsudo add-apt-repository \"deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main\" -u\n```\nFor ubuntu 18.04\n```\nsudo add-apt-repository \"deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main\" -u\n```\nThen continue with\n```\nsudo apt-get install librealsense2-dkms\nsudo apt install librealsense2=2.30.0-0~realsense0.1693\nsudo apt install librealsense2-gl=2.30.0-0~realsense0.1693\nsudo apt install librealsense2-utils=2.30.0-0~realsense0.1693\nsudo apt install librealsense2-dev=2.30.0-0~realsense0.1693\nsudo apt remove librealsense2-udev-rules\nsudo apt install librealsense2-udev-rules=2.30.0-0~realsense0.1693\n``` \nHere you can varify the installation by \n```\nrealsense-viewer\n```\n\n##  Run\n\nIf everything looks well, you can now compile the ros-realsense package named _modified_realsense2_camera.zip_ by ```catkin_make```, then run ros realsense node by \n```\nroslaunch realsense_camera rs_camera.launch\n```\nThen you will receive depth stream along with binocular stream together at 30Hz by default.\n\n\u003c!--\n# A Lightweight Quadrotor Simulator\n\nThe quadrotor simulator we use is inherited and modified from [Fast-Planner](https://github.com/HKUST-Aerial-Robotics/Fast-Planner). \nIt is lightweight and super easy to use.\nOnly one topic is required to control the drone.\nYou can execute \n```\nroslaunch so3_quadrotor_simulator simulator_example.launch \n```\nto run a simple example in ego-planner/src/uav_simulator/so3/control/src/control_example.cpp.\nIf this simulator is helpful to you, plaease kindly give a star to [Fast-Planner](https://github.com/HKUST-Aerial-Robotics/Fast-Planner) as well.--\u003e\n\n# Licence\nThe source code is released under [GPLv3](http://www.gnu.org/licenses/) license.\n\n# Maintaince\nWe are still working on extending the proposed system and improving code reliability. \n\nFor any technical issues, please contact Xin Zhou (iszhouxin@zju.edu.cn) or Fei GAO (fgaoaa@zju.edu.cn).\n\nFor commercial inquiries, please contact Fei GAO (fgaoaa@zju.edu.cn).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZJU-FAST-Lab%2Fego-planner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZJU-FAST-Lab%2Fego-planner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZJU-FAST-Lab%2Fego-planner/lists"}