rclc icon indicating copy to clipboard operation
rclc copied to clipboard

Question about periodic calls to rclc_executor_spin_some

Open ChoiYouJung opened this issue 1 month ago • 0 comments

Hello.

I am using rclc in micro-ROS in an environment without OS or RTOS. However, micro-ROS-agent is running on Linux. And 6 subscriptions and 9 ROS Timers, including 3 500msec, 3 100msec, 2 33msec, and 1 1000msec, are operated by one executor. Also, in the case of the 33msec Timer, a large ROS message is transmitted (one Timer is Odometry and TF message, another Timer is IMU message). I leave the question because I want to reduce the processing time of rclc_executor_spin_some where this is handled. When I tested it, the test results were as follows.

  • Test results When rclc_executor_spin_some(&executor, RCL_MS_TO_NS(1)); is called periodically, the processing time is mostly 0 or 1, and in rare cases, it takes about 5 processing times. When rclc_executor_spin_some(&executor, RCL_MS_TO_NS(1)); is not called periodically, the processing time is 0 to 12, and in rare cases, it takes more than 12 or up to 16.

  • Question When rclc_executor_spin_some(&executor, RCL_MS_TO_NS(1)); is not called periodically and rclc_executor_spin_some(&executor, RCL_MS_TO_NS(1)); I want to know the difference when calling periodically.**

Thank you.

ChoiYouJung avatar Jan 24 '25 02:01 ChoiYouJung