robotology / yarp-devices-ros2

Plugins, devices and network wrappers for Yarp-ROS2 interoperation
http://www.yarp.it
10 stars 8 forks source link

Fix for static transforms - and miscellanea #54

Closed elandini84 closed 1 year ago

elandini84 commented 1 year ago

Since in ROS2 the latched behaviour requires a specific QOS configuration, the frameTransformGet_nwc_ros2 tf_static subscription have been modified by passing a QoS profile qith transient local duration policy.

[The solution to the issue related to the latched topic applied in this PR has been found in the following issue: ROS2#464]

Also, two minor changes have been applied: 1)lock in the callbacks, in order to avoid writing transforms in the buffer while a getTransforms query is ongoing; 2) The ros2 to yarp time conversion function have been replaced with the one in the Ros2Utils file (simply to avoid code duplication)