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 #27

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__pycache__
.vscode/
build/
devel/
logs/
.catkin*
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
# About This Fork

This fork supports building and testing using a ROS Noetic Conda install maintained by [Robostack](https://robostack.github.io/GettingStarted.html).

```sh
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 armadillo=12.6.5 -y
```

Now you can use it on whatever distro you like (Ubuntu Jammy is tested). See commits to find out what changes have been made. The original README is kept below, enjoy!

# EGO-Planner-v2
Swarm Playground, the codebase of the paper "[Swarm of micro flying robots in the wild](https://www.science.org/doi/10.1126/scirobotics.abm5954)".

# Installation-Free Usage

Please follow the [tutorial PDF file](swarm-playground/[README]_Brief_Documentation_for_Swarm_Playground.pdf) with corresponding videos ([1](swarm-playground/main_ws/WatchMe_main.mp4), [2](swarm-playground/formation_ws/WatchMe_formation.mp4), [3](swarm-playground/tracking_ws/WatchMe_tracking.mp4), [4](swarm-playground/interlaced_flight_ws/WatchMe_interlaced_flights.mp4)) to run the code.

For Ubuntu 22 (or other distros) users, a quick way to get started is to use [RoboStack](https://robostack.github.io/GettingStarted.html)'s ROS Noetic in the Conda virtual environment. Instructions can be found [here](./swarm-playground/[README]_Addtional_Instructions_for_Ubuntu22.md).

This work was born out of [MINCO](https://github.com/ZJU-FAST-Lab/GCOPTER).
If you find it interesting, please give both repos stars generously. Thanks.

Expand Down
18 changes: 18 additions & 0 deletions swarm-playground/[README]_Addtional_Instructions_for_Ubuntu22.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Getting Started with "Conda ROS"

First please install `mamba`, which is a faster version of `conda` and defaults to the `conda-forge` channel. Then you can run the following to set up the environment.

```sh
mamba create -n ego-v2 python=3.9 -y
mamba activate ego-v2

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 armadillo=12.6.5 -y

# reactivate the env to prevent permission issues
mamba deactivate
mamba activate ego-v2
```

With this environment activated you can run ROS commands as normal. For further instructions please refer to the [tutorial pdf](./[README]_Brief_Documentation_for_Swarm_Playground.pdf).
2 changes: 1 addition & 1 deletion swarm-playground/formation_ws/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(odom_visualization)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-O3 -Wall -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -g")
ADD_COMPILE_OPTIONS(-std=c++11 )
ADD_COMPILE_OPTIONS(-std=c++14 )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(pose_utils)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-O3 -Wall -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -g")
ADD_COMPILE_OPTIONS(-std=c++11 )
ADD_COMPILE_OPTIONS(-std=c++14 )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ catkin_package(

if(rviz_QT_VERSION VERSION_LESS "5")
message(STATUS "Using Qt4 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui)
find_package(Qt4 ${rviz_QT_VERSION} REQUIRED QtCore QtGui)
## pull in all required include dirs, define QT_LIBRARIES, etc.
include(${QT_USE_FILE})
qt4_wrap_cpp(MOC_FILES
Expand All @@ -30,7 +30,7 @@ if(rviz_QT_VERSION VERSION_LESS "5")

else()
message(STATUS "Using Qt5 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets)
## make target_link_libraries(${QT_LIBRARIES}) pull in all required dependencies
set(QT_LIBRARIES Qt5::Widgets)
qt5_wrap_cpp(MOC_FILES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ find_package(Eigen3 REQUIRED)

set(ENABLE_TCP false) # requires zmq, zmqpp

find_package(Boost REQUIRED COMPONENTS system filesystem thread)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
Expand All @@ -35,6 +36,7 @@ add_executable(bridge_node_udp
)
target_link_libraries(bridge_node_udp
${catkin_LIBRARIES}
${Boost_LIBRARIES}
)

if(ENABLE_TCP)
Expand All @@ -46,6 +48,7 @@ if(ENABLE_TCP)
${catkin_LIBRARIES}
zmq
zmqpp
${Boost_LIBRARIES}
)

endif(ENABLE_TCP)
Expand All @@ -55,6 +58,7 @@ add_executable(traj2odom_node
)
target_link_libraries(traj2odom_node
${catkin_LIBRARIES}
${Boost_LIBRARIES}
)


Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(traj_utils)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
# set(ENABLE_PRECOMPILED_HEADERS "OFF")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ if(ENABLE_CUDA)
${catkin_LIBRARIES}
)
else(ENABLE_CUDA)
find_package(PCL REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(catkin REQUIRED COMPONENTS
roscpp roslib cmake_modules pcl_ros sensor_msgs geometry_msgs nav_msgs quadrotor_msgs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
## 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 @@ -156,6 +157,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
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(so3_control)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")

## Find catkin macros and libraries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(so3_quadrotor_simulator)
add_compile_options(-std=c++11)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")

find_package(catkin REQUIRED COMPONENTS
Expand Down
2 changes: 1 addition & 1 deletion swarm-playground/interlaced_flight_ws/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(odom_visualization)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-O3 -Wall -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -g")
ADD_COMPILE_OPTIONS(-std=c++11 )
ADD_COMPILE_OPTIONS(-std=c++14 )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(pose_utils)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-O3 -Wall -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -g")
ADD_COMPILE_OPTIONS(-std=c++11 )
ADD_COMPILE_OPTIONS(-std=c++14 )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ catkin_package(

if(rviz_QT_VERSION VERSION_LESS "5")
message(STATUS "Using Qt4 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui)
find_package(Qt4 ${rviz_QT_VERSION} REQUIRED QtCore QtGui)
## pull in all required include dirs, define QT_LIBRARIES, etc.
include(${QT_USE_FILE})
qt4_wrap_cpp(MOC_FILES
Expand All @@ -31,7 +31,7 @@ if(rviz_QT_VERSION VERSION_LESS "5")

else()
message(STATUS "Using Qt5 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets)
## make target_link_libraries(${QT_LIBRARIES}) pull in all required dependencies
set(QT_LIBRARIES Qt5::Widgets)
qt5_wrap_cpp(MOC_FILES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ catkin_package()
include_directories(include ${catkin_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS})

find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets Quick)
find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets Quick)
set(QT_LIBRARIES Qt5::Widgets)
qt5_wrap_cpp(MOC_FILES
include/selected_points_publisher/selected_points_publisher.hpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ find_package(Eigen3 REQUIRED)

set(ENABLE_TCP false) # requires zmq, zmqpp

find_package(Boost REQUIRED COMPONENTS system filesystem thread)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
Expand All @@ -35,6 +36,7 @@ add_executable(bridge_node_udp
)
target_link_libraries(bridge_node_udp
${catkin_LIBRARIES}
${Boost_LIBRARIES}
)

if(ENABLE_TCP)
Expand All @@ -46,6 +48,7 @@ if(ENABLE_TCP)
${catkin_LIBRARIES}
zmq
zmqpp
${Boost_LIBRARIES}
)

endif(ENABLE_TCP)
Expand All @@ -55,6 +58,7 @@ add_executable(traj2odom_node
)
target_link_libraries(traj2odom_node
${catkin_LIBRARIES}
${Boost_LIBRARIES}
)


Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(traj_utils)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
# set(ENABLE_PRECOMPILED_HEADERS "OFF")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ if(ENABLE_CUDA)
${catkin_LIBRARIES}
)
else(ENABLE_CUDA)
find_package(PCL REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(catkin REQUIRED COMPONENTS
roscpp roslib cmake_modules pcl_ros sensor_msgs geometry_msgs nav_msgs quadrotor_msgs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
## 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 @@ -156,6 +157,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
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(so3_control)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")

## Find catkin macros and libraries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(so3_quadrotor_simulator)
add_compile_options(-std=c++11)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")

find_package(catkin REQUIRED COMPONENTS
Expand Down
2 changes: 1 addition & 1 deletion swarm-playground/main_ws/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(odom_visualization)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-O3 -Wall -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -g")
ADD_COMPILE_OPTIONS(-std=c++11 )
ADD_COMPILE_OPTIONS(-std=c++14 )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(pose_utils)

set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-O3 -Wall -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -g")
ADD_COMPILE_OPTIONS(-std=c++11 )
ADD_COMPILE_OPTIONS(-std=c++14 )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ catkin_package(

if(rviz_QT_VERSION VERSION_LESS "5")
message(STATUS "Using Qt4 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui)
find_package(Qt4 ${rviz_QT_VERSION} REQUIRED QtCore QtGui)
## pull in all required include dirs, define QT_LIBRARIES, etc.
include(${QT_USE_FILE})
qt4_wrap_cpp(MOC_FILES
Expand All @@ -31,7 +31,7 @@ if(rviz_QT_VERSION VERSION_LESS "5")

else()
message(STATUS "Using Qt5 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets)
## make target_link_libraries(${QT_LIBRARIES}) pull in all required dependencies
set(QT_LIBRARIES Qt5::Widgets)
qt5_wrap_cpp(MOC_FILES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ catkin_package()
include_directories(include ${catkin_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS})

find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets Quick)
find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets Quick)
set(QT_LIBRARIES Qt5::Widgets)
qt5_wrap_cpp(MOC_FILES
include/selected_points_publisher/selected_points_publisher.hpp
Expand Down
Loading