Note: This tutorial assumes that you have completed the previous tutorials: writing a simple action client.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Running an Action Client and Server

Description: This tutorial covers running the Fibonacci server and client then visualizing the channel output and node graph.

Tutorial Level: BEGINNER

Next Tutorial: Send a Goal to Action Server without Action Client

  Show EOL distros: 

Viewing the Action Feedback

First, same as previous tutorials, run the Action server (C++ | Python) and client (C++ | Python), along with roscore.

In a new terminal, rostopic the feedback channel to see the feedback from the action server:

$ rostopic echo /fibonacci/feedback

While the server is acting on the goal you will see something similar to:

  • ---
    header: 
      seq: 1
      stamp: 1250813676611629000
      frame_id: 
    status: 
      goal_id: 
        stamp: 1250813676611339000
        id: 1250813676611339000
      status: 1
      text: 
    feedback: 
      sequence: (0, 1, 1)
    ---
    header: 
      seq: 2
      stamp: 1250813677611559000
      frame_id: 
    status: 
      goal_id: 
        stamp: 1250813676611339000
        id: 1250813676611339000
      status: 1
      text: 
    feedback: 
      sequence: (0, 1, 1, 2)
    ---
    header: 
      seq: 3
      stamp: 1250813678611635000
      frame_id: 
    status: 
      goal_id: 
        stamp: 1250813676611339000
        id: 1250813676611339000
      status: 1
      text: 
    feedback: 
      sequence: (0, 1, 1, 2, 3)
    ---

Viewing the Action Result

In a new terminal, rostopic the feedback channel to see the feedback from the action server:

$ rostopic echo /fibonacci/result

After the goal is completed you will see something similar to:

  • ---
    header: 
      seq: 1
      stamp: 1250813759950015000
      frame_id: 
    status: 
      goal_id: 
        stamp: 1250813739949752000
        id: 1250813739949752000
      status: 3
      text: 
    result: 
      sequence: (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946)

Viewing the Action Node Graph

Alternatively you can look at the nodes while the server and client are running:

$ rxgraph

$ rxgraph

rqt_graph

fibonacci_client_server.png

Starting the Client and Server

Start the action server:

$ rosrun actionlib_tutorials fibonacci_server

When the action has completed it will print out an info message of succeeded.

  • [ INFO] 1251489514.736936000: /fibonacci: Succeeded

And then run the action client:

$ rosrun actionlib_tutorials fibonacci_client

When the client receives notification of the completion of the goal it will also print out an info message with the result of the action:

  • [ INFO] 1251489514.737339000: Action finished: SUCCEEDED

Wiki: actionlib_tutorials/Tutorials/RunningServerAndClient (last edited 2023-03-08 08:43:10 by Hirotaka Yamada)