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 Branch: SoundClient blocking mode does not work #241

Open
antbono opened this issue Sep 17, 2023 · 4 comments
Open

ROS2 Branch: SoundClient blocking mode does not work #241

antbono opened this issue Sep 17, 2023 · 4 comments

Comments

@antbono
Copy link

antbono commented Sep 17, 2023

Hello Everyone!

I'm using the ros2 branch. I tried to execute the simple node in scripts/play.py and I noticed that the blocking mode is not working actually: the program ends before the sound file is completely played.

Has anyone had the same issue?

Thanks

@knorth55
Copy link
Member

could you check if the client topic stops at this line?

rclpy.spin_until_future_complete(self.node, future)

@antbono
Copy link
Author

antbono commented Sep 21, 2023

Hi @knorth55!

I checked out, and I can confirm that the client stops at the line you highlighted.

Moreover when I use the non blocking mode I get this kind of error

[ERROR] [1695310239.114727197] [sound_play]: callback: sound_play.msg.SoundRequest(sound=-2, command=1, volume=1.0, arg='/tmp/output.ogg', arg2='')

but I can actually listen to the audio file.

@knorth55
Copy link
Member

so you mean that this issues is solved?

@antbono
Copy link
Author

antbono commented Sep 25, 2023

No, the issue is not solved.
Even if sound_play_node.py send a message of action completed

self.get_logger().info('sound_play action: Succeeded')

when I use SoundClient in my node, it never completes the command

rclpy.spin_until_future_complete(self.node, future)

and thus my node waits the reply forever.

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