How to call a service from outside ROS

asked 2017-03-06 01:54:51 -0600

mutantRobot gravatar image

updated 2017-03-06 02:09:08 -0600

Hello guys,

I was reading the docs and I learnt that ros service client may not be a ros node. Here, ( http://wiki.ros.org/ROS/Technical%20O... ), it said that ' in fact, a service client does not have to be a ROS node'.

I'm using python, and we all know ros service interaction is achieved via xmlrpc, so I'm thinking how code outdide ros can call a service implemented by a specific node. I built a simple example following the tutorial ( http://wiki.ros.org/rospy_tutorials/T... ) and both server & client worked well. However, when I tried in python 2.7.12 using python xmlrpclib ways to call the service (using service provider's url), I always got a '[Errno 111] Connection refused' error.

So does anyone know how to properly do such things? Any help will be appreciated.

edit retag flag offensive close merge delete

Comments

What do you mean by calling a service from outside ROS? Completely removed from ROS, not using rospy or any other ROS resources? Also, I found this answer to a similar question using rosbridge.

jayess gravatar imagejayess ( 2017-03-26 00:30:13 -0600 )edit