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

How do I know if service is completed?

asked 2016-07-01 01:07:42 -0500

Pikachu gravatar image

updated 2016-07-04 00:02:48 -0500

I am running service client method with 1 server and 4 clients. I am running 5 different programs for them. I need to first send data from client1 to server and call for service. After this service is completed, I need to initialise other service with client3 and client4. How do I achieve this? How do I make client3 and client4 call a service after the client2 has finished the service? What I am trying to do is:

  1. Client2 sends data to Server.
  2. Server distributes that data among Client2, Client3 and Client4.
  3. Client2, Client3, Client4 returns back their data to server after processing.
  4. Server then reorganizes all data and returns final result to Client2.

The main problem now is the data which server gets from Client2 in the starting is not transferred to Client3 by service because server keeps separate threads for clients, I guess.

edit retag flag offensive close merge delete

Comments

Step 2 does not automatically work. A server provides a service, but does not distribute data without being called from the outside. Can you either post the relevant sections of your code or, better still, link to a GitHub/whatever repo?

mgruhler gravatar image mgruhler  ( 2016-07-04 02:03:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-07-01 01:13:26 -0500

mgruhler gravatar image

You need to set up some kind of communication between the clients, if I understand correctly what you want to do.

Are your clients all seperate nodes? I guess so. So you could e.g. publish a topic in the server with the state that it is in. And in the clients listen to this topic.

But I'm not quite sure what you actually intend to do with you system.

edit flag offensive delete link more

Comments

Yes, all clients are separate nodes. I have edited the question for better understanding.

Pikachu gravatar image Pikachu  ( 2016-07-04 00:02:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-07-01 01:07:42 -0500

Seen: 244 times

Last updated: Jul 04 '16