Skip to content
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
4 changes: 2 additions & 2 deletions Unity/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ fi

cd linux-build
if [ "$(uname)" == "Darwin" ]; then
export CC=/usr/local/opt/llvm@8/bin/clang
export CXX=/usr/local/opt/llvm@8/bin/clang++
export CC=/usr/local/opt/llvm@12/bin/clang
export CXX=/usr/local/opt/llvm@12/bin/clang++
else
export CC="clang-8"
export CXX="clang++-8"
Expand Down
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ if [ "$(uname)" == "Darwin" ]; then
export CXX="$(brew --prefix)/opt/llvm/bin/clang++"
else
if $gcc; then
export CC="gcc-8"
export CXX="g++-8"
export CC="gcc-12"
export CXX="g++-12"
else
export CC="clang-8"
export CXX="clang++-8"
export CC="clang-12"
export CXX="clang++-12"
fi
fi

Expand Down
4 changes: 2 additions & 2 deletions cmake/cmake-modules/CommonSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ macro(CommonSetup)
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
set(CMAKE_CXX_FLAGS "-stdlib=libc++ -Wno-documentation -Wno-unknown-warning-option ${CMAKE_CXX_FLAGS}")
find_package(LLVM REQUIRED CONFIG)
set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -lc++fs -ferror-limit=10")
set(CXX_EXP_LIB "-L${LLVM_LIBRARY_DIRS} -ferror-limit=10")
else()
set(CXX_EXP_LIB "-lstdc++fs -fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel")
set(CXX_EXP_LIB "-fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel")
endif ()
endif ()

Expand Down
15 changes: 13 additions & 2 deletions ros2/src/airsim_ros_pkgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ add_subdirectory("${AIRSIM_ROOT}/cmake/AirLib" AirLib)
add_subdirectory("${AIRSIM_ROOT}/cmake/MavLinkCom" MavLinkCom)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra -Wnoexcept -Wstrict-null-sentinel")
set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra -Wnoexcept -Wstrict-null-sentinel -Wno-deprecated-copy")
set(CXX_EXP_LIB "-nostdinc++ -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -nodefaultlibs
-l/usr/lib/x86_64-linux-gnu/libc++.so -l/usr/lib/x86_64-linux-gnu/libc++abi.so
-lm -lc -lgcc_s -lgcc
-lstdc++fs -fmax-errors=10")
-fmax-errors=10")
set(RPC_LIB_INCLUDES " ${AIRSIM_ROOT}/external/rpclib/rpclib-2.3.0/include")
set(RPC_LIB rpc)
message(STATUS "found RPC_LIB_INCLUDES=${RPC_LIB_INCLUDES}")
Expand All @@ -46,6 +46,8 @@ set(INCLUDE_DIRS include
${AIRSIM_ROOT}/MavLinkCom/include
${AIRSIM_ROOT}/MavLinkCom/common_utils
${OpenCV_INCLUDE_DIRS}
${std_srvs_INCLUDE_DIRS}
${mavros_msgs_INCLUDE_DIRS}
)
include_directories(${INCLUDE_DIRS})

Expand All @@ -59,6 +61,8 @@ ament_target_dependencies(pd_position_controller_simple
nav_msgs
geometry_msgs
airsim_interfaces
tf2
tf2_geometry_msgs
)

add_library(airsim_ros src/airsim_ros_wrapper.cpp)
Expand All @@ -72,12 +76,17 @@ ament_target_dependencies(airsim_ros
tf2_ros
cv_bridge
airsim_interfaces
tf2_geometry_msgs
mavros_msgs
std_srvs
)

add_executable(airsim_node src/airsim_node.cpp)
target_link_libraries(airsim_node airsim_ros AirLib)
ament_target_dependencies(airsim_node
rclcpp
tf2
tf2_geometry_msgs
)

add_executable(pd_position_controller_simple_node
Expand All @@ -86,6 +95,8 @@ target_link_libraries(pd_position_controller_simple_node
pd_position_controller_simple airsim_ros AirLib)
ament_target_dependencies(pd_position_controller_simple_node
rclcpp
tf2
tf2_geometry_msgs
)

# rosidl_target_interfaces(airsim_node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ STRICT_MODE_OFF //todo what does this do?
#include <rclcpp/rclcpp.hpp>
#include <tf2/LinearMath/Matrix3x3.h>
#include <tf2/LinearMath/Quaternion.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include <math.h>
#include <airsim_interfaces/msg/vel_cmd.hpp>
Expand Down
2 changes: 1 addition & 1 deletion ros2/src/airsim_ros_pkgs/include/utils.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
namespace utils
{
inline double get_yaw_from_quat_msg(const geometry_msgs::msg::Quaternion& quat_msg)
Expand Down
2 changes: 2 additions & 0 deletions ros2/src/airsim_ros_pkgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
<exec_depend>image_transport</exec_depend>
<exec_depend>message_generation</exec_depend>
<exec_depend>message_runtime</exec_depend>
<exec_depend>mavros_msgs</exec_depend>
<exec_depend>std_srvs</exec_depend>
<exec_depend>nav_msgs</exec_depend>
<exec_depend>rclcpp</exec_depend>
<exec_depend>rclpy</exec_depend>
Expand Down