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

linear_battery_demo.sdf service calls timeout although seems to work #2146

Open
j-rivero opened this issue Sep 14, 2023 · 5 comments
Open

linear_battery_demo.sdf service calls timeout although seems to work #2146

j-rivero opened this issue Sep 14, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@j-rivero
Copy link
Contributor

j-rivero commented Sep 14, 2023

Environment

  • OS Version: Ubuntu 22.04
  • Source or binary build?
    • Binary: gz-sim 8.0.0~pre1

Following the instructions in the sdf file everything seems to work fine but the service calls returns a timeout although I see the expected effects in the logs.

Description

  • Expected behavior: returns nothing/success/true
  • Actual behavior: returns a timeout

Steps to reproduce

  1. gz sim -v 4 linear_battery_demo.sdf -z 10000
  2. Press play
  3. gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 6.0} angular: {z: 0.4}"
  4. gz service -s /model/vehicle_blue/battery/linear_battery/recharge/start --reqtype gz.msgs.Boolean --reptype gz.msgs.Empty --req 'data:true' --timeout 10000

Output

Service call timed out
@caguero
Copy link
Contributor

caguero commented Jan 5, 2024

I can't reproduce this from source. @j-rivero, do you have a chance to test it on your side with gz-sim 8 compiled from source?

@j-rivero
Copy link
Contributor Author

I can't reproduce this from source. @j-rivero, do you have a chance to test it on your side with gz-sim 8 compiled from source?

I can not reproduce it anymore, with the current stable packages, gz-sim version 8.0.0-1.

@github-project-automation github-project-automation bot moved this from To do to Done in Core development Jan 11, 2024
@caguero
Copy link
Contributor

caguero commented Jan 11, 2024

My explanation to this issue is that this request is a two-way message. The request is sent from the sender to destination (gz-sim) in this case. Then, gz-sim reacts to the request and sends the response. If for some reason, gz-sim is slow processing the request, the response that is sent back to the original sender might arrive after the timeout. That could be the explanation for seeing a timeout on the requester and a normal reaction to the request on gz-sim.

@azeey
Copy link
Contributor

azeey commented Jan 11, 2024

I'm able to reproduce this locally with a clean build of Harmonic (gz-sim 82969d5, and gz-transport 764a04bf).

@azeey azeey reopened this Jan 11, 2024
@github-project-automation github-project-automation bot moved this from Done to Inbox in Core development Jan 11, 2024
@azeey azeey moved this from Inbox to In progress in Core development Jan 18, 2024
@caguero
Copy link
Contributor

caguero commented Feb 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In progress
Development

No branches or pull requests

3 participants