Skip to content
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

ros2 bridge missing some data between C++ node #480

Open
bobd988 opened this issue Apr 20, 2024 · 1 comment
Open

ros2 bridge missing some data between C++ node #480

bobd988 opened this issue Apr 20, 2024 · 1 comment

Comments

@bobd988
Copy link
Contributor

bobd988 commented Apr 20, 2024

Using the main branch to run ros2 pub/sub examples and some messages lost between C++ dora node with ros2 bridge style

image

One dora mode publish message and another dora node receive message, however from receiver node not all messages received.

image
@phil-opp
Copy link
Collaborator

This seems related to jhelovuo/ros2-client#25. Messages send at the beginning might be lost because it takes a bit until ROS2 creates the connection. You can avoid this by choosing reliable QoS settings. In the linked issue, the following settings were recommened:

If you want to receive samples published before the match was made, use e.g. the following QoS:

let reliable_qos = ros2::QosPolicyBuilder::new()
      .history(policy::History::KeepLast { depth: 10 })
      .reliability(policy::Reliability::Reliable {
        max_blocking_time: ros2::Duration::from_millis(100),
      })
      .durability(policy::Durability::TransientLocal)
      .build();

Important elements here are Reliable, TransientLocal, and some reasonable History depth.

and

You need to set reliability = Reliable at both Publisher and Subscriber.

Could you try this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants