initial minimal PX4_ROS2 platform and px4_ros2_default build (#20689)

- new ROS2 platform in PX4 intended for creating configs that build and run entirely in ROS2
 - PX4_CONFIG defaults to px4_ros2_default if no config specified and in a colcon workspace with ROS_VERSION=2
 - currently doesn't do much other than allow you to build px4 msgs interface package
This commit is contained in:
Daniel Agar
2022-12-08 23:03:44 -05:00
committed by GitHub
parent cfb670fbb3
commit 8114aad983
73 changed files with 4037 additions and 247 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ if(NOT "${PX4_PLATFORM}" MATCHES "qurt" AND NOT "${PX4_BOARD}" MATCHES "io-v2" A
)
endif()
add_library(px4_platform
add_library(px4_platform STATIC
board_common.c
board_identity.c
events.cpp
@@ -56,7 +56,7 @@ add_library(px4_platform
)
target_link_libraries(px4_platform prebuild_targets px4_work_queue)
if (NOT "${PX4_BOARD}" MATCHES "io-v2")
if(NOT "${PX4_BOARD}" MATCHES "io-v2")
add_subdirectory(uORB)
endif()
@@ -67,7 +67,7 @@ typedef int px4_task_t;
/** Default scheduler type */
#define SCHED_DEFAULT SCHED_FIFO
#if defined(__PX4_LINUX) || defined(__PX4_DARWIN) || defined(__PX4_CYGWIN)
#if defined(__PX4_LINUX) || defined(__PX4_DARWIN) || defined(__PX4_CYGWIN) || defined(__PX4_ROS2)
#define SCHED_PRIORITY_MAX sched_get_priority_max(SCHED_FIFO)
#define SCHED_PRIORITY_MIN sched_get_priority_min(SCHED_FIFO)
+2 -2
View File
@@ -32,9 +32,9 @@
############################################################################
# nuttx uses internal work queue currently
if (NOT "${PX4_PLATFORM}" MATCHES "nuttx")
if(NOT "${PX4_PLATFORM}" MATCHES "nuttx")
add_library(work_queue
add_library(work_queue STATIC
dq_addlast.c
dq_rem.c
dq_remfirst.c
+1
View File
@@ -35,6 +35,7 @@
#include <stdio.h>
#include "work_lock.h"
#include <px4_platform_common/sem.h>
extern px4_sem_t _work_lock[];