Skip to content

Commit

Permalink
add flightrender
Browse files Browse the repository at this point in the history
  • Loading branch information
yun-long committed Aug 31, 2020
1 parent c83f90b commit 51481ed
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flightrender/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
# Except this file
!.gitignore
!.clang-format
!CMakeLists.txt
!package.xml
35 changes: 35 additions & 0 deletions flightrender/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
project(flightrender)

cmake_minimum_required(VERSION 3.0.0)

find_package(catkin_simple REQUIRED)

catkin_simple()

# Setup Default Build Type as Release
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif ()

# Setup Architcture-specific Flags
if ("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "armv7l")
message(STATUS "Using ARMv7 optimized flags!")
set(CMAKE_CXX_ARCH_FLAGS " -Wno-psabi -march=armv7-a -mfpu=neon -mfloat-abi=hard -funsafe-math-optimizations")
elseif ("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
message(STATUS "Using ARM aarch64 optimized flags!")
set(CMAKE_CXX_ARCH_FLAGS " -Wno-psabi -march=armv8-a+crypto -mcpu=cortex-a57+crypto")
else ()
set(CMAKE_CXX_ARCH_FLAGS " -march=native")
endif ()

# Setup General C++ Flags
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DEIGEN_STACK_ALLOCATION_LIMIT=1048576")

# Setup Release and Debug flags
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_ARCH_FLAGS} -Wall -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -Wall -g")

# Finish
cs_install()
cs_export()
14 changes: 14 additions & 0 deletions flightrender/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<package format="2">
<name>flightrender</name>
<version>0.0.1</version>
<description>Flightmare Render Engine built on Unity</description>

<maintainer email="[email protected]">Yunlong Song</maintainer>

<license>GNU GPL</license>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>catkin_simple</buildtool_depend>

</package>
2 changes: 2 additions & 0 deletions flightros/launch/rotors_gazebo_test.launch
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
<remap from="flight_pilot/state_estimate" to="ground_truth/odometry" />
</node>

<node pkg="flightrender" type="RPG_Flightmare.x86_64" name="rpg_flightmare_render">
</node>

</launch>

0 comments on commit 51481ed

Please sign in to comment.