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

Action client examples not working with CycloneDDS #257

Closed
hidmic opened this issue Nov 18, 2019 · 11 comments
Closed

Action client examples not working with CycloneDDS #257

hidmic opened this issue Nov 18, 2019 · 11 comments
Labels
bug Something isn't working more-information-needed Further information is required

Comments

@hidmic
Copy link
Contributor

hidmic commented Nov 18, 2019

Bug report

Required Info:

  • Operating System:
    • Ubuntu 18.04, both AMD64 and ARM64
  • Installation type:
    • Binaries and from source
  • Version or commit hash:
  • DDS implementation:
    • CycloneDDS
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

  1. On one terminal, run:
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run examples_rclcpp_minimal_action_server action_server_not_composable
  1. On another terminal, run:
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run examples_rclcpp_minimal_action_client action_client_not_composable

Expected behavior

Action client sends goal to the action server, receives feedback and result, and finally self terminates.

Actual behavior

Action client hangs right after sending the goal.

Additional information

Action clients seem to be blocking forever at rclcpp::spin_until_future_complete().

@hidmic hidmic added the bug Something isn't working label Nov 18, 2019
@dirk-thomas
Copy link
Member

It works for me using the current Debian packages from the testing repo.

@dirk-thomas dirk-thomas added the more-information-needed Further information is required label Nov 18, 2019
@hidmic
Copy link
Contributor Author

hidmic commented Nov 19, 2019

Hmm, I just built everything from source, from scratch, and action client examples still hang. Maybe someone else can disambiguate?

@jacobperron
Copy link
Member

jacobperron commented Nov 27, 2019

I can reproduce with a from-source build, but it works fine using the Eloquent debs (ie all executables running from binaries).

@hidmic
Copy link
Contributor Author

hidmic commented Nov 27, 2019

Hmm could the difference be due to CMAKE_BUILD_TYPE=None vs. CMAKE_BUILD_TYPE=Release?

@dirk-thomas
Copy link
Member

I used CMAKE_BUILD_TYPE=Debug.

@wjwwood
Copy link
Member

wjwwood commented Dec 12, 2019

Maybe related to ros2/rmw_cyclonedds#74

@jrgnicho
Copy link

I'm having a similar issue, however I'm calling future.wait_for(timeout); from the client after sending the asynchronous goal and it times out even though my server does call the goal_handle->succeed(...) function long before the timeout elapses.

@jrgnicho
Copy link

It looks like in order to prevent the action client (and server) from hanging it's necessary to spawn a multithreaded executor and as many callback groups as there are clients or servers as shown in the multithreaed executor example

@sloretz
Copy link
Contributor

sloretz commented Dec 23, 2020

I can't reproduce on master having built with CMAKE_BUILD_TYPE=Debug

$  RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run examples_rclcpp_minimal_action_server action_server_not_composable
1608681598.423987 [0] action_ser: using network interface enp3s0 (udp/192.168.1.150) selected arbitrarily from: enp3s0, docker0
[INFO] [1608681606.864051515] [server]: Got goal request with order 10
[INFO] [1608681606.864578896] [server]: Executing goal
[INFO] [1608681606.864728112] [server]: Publish Feedback
[INFO] [1608681607.865073088] [server]: Publish Feedback
[INFO] [1608681608.865039250] [server]: Publish Feedback
[INFO] [1608681609.865129641] [server]: Publish Feedback
[INFO] [1608681610.865143539] [server]: Publish Feedback
[INFO] [1608681611.865057456] [server]: Publish Feedback
[INFO] [1608681612.865084460] [server]: Publish Feedback
[INFO] [1608681613.864887598] [server]: Publish Feedback
[INFO] [1608681614.864928344] [server]: Publish Feedback
[INFO] [1608681615.865677314] [server]: Goal Succeeded
$ RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run examples_rclcpp_minimal_action_client action_client_not_composable
1608681606.846930 [0] action_cli: using network interface enp3s0 (udp/192.168.1.150) selected arbitrarily from: enp3s0, docker0
[INFO] [1608681606.863703627] [minimal_action_client]: Sending goal
[INFO] [1608681606.865485261] [minimal_action_client]: Waiting for result
[INFO] [1608681615.866202732] [minimal_action_client]: result received
[INFO] [1608681615.866384170] [minimal_action_client]: 0
[INFO] [1608681615.866477418] [minimal_action_client]: 1
[INFO] [1608681615.866550782] [minimal_action_client]: 1
[INFO] [1608681615.866675816] [minimal_action_client]: 2
[INFO] [1608681615.866756165] [minimal_action_client]: 3
[INFO] [1608681615.866825524] [minimal_action_client]: 5
[INFO] [1608681615.866893118] [minimal_action_client]: 8
[INFO] [1608681615.866962232] [minimal_action_client]: 13
[INFO] [1608681615.867030766] [minimal_action_client]: 21
[INFO] [1608681615.867098315] [minimal_action_client]: 34
[INFO] [1608681615.867165039] [minimal_action_client]: 55

@clalancette
Copy link
Contributor

I also can't reproduce on the latest (though I don't have a Debug build handy).

@hidmic Can you confirm @sloretz 's findings on the latest, and close this out if appropriate?

@hidmic
Copy link
Contributor Author

hidmic commented Feb 12, 2021

Indeed. It works now. Thanks and sorry for the delay!

@hidmic hidmic closed this as completed Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working more-information-needed Further information is required
Projects
None yet
Development

No branches or pull requests

7 participants