-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot publish message with rclc_publisher_init_best_effort #148
Comments
You will need to change the serial baudrate to 921600. You may follow my wiki, https://github.com/hippo5329/micro_ros_arduino_examples_platformio/wiki |
Thank you for your answer, but I changed the serial baud rate to 921600, and with rclc_publisher_init_best_effort, it still isn't working. I also included --baudrate 921600 in my micro-ROS agent terminal. So, I switched back to rclc_publisher_init_default, and the topic frequency increased to 90 Hz. In both cases, whether using rclc_publisher_init_best_effort or rclc_publisher_init_default, my micro-ROS agent outputs the same.
But I noticed that my red built-in LED (which I think indicates serial transmission) flashes very quickly when using rclc_publisher_init_default; it almost appears to be always on. However, when using rclc_publisher_init_best_effort, it flashes very slowly, around 3 Hz. |
Please start over with the int32 publisher and re-connection examples in my first wiki. You should try to change the timer to 100Hz in these examples. You may check the publishing rate with "ros2 topic hz /topic". |
You should always start from the basic. Learning step by step. Then you should try out the second wiki, the linorobot2_hardware. 50Hz control loop is good enough for beginner's mobile robots. |
Issue template
I am trying to read the motor encoder, calculate odometry, and send the data back to my PC at 100 Hz. Using rclc_publisher_init_default, it can publish data, but only at 13 Hz. So, I tried using rclc_publisher_init_best_effort to increase the frequency, but it didn't publish anything.
Steps to reproduce the issue
Here my esp32 code
And here my test subscriber code in my PC.
Expected behavior
It should receive messages with the 'best effort' setting.
Actual behavior
Subscriber node does not receive data with the 'best effort' setting on the ESP32.
The text was updated successfully, but these errors were encountered: