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

move RTPS to dedicated px4fmu-v{3,4,4pro,5}, posix, sdflight builds #8113

Merged
merged 1 commit into from Oct 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Expand Up @@ -35,7 +35,7 @@
path = src/drivers/gps/devices
url = https://github.com/PX4/GpsDrivers.git
[submodule "src/lib/micro-CDR"]
path = src/lib/micro-CDR
path = src/modules/micrortps_bridge/micro-CDR
url = https://github.com/eProsima/micro-CDR.git
[submodule "platforms/nuttx/NuttX/nuttx"]
path = platforms/nuttx/NuttX/nuttx
Expand Down
16 changes: 0 additions & 16 deletions CMakeLists.txt
Expand Up @@ -355,22 +355,6 @@ include_directories(${include_dirs})
link_directories(${link_dirs})
add_definitions(${definitions})

#=============================================================================
# RTPS and micro-cdr
#

find_program(FASTRTPSGEN fastrtpsgen PATHS $ENV{FASTRTPSGEN_DIR})
if (FASTRTPSGEN AND (config_rtps_send_topics OR config_rtps_receive_topics))
option(GENERATE_RTPS_BRIDGE "enable RTPS and microCDR" ON)
endif()

if (GENERATE_RTPS_BRIDGE)
# add micro-CDR
message(STATUS "RTPS bridge enabled, send: ${config_rtps_send_topics} receive: ${config_rtps_receive_topics}")
px4_add_git_submodule(TARGET git_micro_cdr PATH src/lib/micro-CDR)
add_subdirectory(src/lib/micro-CDR EXCLUDE_FROM_ALL)
endif()

#=============================================================================
# message, and airframe generation
#
Expand Down
20 changes: 16 additions & 4 deletions Makefile
Expand Up @@ -159,21 +159,25 @@ all_nuttx_targets: $(NUTTX_CONFIG_TARGETS)
posix: posix_sitl_default
broadcast: posix_sitl_broadcast

# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
.PHONY: all posix broadcast all_nuttx_targets

# Multi- config targets.
eagle_default: posix_eagle_default qurt_eagle_default
eagle_rtps: posix_eagle_rtps qurt_eagle_default
eagle_legacy_default: posix_eagle_legacy qurt_eagle_legacy
excelsior_default: posix_excelsior_default qurt_excelsior_default
excelsior_rtps: posix_excelsior_rtps qurt_excelsior_default
excelsior_legacy_default: posix_excelsior_legacy qurt_excelsior_legacy


# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
.PHONY: all posix broadcast eagle_default eagle_legacy_default excelsior_legacy_default excelsior_default all_nuttx_targets
.PHONY: eagle_default eagle_rtps eagle_legacy_default
.PHONY: excelsior_default excelsior_rtps excelsior_legacy_default

# Other targets
# --------------------------------------------------------------------

.PHONY: qgc_firmware px4fmu_firmware misc_qgc_extra_firmware alt_firmware
.PHONY: sizes check quick_check
.PHONY: sizes check quick_check check_rtps

# QGroundControl flashable NuttX firmware
qgc_firmware: px4fmu_firmware misc_qgc_extra_firmware sizes
Expand Down Expand Up @@ -209,6 +213,14 @@ alt_firmware: \
check_s2740vc-v1_default \
sizes

# builds with RTPS
check_rtps: \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the plan to add this to CI? If so, we'll need to check the overhead of building all targets.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is for CI.

check_px4fmu-v3_rtps \
check_px4fmu-v4_rtps \
check_px4fmu-v4pro_rtps \
check_posix_sitl_rtps \
sizes

sizes:
@-find build -name *.elf -type f | xargs size 2> /dev/null || :

Expand Down
3 changes: 1 addition & 2 deletions Tools/astyle/files_to_check_code_style.sh
Expand Up @@ -14,9 +14,8 @@ exec find src \
-path src/lib/DriverFramework -prune -o \
-path src/lib/ecl -prune -o \
-path src/lib/matrix -prune -o \
-path src/lib/micro-CDR -prune -o \
-path src/modules/commander -prune -o \
-path src/modules/micrortps_bridge/micrortps_agent -prune -o \
-path src/modules/micrortps_bridge/micro-CDR -prune -o \
-path src/modules/sdlog2 -prune -o \
-path src/modules/systemlib/uthash -prune -o \
-path src/modules/uavcan/libuavcan -prune -o \
Expand Down
9 changes: 4 additions & 5 deletions cmake/common/px4_git.cmake
Expand Up @@ -41,7 +41,6 @@ include(common/px4_base)
# utility functions
#
# * px4_add_git_submodule
# * px4_create_git_hash_header
#

