# AllocNet **Repository Path**: liu_heming/AllocNet ## Basic Information - **Project Name**: AllocNet - **Description**: No description available - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-08-06 - **Last Updated**: 2024-08-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AllocNet: Learning Time Allocation for Trajectory Optimization ## About AllocNet is a lightweight learning-based trajectory optimization framework. __Authors__: [Yuwei Wu](https://github.com/yuwei-wu), [Xiatao Sun](https://github.com/M4D-SC1ENTIST), Igor Spasojevic, and Vijay Kumar from the [Kumar Lab](https://www.kumarrobotics.org/). __Video Links__: [Youtube](https://www.youtube.com/watch?v=tA02dJz9ux8) __Related Paper__: Y. Wu, X. Sun, I. Spasojevic and V. Kumar, "Deep Learning for Optimization of Trajectories for Quadrotors," in IEEE Robotics and Automation Letters, vol. 9, no. 3, pp. 2479-2486, March 2024 [arxiv Preprint](https://arxiv.org/pdf/2309.15191.pdf) If this repo helps your research, please cite our paper at: ```bibtex @ARTICLE{10412114, author={Wu, Yuwei and Sun, Xiatao and Spasojevic, Igor and Kumar, Vijay}, journal={IEEE Robotics and Automation Letters}, title={Deep Learning for Optimization of Trajectories for Quadrotors}, year={2024}, volume={9}, number={3}, pages={2479-2486}} ``` ## Acknowledgements - Dataset: The raw point cloud dataset from [M3ED](https://m3ed.io/) - Front-end Path Planning: We use [OMPL](https://ompl.kavrakilab.org/) planning library - Planning Modules and Visualization: We use the module in [GCOPTER](https://github.com/ZJU-FAST-Lab/GCOPTER) ## Run our pre-trained Model in Simulation The repo has been tested on 20.04 with ros-desktop-full installation. ### 1. Prerequisites #### 1.1 ROS and OMPL Follow the guidance to install [ROS](https://wiki.ros.org/ROS/Installation) and install OMPL: ``` sudo apt install libompl-dev ``` #### 1.2 libtorch Download the libtorch and put it into the planner folder: [GPU version](https://download.pytorch.org/libtorch/nightly/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230301%2Bcu117.zip), or [CPU version](https://download.pytorch.org/libtorch/nightly/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230301%2Bcpu.zip) #### 1.3 QP solver We use osqp to solve quadratic programming, install by: ``` git clone -b release-0.6.3 https://github.com/osqp/osqp.git cd osqp git submodule init git submodule update mkdir build & cd build cmake .. sudo make install cd ../.. git clone https://github.com/robotology/osqp-eigen.git cd osqp-eigen mkdir build & cd build cmake .. sudo make install ``` ### 2. Build on ROS ``` git clone git@github.com:yuwei-wu/AllocNet.git && cd AllocNet/src wstool init && wstool merge utils.rosinstall && wstool update catkin build ``` The default mode is set to the GPU version. To switch to the CPU, navigate to line 29 in the 'learning_planning.hpp' file and replace 'device(torch::kGPU)' with 'device(torch::kCPU)'. After making this change, recompile the code for the updates to take effect. You can also check: - [Installing C++ Distributions of PyTorch](https://pytorch.org/cppdocs/installing.html) ### 3. Run ``` source devel/setup.bash roslaunch planner learning_planning.launch ``` click 2D Nav Goal to trigger planning: