Skip to content

Commit cf6c79c

Browse files
committed
Fix rolling builds
1 parent 2f73852 commit cf6c79c

10 files changed

Lines changed: 37 additions & 18 deletions

File tree

examples/handle_static_types/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ sensor_msgs__msg__Image msg_static;
3232

3333
uint8_t my_buffer[1000];
3434

35-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
35+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
3636
{
3737
RCLC_UNUSED(last_call_time);
38+
RCLC_UNUSED(arg);
3839
if (timer != NULL) {
3940
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));
4041
RCSOFTCHECK(rcl_publish(&publisher, &msg_static, NULL));

examples/int32_publisher/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
rcl_publisher_t publisher;
2525
std_msgs__msg__Int32 msg;
2626

27-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
27+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
2828
{
2929
RCLC_UNUSED(last_call_time);
30+
RCLC_UNUSED(arg);
3031
if (timer != NULL) {
3132
printf("Publishing: %d\n", (int) msg.data);
3233
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));

examples/int32_publisher_custom_transport/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
rcl_publisher_t publisher;
2525
std_msgs__msg__Int32 msg;
2626

27-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
27+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
2828
{
2929
RCLC_UNUSED(last_call_time);
30+
RCLC_UNUSED(arg);
3031
if (timer != NULL) {
3132
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));
3233
msg.data++;

examples/int32_publisher_custom_transport_usbcdc/main/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ rcl_publisher_t publisher; // Publisher
5151
std_msgs__msg__Int32 msg; // Message to be published
5252

5353
// Timer callback. Publishes a message
54-
void timer_callback(rcl_timer_t *timer, int64_t last_call_time) {
54+
void timer_callback(rcl_timer_t *timer, int64_t last_call_time, uintptr_t arg) {
5555
RCLC_UNUSED(last_call_time);
56+
RCLC_UNUSED(arg);
5657
if (timer != NULL) {
5758
// Publish message to topic
5859
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));
@@ -163,4 +164,4 @@ void app_main(void) {
163164
if (task_handle != NULL) {
164165
ESP_LOGI(TAG_MAIN, "micro-ROS task created");
165166
}
166-
}
167+
}

examples/int32_publisher_embeddedrtps/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
rcl_publisher_t publisher;
2121
std_msgs__msg__Int32 msg;
2222

