Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Build Issues for Using RoboStack's ROS Noetic Environment #22

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
<p align="center">
<img src="misc/application1_global_planning.gif" width="600" height="407" />
</p>
Expand Down
2 changes: 1 addition & 1 deletion gcopter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 2 additions & 0 deletions map_gen/mockamap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
)

#############
Expand Down
1 change: 1 addition & 0 deletions map_gen/mockamap/include/maps.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef MAPS_HPP
#define MAPS_HPP

#include <deque>
#include <ros/ros.h>

#include <pcl/point_cloud.h>
Expand Down