Skip to content

a bug in the action server example in the documentation #95

Description

@hitch22

Description

I gave the action server/client example a try given in the documentation(https://roslibpy.readthedocs.io/en/latest/examples.html?highlight=action%20server#actions)

I noticed that while the example appears to work because the feedback can be received by the client, there is an issue where either send_succeeded() or wait() does not work properly, causing the actual result sequence not to be received on the client side of things just like in #42.

However, inspecting ROS topic shows that the result is being received in ROS properly nonetheless as follows:

rostopic echo /fibonacci/result
header:
seq: 1
stamp:
secs: 0
nsecs: 0
frame_id: ''
status:
goal_id:
stamp:
secs: 0
nsecs: 0
id: "goal_0.5943359234251057_1654756458046"
status: 3
text: ''
result:
sequence: [0, 1, 1, 2, 3, 5, 8, 13, 21]

Could you please fix the problem so that wait() can actually receive the result rather than None so that it does not time out or wait forever?

To Reproduce
Run the example mentioned above

Error Messages that I get:

Exception Traceback (most recent call last)
/tmp/ipykernel_2218/3159858066.py in
8 goal.on('feedback', lambda f: print(f['sequence']))
9 goal.send()
---> 10 result = goal.wait(10)

/usr/local/lib/python3.8/dist-packages/roslibpy/actionlib.py in wait(self, timeout)
143 """
144 if not self.wait_result.wait(timeout):
--> 145 raise Exception('Goal failed to receive result')
146
147 return self.result

Exception: Goal failed to receive result

Expected behavior
the action client receives the result object after the server goal status is set to succeeded

System (please complete the following information):

  • OS: ubuntu 20.04
  • Python version: 3.8.10
  • Python package manager: pip

Additional context
roslibpy version: 1.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions