diff --git a/README.md b/README.md index 5b629a2..a71e01a 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,10 @@ __Paper__: [Geometrically Constrained Trajectory Optimization for Multicopters]( ### Example 1: Global Trajectory Planning This is a minimal yet non-trivial example of our trajectory optimizer for real-time high-quality corridor and global trajectory generation subject to dynamic constraints. For installation, the following terminal commands are helpful. - + +* If you want to use it with the system-installed ROS: + + ```sh sudo apt update sudo apt install cpufrequtils sudo apt install libompl-dev @@ -50,8 +53,30 @@ This is a minimal yet non-trivial example of our trajectory optimizer for real-t catkin_make source devel/setup.bash roslaunch gcopter global_planning.launch + ``` + +* Alternatively, you can try it in a virtual environment: + + Using a virtual environment is great if you are on Ubuntu 22 and don't want to compile ROS 1, or maybe want to use this project with deep learning frameworks. Please refer to [RoboStack](https://robostack.github.io/GettingStarted.html)'s page for more information. + + ```sh + mamba create -n gcopter python=3.9 -y + mamba activate gcopter + + mamba install ros-noetic-desktop-full=1.5.0 -c robostack-staging -y + mamba install compilers cmake pkg-config make ninja colcon-common-extensions catkin_tools -y + mamba install ompl=1.5.2 -y + + # reactivate the env to prevent permission errors + mamba deactivate + mamba activate gcopter + cd ${CATKIN_WORKSPACE} + catkin_make + source devel/setup.bash + roslaunch gcopter global_planning.launch + ``` -After conduct the command, you will see the windows for rviz and rqt_plot. Please follow the gif below for global trajectory planning in a random map. +After conducting the command, you will see the windows for rviz and rqt_plot. Please follow the gif below for global trajectory planning in a random map.

diff --git a/gcopter/CMakeLists.txt b/gcopter/CMakeLists.txt index fe5087f..bdd6499 100755 --- a/gcopter/CMakeLists.txt +++ b/gcopter/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3) project(gcopter) -set(CMAKE_CXX_FLAGS "-std=c++14") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") set(CMAKE_BUILD_TYPE "Release") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -fPIC") diff --git a/map_gen/mockamap/CMakeLists.txt b/map_gen/mockamap/CMakeLists.txt index afe63a6..3ad6908 100644 --- a/map_gen/mockamap/CMakeLists.txt +++ b/map_gen/mockamap/CMakeLists.txt @@ -7,6 +7,7 @@ add_compile_options(-std=c++14) ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## is used, also find other catkin packages +find_package(PCL REQUIRED) find_package(catkin REQUIRED COMPONENTS roscpp pcl_ros @@ -151,6 +152,7 @@ add_executable(${PROJECT_NAME}_node ## Specify libraries to link a library or executable target against target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} + ${PCL_LIBRARIES} ) ############# diff --git a/map_gen/mockamap/include/maps.hpp b/map_gen/mockamap/include/maps.hpp index bcda759..0db846b 100644 --- a/map_gen/mockamap/include/maps.hpp +++ b/map_gen/mockamap/include/maps.hpp @@ -1,6 +1,7 @@ #ifndef MAPS_HPP #define MAPS_HPP +#include #include #include