Robots Egoldtech

robots it tech and more

ROS/Tutorials/ExaminingServiceClient – ROS Wiki —

Examining the Simple Service and Client

Description: This tutorial examines running the simple service and client.

Tutorial Level: BEGINNER

Next Tutorial: Recording and playing back data


Running the Service

Running the Client

Further examples on Service and Client nodes

Running the Service

Let’s start by running the service:

$ rosrun beginner_tutorials add_two_ints_server (C++)

$ rosrun beginner_tutorials (Python)

You should see something similar to:

Ready to add two ints.

Running the Client

Now let’s run the client with the necessary arguments:

$ rosrun beginner_tutorials add_two_ints_client 1 3 (C++)

$ rosrun beginner_tutorials 1 3 (Python)

You should see something similar to:

Requesting 1+3

1 + 3 = 4

Now that you’ve successfully run your first server and client, let’s learn how to record and play back data.

Further examples on Service and Client nodes

If you want to investigate further and get a hands-on example, you can get one here. A simple Client and Service combination shows the use of custom message types. The Service node is written in C++ while the Client is available in C++, Python and LISP.

via ROS/Tutorials/ExaminingServiceClient – ROS Wiki.

Categorised as: ROS | Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *