Robotics StackExchange | Archived questions

Call an action from an action

Hello,

Is it possible to call an action from an action ?

I want to send from an action the position of a goal and use /navigatetopose (Nav2) directly from my action code (by not using ros2 action send_goal ...).

Than you guys I'm a begginer in ROS2 !

Asked by Latout92 on 2021-05-18 11:55:20 UTC

Comments

Answers

I don't know of any reason why it wouldn't be possible - you could setup your custom action server to create an action client instance in its callback function, and use that action client to send a goal to the nav2 server. You could presumably also pass the feedback from the nav2 /navigatetopose action server back to your own client so that it doesn't get lost in the process. Read through the ros2 actions tutorial carefully, and feel free to update this question if you run into issues on the implementation.

Asked by shonigmann on 2021-05-18 19:40:29 UTC

Comments

First, Thank you for your answer.

Do you know how I can send a goal to the nav2 server from my custom action ? Or any tips/clue ? I see nothing on the web :/

Asked by Latout92 on 2021-05-19 05:01:12 UTC