Ask Your Question
0

Consume a service from a Master node

asked 2016-10-21 12:17:45 -0500

anonymous user

Anonymous

updated 2016-10-24 13:11:33 -0500

Hello!

I want to consume a service running in a computer from another computer in the same network. Is this possible?

I have set up ROS_MASTER_URI correctly on both, I know its correct since I was able to do the talker/listener example from the tutorials.

If I run roscore and the service from the basic tutorial:

rosrun beginner_tutorials add_two_ints_server.py

and this on the client computer:

rosrun beginner_tutorials add_two_ints_client.py

I get nothing.

Does anybody know what could be wrong?

Thanks in advance.

EDIT: One runs the server and one runs the client, I do not have the server running on both computers.

edit retag flag offensive close merge delete

Comments

You should only need one copy of the server node; why are you running it on both computers?

ahendrix gravatar image ahendrix  ( 2016-10-21 12:57:30 -0500 )edit

Just to clarify: @ahendrix asks why you run add_two_ints_server.py on both your server and your client. You write: "I get nothing", but that makes sense, as the servers will just sit there, waiting for a client to connect, which you don't start.

gvdhoorn gravatar image gvdhoorn  ( 2016-10-22 11:00:56 -0500 )edit

Im sorry, I typed in both the same script, but one of those should be running a client. I edited my post to address this. Thanks.

anonymous userAnonymous ( 2016-10-24 13:10:53 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-24 21:54:01 -0500

alienmon gravatar image

you need to specify the input arguments : the two numbers that you're going to add, when calling the client.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-10-21 12:17:45 -0500

Seen: 53 times

Last updated: Oct 24 '16