cyberbotics / epuck_ros2

ROS2 node for the e-puck robot and its simulation model
https://cyberbotics.com/doc/guide/epuck
Apache License 2.0
57 stars 19 forks source link

Increase publishing rate of camera raw images onboard #17

Open lukicdarkoo opened 4 years ago

lukicdarkoo commented 4 years ago

Camera ROS2 driver publishes raw RGB images at 3-4Hz locally even after transferring compression process on GPU. This can impact users who want to put computer vision algorithms onboard. One of the possible solutions may be to change the middleware, but it has to be investigated.

More information on this is available at: https://github.com/cyberbotics/epuck_ros2/pull/16#issuecomment-603840304 and there is an issue on Fast RTPS: https://github.com/eProsima/Fast-RTPS/issues/1107


https://www.theconstructsim.com/ros2-dds-fast-rtps-with-jaime-martin-losa/ Jaime Martin Losa mentioned two modes of Fast RTPS at 0:20, synchronous and asynchronous. Faster one, synchronous, is not default. We can try changing this.

Also, we can change the default QoS profile.


With synchronous mode and Fast RTPS I am getting the following error:

2020-04-17 13:35:09.475 [PUBLISHER Error] Data cannot be sent. It's serialized size is 921664' which exceeds the maximum payload size of '65416' and therefore ASYNCHRONOUS_PUBLISH_MODE must be used. -> Function create_new_change_with_params

for command:

FASTRTPS_DEFAULT_PROFILES_FILE=fastrtps.xml RMW_FASTRTPS_USE_QOS_FROM_XML=1 RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run epuck_ros2_camera camera

and Fast RTPS configuration from here