Closed lukicdarkoo closed 2 years ago
As part of trying different QoS, I was just testing these limits and could not reproduce this issue.
With the default publisher it maxed out at ~83Hz.
Swapping to a best effort publisher (rclc_publisher_init_best_effort
) I got 904Hz with the timer timeout set to 1ms.
Note three differences in my setup are I'm using a Teensy 3.2, my agent is not run using a docker, and I have a domain id set.
Hello @lukicdarkoo, I also I'm testing with the Teensy 3.2 and reducing the timer timeout corresponds with a higher rate at the ros2 topic hz
.
In fact, applying your patch gives a quite accurate rate:
I'm wondering if there is something with the transports. Is this working for you with best effort publisher rclc_publisher_init_best_effort
as @nfry321 is suggesting?
I have just tested on Portenta H7 and it easily reaches 1000Hz even with rclc_publisher_init_default
. The same code on Arduino Zero publishes at 2Hz. It seems it is specific to the board, I will investigate.
Cool, let us know when you have results.
I'm going to check your Portenta port ASAP.
Hey, I am facing the same Problem on the Publisher Example Code on Arduino Due and ROS FOxy. When I changed the rclc_publisher_init_default to rclc_publisher_init_best_effort I got around 500 HZ It worked. But My problem That I am publishing Two topics while following this example https://micro.ros.org/docs/tutorials/core/programming_rcl_rclc/. Whatever I value of Timer I change I can't get a Frequency over 10 Hz even when changed rclc_publisher_init_default to rclc_publisher_init_best_effort.
Hi, I have the same problem on the Arduino Nano RP2040 (with ros foxy or Galactic). Using "rclc_publisher_init_best_effort" doesn't solve the problem, the timer cannot have a frequency higher than 2Hz.
@negre can you open an issue in the Raspberry Pi Pico repo and post your code so we can replicate it?
This should be fixed on the new release: v2.0.1. Check https://github.com/micro-ROS/micro_ros_raspberrypi_pico_sdk/issues/228 for details.
I am closing the issue, if the problem persists please reopen with feedback.
The timer calls callback at 2 Hz even though the timeout is less than 0.5s.
To Reproduce
System information (please complete the following information):