diff --git a/examples/handle_static_types/main/main.c b/examples/handle_static_types/main/main.c index 91c187fc..b3d51919 100644 --- a/examples/handle_static_types/main/main.c +++ b/examples/handle_static_types/main/main.c @@ -32,9 +32,10 @@ sensor_msgs__msg__Image msg_static; uint8_t my_buffer[1000]; -void timer_callback(rcl_timer_t * timer, int64_t last_call_time) +void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg) { RCLC_UNUSED(last_call_time); + RCLC_UNUSED(arg); if (timer != NULL) { RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL)); RCSOFTCHECK(rcl_publish(&publisher, &msg_static, NULL)); diff --git a/examples/int32_publisher/main/main.c b/examples/int32_publisher/main/main.c index 5b8ebf71..8009aa26 100644 --- a/examples/int32_publisher/main/main.c +++ b/examples/int32_publisher/main/main.c @@ -24,9 +24,10 @@ rcl_publisher_t publisher; std_msgs__msg__Int32 msg; -void timer_callback(rcl_timer_t * timer, int64_t last_call_time) +void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg) { RCLC_UNUSED(last_call_time); + RCLC_UNUSED(arg); if (timer != NULL) { printf("Publishing: %d\n", (int) msg.data); RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL)); diff --git a/examples/int32_publisher_custom_transport/main/main.c b/examples/int32_publisher_custom_transport/main/main.c index 22afb5b1..c3de8436 100644 --- a/examples/int32_publisher_custom_transport/main/main.c +++ b/examples/int32_publisher_custom_transport/main/main.c @@ -24,9 +24,10 @@ rcl_publisher_t publisher; std_msgs__msg__Int32 msg; -void timer_callback(rcl_timer_t * timer, int64_t last_call_time) +void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg) { RCLC_UNUSED(last_call_time); + RCLC_UNUSED(arg); if (timer != NULL) { RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL)); msg.data++; diff --git a/examples/int32_publisher_custom_transport_usbcdc/main/main.c b/examples/int32_publisher_custom_transport_usbcdc/main/main.c index f49bcc44..1bec52dd 100644 --- a/examples/int32_publisher_custom_transport_usbcdc/main/main.c +++ b/examples/int32_publisher_custom_transport_usbcdc/main/main.c @@ -51,8 +51,9 @@ rcl_publisher_t publisher; // Publisher std_msgs__msg__Int32 msg; // Message to be published // Timer callback. Publishes a message -void timer_callback(rcl_timer_t *timer, int64_t last_call_time) { +void timer_callback(rcl_timer_t *timer, int64_t last_call_time, uintptr_t arg) { RCLC_UNUSED(last_call_time); + RCLC_UNUSED(arg); if (timer != NULL) { // Publish message to topic RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL)); @@ -163,4 +164,4 @@ void app_main(void) { if (task_handle != NULL) { ESP_LOGI(TAG_MAIN, "micro-ROS task created"); } -} \ No newline at end of file +} diff --git a/examples/int32_publisher_embeddedrtps/main/main.c b/examples/int32_publisher_embeddedrtps/main/main.c index d08238c3..5e2f4631 100644 --- a/examples/int32_publisher_embeddedrtps/main/main.c +++ b/examples/int32_publisher_embeddedrtps/main/main.c @@ -20,9 +20,10 @@ rcl_publisher_t publisher; std_msgs__msg__Int32 msg; -void timer_callback(rcl_timer_t * timer, int64_t last_call_time) +void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg) { RCLC_UNUSED(last_call_time); + RCLC_UNUSED(arg); if (timer != NULL) { printf("Publishing: %d\n", (int) msg.data); RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL)); diff --git a/examples/int32_sub_pub/main/main.c b/examples/int32_sub_pub/main/main.c index 2da217e5..742b7415 100644 --- a/examples/int32_sub_pub/main/main.c +++ b/examples/int32_sub_pub/main/main.c @@ -26,9 +26,10 @@ rcl_subscription_t subscriber; std_msgs__msg__Int32 send_msg; std_msgs__msg__Int32 recv_msg; -void timer_callback(rcl_timer_t * timer, int64_t last_call_time) +void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg) { (void) last_call_time; + (void) arg; if (timer != NULL) { RCSOFTCHECK(rcl_publish(&publisher, &send_msg, NULL)); printf("Sent: %d\n", (int) send_msg.data); @@ -127,4 +128,4 @@ void app_main(void) NULL, CONFIG_MICRO_ROS_APP_TASK_PRIO, NULL); -} \ No newline at end of file +} diff --git a/examples/low_consumption/main/main.c b/examples/low_consumption/main/main.c index cd7528ef..f148077b 100644 --- a/examples/low_consumption/main/main.c +++ b/examples/low_consumption/main/main.c @@ -32,9 +32,10 @@ std_msgs__msg__Int32 msg; esp_pm_lock_handle_t pmlock; #endif /* CONFIG_PM_ENABLE */ -void timer_callback(rcl_timer_t * timer, int64_t last_call_time) +void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg) { RCLC_UNUSED(last_call_time); + RCLC_UNUSED(arg); if (timer != NULL) { #ifdef CONFIG_PM_ENABLE esp_pm_lock_acquire(pmlock); // disable wifi sleep mode diff --git a/examples/parameters/main/main.c b/examples/parameters/main/main.c index 1806788e..c8973933 100644 --- a/examples/parameters/main/main.c +++ b/examples/parameters/main/main.c @@ -23,10 +23,11 @@ rclc_parameter_server_t param_server; -void timer_callback(rcl_timer_t * timer, int64_t last_call_time) +void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg) { (void) timer; (void) last_call_time; + (void) arg; int64_t value; rclc_parameter_get_int(¶m_server, "param2", &value); @@ -142,4 +143,4 @@ void app_main(void) NULL, CONFIG_MICRO_ROS_APP_TASK_PRIO, NULL); -} \ No newline at end of file +} diff --git a/examples/ping_pong/main/main.c b/examples/ping_pong/main/main.c index 31b8e610..86b66e2b 100644 --- a/examples/ping_pong/main/main.c +++ b/examples/ping_pong/main/main.c @@ -40,9 +40,10 @@ int device_id; int seq_no; int pong_count; -void ping_timer_callback(rcl_timer_t * timer, int64_t last_call_time) +void ping_timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg) { RCLC_UNUSED(last_call_time); + RCLC_UNUSED(arg); if (timer != NULL) { diff --git a/libmicroros.mk b/libmicroros.mk index 651e49f2..cef7d502 100644 --- a/libmicroros.mk +++ b/libmicroros.mk @@ -47,6 +47,10 @@ $(EXTENSIONS_DIR)/micro_ros_dev/install: touch src/ament_cmake_ros/rmw_test_fixture/COLCON_IGNORE; \ colcon build --cmake-args -DBUILD_TESTING=OFF -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=gcc; +# ros2/rclc needs to be pinned to an older version until +# ros2/rcl#1269 is added in micro-ROS/rcl as ros2/rclc#435 depends on it. +# ros2/rosidl needs to be pinned to an older version as ros2/rosidl#942 added rosidl_buffer as +# a dependency for various rosidl packages and we can't build it currently. $(EXTENSIONS_DIR)/micro_ros_src/src: rm -rf micro_ros_src; \ mkdir micro_ros_src; cd micro_ros_src; \ @@ -58,13 +62,16 @@ $(EXTENSIONS_DIR)/micro_ros_src/src: git clone -b rolling https://github.com/micro-ROS/rmw_microxrcedds src/rmw_microxrcedds; \ fi; \ git clone -b ros2 https://github.com/eProsima/micro-CDR src/micro-CDR; \ - git clone -b rolling https://github.com/micro-ROS/rcl src/rcl; \ + git clone -b test/rolling https://github.com/micro-ROS/rcl src/rcl; \ git clone -b rolling https://github.com/ros2/rclc src/rclc; \ git clone -b rolling https://github.com/micro-ROS/rcutils src/rcutils; \ git clone -b rolling https://github.com/micro-ROS/micro_ros_msgs src/micro_ros_msgs; \ git clone -b rolling https://github.com/micro-ROS/rosidl_typesupport src/rosidl_typesupport; \ git clone -b rolling https://github.com/micro-ROS/rosidl_typesupport_microxrcedds src/rosidl_typesupport_microxrcedds; \ git clone -b rolling https://github.com/ros2/rosidl src/rosidl; \ + cd src/rosidl; \ + git reset --hard 5f4ace0288ecf942307ed62b9239ab5986884676; \ + cd ../..; \ git clone -b rolling https://github.com/ros2/rosidl_dynamic_typesupport src/rosidl_dynamic_typesupport; \ git clone -b rolling https://github.com/ros2/rmw src/rmw; \ git clone -b rolling https://github.com/ros2/rcl_interfaces src/rcl_interfaces; \ @@ -78,13 +85,16 @@ $(EXTENSIONS_DIR)/micro_ros_src/src: git clone -b rolling https://github.com/ros2/ros2_tracing src/ros2_tracing; \ git clone -b rolling https://github.com/micro-ROS/micro_ros_utilities src/micro_ros_utilities; \ git clone -b rolling https://github.com/ros2/rosidl_core src/rosidl_core; \ - touch src/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE; \ - touch src/rcl_logging/rcl_logging_log4cxx/COLCON_IGNORE; \ - touch src/rcl_logging/rcl_logging_spdlog/COLCON_IGNORE; \ - touch src/rclc/rclc_examples/COLCON_IGNORE; \ touch src/rcl/rcl_yaml_param_parser/COLCON_IGNORE; \ - touch src/ros2_tracing/test_tracetools/COLCON_IGNORE; \ + touch src/rclc/rclc_examples/COLCON_IGNORE; \ + touch src/rcl_logging/rcl_logging_implementation/COLCON_IGNORE; \ + touch src/rcl_logging/rcl_logging_spdlog/COLCON_IGNORE; \ touch src/ros2_tracing/lttngpy/COLCON_IGNORE; \ + touch src/ros2_tracing/test_tracetools/COLCON_IGNORE; \ + touch src/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE; \ + touch src/rosidl/rosidl_buffer/COLCON_IGNORE; \ + touch src/rosidl/rosidl_buffer_backend/COLCON_IGNORE; \ + touch src/rosidl/rosidl_buffer_backend_registry/COLCON_IGNORE; \ cp -rf $(EXTRA_ROS_PACKAGES) src/extra_packages || :; \ test -f src/extra_packages/extra_packages.repos && cd src/extra_packages && vcs import --input extra_packages.repos || :;