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

Subscription count is 0 after subscriber is created in ros foxy #1536

Open
sim-lab-dev opened this issue Mar 27, 2024 · 4 comments
Open

Subscription count is 0 after subscriber is created in ros foxy #1536

sim-lab-dev opened this issue Mar 27, 2024 · 4 comments

Comments

@sim-lab-dev
Copy link

sim-lab-dev commented Mar 27, 2024

Problem description

I have created two nodes for publishing and subscribing odometry message in ros foxy.There are about 6 different types of subscriber and 6 publisher in one node. The publishing node only publishes odometry message in 100 hz. But when the subscriber is created by rclcpp no message is received occasionally. By using "occasionally" means about 1/20 for subscriber to lost connection to publisher. And also when I use ros2 info to check the topic status, the subscription count is 0. So is there anybody knows why the subscriber can't receive message.

Required Info:

  • Operating System:
    • Ubuntu20.04
  • Installation type:
    • Binaries
  • Version or commit hash:
    • Ros foxy
  • DDS implementation:
    • Default
  • Client library (if applicable):
@sim-lab-dev sim-lab-dev changed the title Subscription count is 0 after subscription is created Subscription count is 0 after subscriber is created in ros foxy Mar 27, 2024
@fujitatomoya
Copy link

this is not much an information, but hopefully helpful.

  • Can you use ROS Humble instead? Foxy is already E.O.L.
  • Can you restart the ros2 daemon with ros2 daemon stop and then ros2 daemon start, and ros2 topic info xxx? (if this finds the subscription, probably node graph in daemon is not updated.)

@sim-lab-dev
Copy link
Author

sim-lab-dev commented Mar 28, 2024

this is not much an information, but hopefully helpful.

  • Can you use ROS Humble instead? Foxy is already E.O.L.
  • Can you restart the ros2 daemon with ros2 daemon stop and then ros2 daemon start, and ros2 topic info xxx? (if this finds the subscription, probably node graph in daemon is not updated.)
  • Do you mean ROS Humble is more stable than Foxy?
  • Restarting the ros2 daemon can find the subscription but the callback function is not called

This link found Ros Foxy has a bug in topic message. Not sure if the problem is caused by the bug

@fujitatomoya
Copy link

Do you mean ROS Humble is more stable than Foxy?

yes, I do. Humble is maintained distro.

This #1301 found Ros Foxy has a bug in topic message. Not sure if the problem is caused by the bug

foxy uses Fast-DDS 2.1.x, eProsima/Fast-DDS#2906 has been merged, i believe the final foxy release should include this bug fix.

@sim-lab-dev
Copy link
Author

sim-lab-dev commented Mar 29, 2024

Do you mean ROS Humble is more stable than Foxy?

yes, I do. Humble is maintained distro.

This #1301 found Ros Foxy has a bug in topic message. Not sure if the problem is caused by the bug

foxy uses Fast-DDS 2.1.x, eProsima/Fast-DDS#2906 has been merged, i believe the final foxy release should include this bug fix.

I found that the following two cases the messages were received normally:

  • Config the fast-dds to use UDP transport instead of Shared Memory
  • Using the cyclone-dds instead of fast-dds
    In the first case I guessed the buffer size was not large enough and I also tried to increase the segment size of the fast-dds in Shared Memory mode, but it didn't work.

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