23-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
23+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
2424
{
2525
RCLC_UNUSED(last_call_time);
26+
RCLC_UNUSED(arg);
2627
if (timer != NULL) {
2728
printf("Publishing: %d\n", (int) msg.data);
2829
RCSOFTCHECK(rcl_publish(&publisher, &msg, NULL));

examples/int32_sub_pub/main/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ rcl_subscription_t subscriber;
2626
std_msgs__msg__Int32 send_msg;
2727
std_msgs__msg__Int32 recv_msg;
2828

29-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
29+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
3030
{
3131
(void) last_call_time;
32+
(void) arg;
3233
if (timer != NULL) {
3334
RCSOFTCHECK(rcl_publish(&publisher, &send_msg, NULL));
3435
printf("Sent: %d\n", (int) send_msg.data);
@@ -127,4 +128,4 @@ void app_main(void)
127128
NULL,
128129
CONFIG_MICRO_ROS_APP_TASK_PRIO,
129130
NULL);
130-
}
131+
}

examples/low_consumption/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ std_msgs__msg__Int32 msg;
3232
esp_pm_lock_handle_t pmlock;
3333
#endif /* CONFIG_PM_ENABLE */
3434

35-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
35+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
3636
{
3737
RCLC_UNUSED(last_call_time);
38+
RCLC_UNUSED(arg);
3839
if (timer != NULL) {
3940
#ifdef CONFIG_PM_ENABLE
4041
esp_pm_lock_acquire(pmlock); // disable wifi sleep mode

examples/parameters/main/main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323

2424
rclc_parameter_server_t param_server;
2525

26-
void timer_callback(rcl_timer_t * timer, int64_t last_call_time)
26+
void timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
2727
{
2828
(void) timer;
2929
(void) last_call_time;
30+
(void) arg;
3031

3132
int64_t value;
3233
rclc_parameter_get_int(&param_server, "param2", &value);
@@ -142,4 +143,4 @@ void app_main(void)
142143
NULL,
143144
CONFIG_MICRO_ROS_APP_TASK_PRIO,
144145
NULL);
145-
}
146+
}

examples/ping_pong/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ int device_id;
4040
int seq_no;
4141
int pong_count;
4242

43-
void ping_timer_callback(rcl_timer_t * timer, int64_t last_call_time)
43+
void ping_timer_callback(rcl_timer_t * timer, int64_t last_call_time, uintptr_t arg)
4444
{
4545
RCLC_UNUSED(last_call_time);
46+
RCLC_UNUSED(arg);
4647

4748
if (timer != NULL) {
4849

libmicroros.mk

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ $(EXTENSIONS_DIR)/micro_ros_dev/install:
4747
touch src/ament_cmake_ros/rmw_test_fixture/COLCON_IGNORE; \
4848
colcon build --cmake-args -DBUILD_TESTING=OFF -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=gcc;
4949

50+
# ros2/rclc needs to be pinned to an older version until
51+
# ros2/rcl#1269 is added in micro-ROS/rcl as ros2/rclc#435 depends on it.
52+
# ros2/rosidl needs to be pinned to an older version as ros2/rosidl#942 added rosidl_buffer as
53+
# a dependency for various rosidl packages and we can't build it currently.
5054
$(EXTENSIONS_DIR)/micro_ros_src/src:
5155
rm -rf micro_ros_src; \
5256
mkdir micro_ros_src; cd micro_ros_src; \
@@ -58,13 +62,16 @@ $(EXTENSIONS_DIR)/micro_ros_src/src:
5862
git clone -b rolling https://github.com/micro-ROS/rmw_microxrcedds src/rmw_microxrcedds; \
5963
fi; \
6064
git clone -b ros2 https://github.com/eProsima/micro-CDR src/micro-CDR; \
61-
git clone -b rolling https://github.com/micro-ROS/rcl src/rcl; \
65+
git clone -b test/rolling https://github.com/micro-ROS/rcl src/rcl; \
6266
git clone -b rolling https://github.com/ros2/rclc src/rclc; \
6367
git clone -b rolling https://github.com/micro-ROS/rcutils src/rcutils; \
6468
git clone -b rolling https://github.com/micro-ROS/micro_ros_msgs src/micro_ros_msgs; \
6569
git clone -b rolling https://github.com/micro-ROS/rosidl_typesupport src/rosidl_typesupport; \
6670
git clone -b rolling https://github.com/micro-ROS/rosidl_typesupport_microxrcedds src/rosidl_typesupport_microxrcedds; \
6771
git clone -b rolling https://github.com/ros2/rosidl src/rosidl; \
72+
cd src/rosidl; \
73+
git reset --hard 5f4ace0288ecf942307ed62b9239ab5986884676; \
74+
cd ../..; \
6875
git clone -b rolling https://github.com/ros2/rosidl_dynamic_typesupport src/rosidl_dynamic_typesupport; \
6976
git clone -b rolling https://github.com/ros2/rmw src/rmw; \
7077
git clone -b rolling https://github.com/ros2/rcl_interfaces src/rcl_interfaces; \
@@ -78,13 +85,16 @@ $(EXTENSIONS_DIR)/micro_ros_src/src:
7885
git clone -b rolling https://github.com/ros2/ros2_tracing src/ros2_tracing; \
7986
git clone -b rolling https://github.com/micro-ROS/micro_ros_utilities src/micro_ros_utilities; \
8087
git clone -b rolling https://github.com/ros2/rosidl_core src/rosidl_core; \
81-
touch src/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE; \
82-
touch src/rcl_logging/rcl_logging_log4cxx/COLCON_IGNORE; \
83-
touch src/rcl_logging/rcl_logging_spdlog/COLCON_IGNORE; \
84-
touch src/rclc/rclc_examples/COLCON_IGNORE; \
8588
touch src/rcl/rcl_yaml_param_parser/COLCON_IGNORE; \
86-
touch src/ros2_tracing/test_tracetools/COLCON_IGNORE; \
89+
touch src/rclc/rclc_examples/COLCON_IGNORE; \
90+
touch src/rcl_logging/rcl_logging_implementation/COLCON_IGNORE; \
91+
touch src/rcl_logging/rcl_logging_spdlog/COLCON_IGNORE; \
8792
touch src/ros2_tracing/lttngpy/COLCON_IGNORE; \
93+
touch src/ros2_tracing/test_tracetools/COLCON_IGNORE; \
94+
touch src/rosidl/rosidl_buffer/COLCON_IGNORE; \
95+
touch src/rosidl/rosidl_buffer_backend/COLCON_IGNORE; \
96+
touch src/rosidl/rosidl_buffer_backend_registry/COLCON_IGNORE; \
97+
touch src/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE; \
8898
cp -rfL $(EXTRA_ROS_PACKAGES) src/extra_packages || :; \
8999
test -f src/extra_packages/extra_packages.repos && cd src/extra_packages && vcs import --input extra_packages.repos || :;
90100

0 commit comments

Comments
 (0)