#=============================================================================
Expand Down Expand Up @@ -71,13 +70,13 @@ function(px4_add_git_submodule)

string(REPLACE "/" "_" NAME ${PATH})

add_custom_command(OUTPUT ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/git_init_${NAME}.stamp
COMMAND bash ${PX4_SOURCE_DIR}/Tools/check_submodules.sh ${PATH}
COMMAND cmake -E touch ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
COMMAND cmake -E touch ${CMAKE_CURRENT_BINARY_DIR}/git_init_${NAME}.stamp
DEPENDS ${PX4_SOURCE_DIR}/.gitmodules ${PATH}/.git
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
COMMENT "git submodule ${PATH}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

add_custom_target(${TARGET} DEPENDS ${PX4_BINARY_DIR}/git_init_${NAME}.stamp)
add_custom_target(${TARGET} DEPENDS git_init_${NAME}.stamp)
endfunction()
13 changes: 1 addition & 12 deletions cmake/configs/nuttx_mindpx-v2_default.cmake
Expand Up @@ -134,9 +134,6 @@ set(config_module_list
modules/uORB
modules/dataman

# micro RTPS
modules/micrortps_bridge/micrortps_client

#
# Libraries
#
Expand Down Expand Up @@ -197,12 +194,4 @@ set(config_module_list

# EKF
#examples/ekf_att_pos_estimator
)

set(config_rtps_send_topics
sensor_combined
)

set(config_rtps_receive_topics
sensor_baro
)
)
15 changes: 1 addition & 14 deletions cmake/configs/nuttx_nxphlite-v3_default.cmake
Expand Up @@ -143,10 +143,6 @@ set(config_module_list
modules/uORB
modules/dataman

# micro RTPS
modules/micrortps_bridge/micrortps_client


#
# Libraries
#
Expand Down Expand Up @@ -214,13 +210,4 @@ set(config_module_list

# EKF
examples/ekf_att_pos_estimator
)


set(config_rtps_send_topics
sensor_combined
)

set(config_rtps_receive_topics
sensor_baro
)
)
13 changes: 1 addition & 12 deletions cmake/configs/nuttx_px4fmu-v3_default.cmake
Expand Up @@ -138,9 +138,6 @@ set(config_module_list
modules/systemlib/mixer
modules/uORB

# micro RTPS
modules/micrortps_bridge/micrortps_client

#
# Libraries
#
Expand Down Expand Up @@ -207,12 +204,4 @@ set(config_module_list

# EKF
examples/ekf_att_pos_estimator
)

set(config_rtps_send_topics
sensor_combined
)

set(config_rtps_receive_topics
sensor_baro
)
)
5 changes: 5 additions & 0 deletions cmake/configs/nuttx_px4fmu-v3_rtps.cmake
@@ -0,0 +1,5 @@
include(configs/nuttx_px4fmu-v3_default)

list(APPEND config_module_list
modules/micrortps_bridge
)
13 changes: 1 addition & 12 deletions cmake/configs/nuttx_px4fmu-v4_default.cmake
Expand Up @@ -139,9 +139,6 @@ set(config_module_list
modules/uORB
modules/dataman

# micro RTPS
modules/micrortps_bridge/micrortps_client

#
# Libraries
#
Expand Down Expand Up @@ -209,12 +206,4 @@ set(config_module_list

# EKF
examples/ekf_att_pos_estimator
)

set(config_rtps_send_topics
sensor_combined
)

set(config_rtps_receive_topics
sensor_baro
)
)
5 changes: 5 additions & 0 deletions cmake/configs/nuttx_px4fmu-v4_rtps.cmake
@@ -0,0 +1,5 @@
include(configs/nuttx_px4fmu-v4_default)

list(APPEND config_module_list
modules/micrortps_bridge
)
13 changes: 1 addition & 12 deletions cmake/configs/nuttx_px4fmu-v4pro_default.cmake
Expand Up @@ -139,9 +139,6 @@ set(config_module_list
modules/systemlib/mixer
modules/uORB

# micro RTPS
modules/micrortps_bridge/micrortps_client

#
# Libraries
#
Expand Down Expand Up @@ -208,12 +205,4 @@ set(config_module_list

# EKF
#examples/ekf_att_pos_estimator
)

set(config_rtps_send_topics
sensor_combined
)

set(config_rtps_receive_topics
sensor_baro
)
)
5 changes: 5 additions & 0 deletions cmake/configs/nuttx_px4fmu-v4pro_rtps.cmake
@@ -0,0 +1,5 @@
include(configs/nuttx_px4fmu-v4pro_default)

list(APPEND config_module_list
modules/micrortps_bridge
)
13 changes: 1 addition & 12 deletions cmake/configs/nuttx_px4fmu-v5_default.cmake
Expand Up @@ -139,9 +139,6 @@ set(config_module_list
modules/systemlib/mixer
modules/uORB

# micro RTPS
modules/micrortps_bridge/micrortps_client

#
# Libraries
#
Expand Down Expand Up @@ -209,12 +206,4 @@ set(config_module_list

# EKF
#examples/ekf_att_pos_estimator
)

set(config_rtps_send_topics
sensor_combined
)

set(config_rtps_receive_topics
sensor_baro
)
)
5 changes: 5 additions & 0 deletions cmake/configs/nuttx_px4fmu-v5_rtps.cmake
@@ -0,0 +1,5 @@
include(configs/nuttx_px4fmu-v4_default)

list(APPEND config_module_list
modules/micrortps_bridge
)
13 changes: 1 addition & 12 deletions cmake/configs/posix_sdflight_default.cmake
Expand Up @@ -66,9 +66,6 @@ set(config_module_list
modules/commander
modules/navigator

# micro RTPS
modules/micrortps_bridge/micrortps_client

lib/controllib
lib/mathlib
lib/mathlib/math/filter
Expand All @@ -86,12 +83,4 @@ set(config_module_list
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
)

set(config_rtps_send_topics
sensor_baro
)

set(config_rtps_receive_topics
sensor_combined
)
)
5 changes: 1 addition & 4 deletions cmake/configs/posix_sdflight_legacy.cmake
Expand Up @@ -58,9 +58,6 @@ set(config_module_list
modules/commander
modules/navigator

# micro RTPS
modules/micrortps_bridge/micrortps_client

lib/controllib
lib/mathlib
lib/mathlib/math/filter
Expand All @@ -78,4 +75,4 @@ set(config_module_list
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
)
)
5 changes: 5 additions & 0 deletions cmake/configs/posix_sdflight_rtps.cmake
@@ -0,0 +1,5 @@
include(configs/posix_sdflight_default)

list(APPEND config_module_list
modules/micrortps_bridge
)
38 changes: 7 additions & 31 deletions cmake/configs/posix_sitl_default.cmake
Expand Up @@ -114,9 +114,6 @@ set(config_module_list
modules/systemlib/mixer
modules/uORB

# micro RTPS
modules/micrortps_bridge/micrortps_client

#
# Libraries
#
Expand Down Expand Up @@ -189,39 +186,18 @@ set(config_module_list

# EKF
examples/ekf_att_pos_estimator

# micro-RTPS
)

set(config_rtps_send_topics
sensor_baro
)

set(config_rtps_receive_topics
sensor_combined
)

# Default config_sitl_rcS_dir (posix_sitl_default), this is overwritten later
# for the config posix_sitl_efk2 and set again, explicitly, for posix_sitl_lpe,
# which are based on posix_sitl_default.
set(config_sitl_rcS_dir
posix-configs/SITL/init/ekf2
CACHE INTERNAL "init script dir for sitl"
)

set(config_sitl_viewer
jmavsim
CACHE STRING "viewer for sitl"
)
set_property(CACHE config_sitl_viewer
PROPERTY STRINGS "jmavsim;none")

set(config_sitl_debugger
disable
CACHE STRING "debugger for sitl"
)
set_property(CACHE config_sitl_debugger
PROPERTY STRINGS "disable;gdb;lldb")
set(config_sitl_rcS_dir posix-configs/SITL/init/ekf2 CACHE INTERNAL "init script dir for sitl")

set(config_sitl_viewer jmavsim CACHE STRING "viewer for sitl")
set_property(CACHE config_sitl_viewer PROPERTY STRINGS "jmavsim;none")

set(config_sitl_debugger disable CACHE STRING "debugger for sitl")
set_property(CACHE config_sitl_debugger PROPERTY STRINGS "disable;gdb;lldb")

# If the environment variable 'replay' is defined, we are building with replay
# support. In this case, we enable the orb publisher rules.
Expand Down