You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publish sensor_msgs::msg::PointCloud2 type message with frequency 10hz in container1
run subscriber and process data c++ code in container2, record the frequency subscription callback called
use ros2 topic hz tool follow the frequency of topic in both containers
Expected behavior
In both containers, ros2 topic hz shows the same frequency which is around 10hz
Log of c++ code in container2 shows that pointcloud2 messages arrive each 100ms
Actual behavior
In container1 terminal, ros2 topic hz shows frequency slightly under 10hz
In container2 terminal, ros2 topic hz shows frequency highly under 10hz, verity from 7hz to 9hz
In log of container2, c++ code receive message each 100ms stably
Additional information
Since code in both container are quite complicate, I can't paste the code here.
As discussed in the blow question, ros2 topic hz result is lower than c++ code because the qos used is different. But why the hz results in different containers turn out to be different?
In container1 terminal, ros2 topic hz shows frequency slightly under 10hz
i believe that in this case, shared memory transport (not zero copy via LoanedMessage) can be enabled as localhost communication. this could be one of the benefits for the performance.
In container2 terminal, ros2 topic hz shows frequency highly under 10hz, verity from 7hz to 9hz
inter-process communication via network interface (in the case of docker, via bridge) would be one of the reason for this.
In log of container2, c++ code receive message each 100ms stably
there could be several differences, like language advantage for performance, rclpy pybind performance overhead.
above is my assumption, i did not test and analyze the performance difference. hopefully this helps.
Bug report
Required Info:
Steps to reproduce issue
sensor_msgs::msg::PointCloud2
type message with frequency 10hz in container1ros2 topic hz
tool follow the frequency of topic in both containersExpected behavior
ros2 topic hz
shows the same frequency which is around 10hzActual behavior
ros2 topic hz
shows frequency slightly under 10hzros2 topic hz
shows frequency highly under 10hz, verity from 7hz to 9hzAdditional information
Since code in both container are quite complicate, I can't paste the code here.
As discussed in the blow question, ros2 topic hz result is lower than c++ code because the qos used is different. But why the hz results in different containers turn out to be different?
The text was updated successfully, but these errors were encountered: