From e7ed453e91688ef87b283094dde841ce65eb0c4f Mon Sep 17 00:00:00 2001 From: pablogs9 Date: Sun, 18 Jul 2021 06:37:25 +0000 Subject: [PATCH] micro-ROS galactic Library auto-update 18-07-2021 06:17 --- built_packages | 2 +- src/rclc/executor.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/built_packages b/built_packages index 665854660..0c95bd6f6 100755 --- a/built_packages +++ b/built_packages @@ -13,7 +13,7 @@ https://github.com/micro-ROS/rosidl_typesupport.git 0e03d18809cb08215877ff856a91 https://github.com/micro-ROS/rcutils 500ee3fcb16bf6260453c75b50c3d7785d724443 https://github.com/micro-ROS/micro_ros_utilities c829971bd33ac1f14a94aa722476110b4b59eaf9 https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git/ 07ae5aa5c456f887f2aa82896e207a3209309a50 -https://github.com/ros2/rclc 86399a7eed78a583043c5b620a55655976240d05 +https://github.com/ros2/rclc 701a32ded6ca4c2c60468d9d9b704a1d088bb6a3 https://github.com/micro-ROS/micro_ros_msgs.git c8af6d4f246d1b324e6578ec967c8ddc1f4093d5 https://github.com/ros-controls/control_msgs 11fdcdf76434d8ca9047787d17add4e18f56e9d6 https://github.com/ros2/rcl_interfaces.git c5d0a20150533a6cb93d5dcbd6e27cea9300aa6e diff --git a/src/rclc/executor.h b/src/rclc/executor.h index b78e33b5e..4dda219ed 100755 --- a/src/rclc/executor.h +++ b/src/rclc/executor.h @@ -94,6 +94,21 @@ rclc_executor_get_zero_initialized_executor(void); * Initializes an executor. * It creates a dynamic array with size \p number_of_handles using the * \p allocator. + * As the Executor is intended for embedded controllers, dynamic memory management is crucial. + * Therefore at initialization of the RCLC-Executor, the user defines the total \p number_of_handles. + * A handle is a term for subscriptions, timers, services, clients and guard conditions. The + * heap will be allocated only in this phase and no more memory will be allocated in the + * running phase in the executor. However, the heap memory of corresponding wait-set is + * allocated in the first iteration of a spin-method, which calls internally rclc_executor_prepare. + * Optionally, you can also call rclc_executor_prepare before calling any of the spin-methods. + * Then all wait-set related memory allocation will be done in rclc_executor_prepare and not + * in the first iteration of the spin-method. + * + * This makes this Executor static in + * terms of memory allocation, in the sense, that during runtime no heap allocations occur. + * You can add, however, at runtime as many handles, e.g. subscriptions, to the executor + * until the maximum number of handles is reached. In this case, the wait-set needs to be + * updated and rclc_executor_prepare is called again (with dynamic memory allocation in RCL). * * * *