ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Call an action from an action

asked 2021-05-18 11:55:20 -0500

Latout92 gravatar image

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 !

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-05-18 19:40:29 -0500

shonigmann gravatar image

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.

edit flag offensive delete link more

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 :/

Latout92 gravatar image Latout92  ( 2021-05-19 05:01:12 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2021-05-18 11:55:20 -0500

Seen: 385 times

Last updated: May 18 '21