How to do a service call from the rce-server to an rce-client?

124 views
Skip to first unread message

Pieterjan van Gastel

unread,
Dec 18, 2013, 8:50:30 AM12/18/13
to rap...@googlegroups.com
Hello,

Is it possible to do a service call from the rce-server to the rce-client?
If so, how do I do this?

Or is it only possible to do service calls from rce-clients?

If the latter is the case, how can I then do a service call from one rce-client to another rce-client via the rce-server?

Best,
Pieterjan van Gastel

Dominique Hunziker

unread,
Dec 18, 2013, 11:05:46 AM12/18/13
to Pieterjan van Gastel, rap...@googlegroups.com
Hi,

Sure you can do all these things. For a service call from the cloud to
the robot just have a look at the example config file and replace
ServiceProvider with ServiceClient and vice versa, i.e. "flip the
connection direction". Assuming then that echo node is running in the
robot you could call the service in the cloud.

As for calling from one robot to another, you have to connect the two
XxxConverter interfaces of the two robots instead of creating a
connection between a XxxConverter and a matching XxxInterface. (This
does not require the creation of a container, etc.)

Where you able to solve the previous problem with the containers?

Dominique

Pieterjan van Gastel

unread,
Dec 18, 2013, 11:27:38 AM12/18/13
to rap...@googlegroups.com
Hi Dominique,

Okay, thanks, I understand that.
But can I call services from a terminal on the server pc? Or do I have to integrate the service calls in ROS packages and rosmake those packages after starting the container environment system with the rce-make command?

No I did not solve my previous problem yet.. I eventually reconfigured my rce server (everything to the default values) and now, when I try to start the rce-client, I get this message: ResourceNotFound: Can not load manifest for ROS package "Test". And even though I get that message, I can see one container when I call "sudo lxc-ls" on the server.

- Pieterjan

Pieterjan van Gastel

unread,
Dec 18, 2013, 12:37:56 PM12/18/13
to rap...@googlegroups.com
Oh right, now I see, I can do ssh to get into the container and then do service calls.

Now I only need to fix the ResourceNotFound problem...

Pieterjan van Gastel

unread,
Dec 18, 2013, 1:07:51 PM12/18/13
to rap...@googlegroups.com
It is solved, it works now. Thanks for your help.

The ros system on the client was configured in a strange way, configuring it differently solved the issue. 

Pieterjan van Gastel

unread,
Dec 20, 2013, 7:05:34 AM12/20/13
to rap...@googlegroups.com
Hey Dominique,

I tried to call one robot from another robot, but I can only start one robot process. On the wiki it says that it is possible to run multiple Robot processes in a single machine. I'm not sure if I understand it correctly now, but I thought I need to run rce-robot for every robot endpoint. But if I do this, for the second time I run rce-robot {master_ip} I get the following output:

2013-12-20 11:53:36+0100 [-] Log opened.
2013-12-20 11:53:36+0100 [-] Starting factory <twisted.spread.pb.PBClientFactory instance at 0xba2290>
2013-12-20 11:53:36+0100 [-] Traceback (most recent call last):
2013-12-20 11:53:36+0100 [-]   File "/usr/local/bin/rce-robot", line 5, in <module>
2013-12-20 11:53:36+0100 [-]     pkg_resources.run_script('rce-core==0.3', 'rce-robot')
2013-12-20 11:53:36+0100 [-]   File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 505, in run_script
2013-12-20 11:53:36+0100 [-]     self.require(requires)[0].run_script(script_name, ns)
2013-12-20 11:53:36+0100 [-]   File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 1245, in run_script
2013-12-20 11:53:36+0100 [-]     execfile(script_filename, namespace, namespace)
2013-12-20 11:53:36+0100 [-]   File "/usr/local/lib/python2.7/dist-packages/rce_core-0.3-py2.7.egg/EGG-INFO/scripts/rce-robot", line 72, in <module>
2013-12-20 11:53:36+0100 [-]     settings.comm_port, settings.packages, settings.converters)
2013-12-20 11:53:36+0100 [-]   File "/usr/local/lib/python2.7/dist-packages/rce_core-0.3-py2.7.egg/rce/robot.py", line 839, in main
2013-12-20 11:53:36+0100 [-]     extPort, loader, converter)
2013-12-20 11:53:36+0100 [-]   File "/usr/local/lib/python2.7/dist-packages/rce_core-0.3-py2.7.egg/rce/robot.py", line 626, in __init__
2013-12-20 11:53:36+0100 [-]     Endpoint.__init__(self, reactor, loader, commPort)
2013-12-20 11:53:36+0100 [-]   File "/usr/local/lib/python2.7/dist-packages/rce_core-0.3-py2.7.egg/rce/slave/endpoint.py", line 73, in __init__
2013-12-20 11:53:36+0100 [-]     reactor.listenTCP(commPort, _RCEInternalServerFactory(self))
2013-12-20 11:53:36+0100 [-]   File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py", line 495, in listenTCP
2013-12-20 11:53:36+0100 [-]     p.startListening()
2013-12-20 11:53:36+0100 [-]   File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 980, in startListening
2013-12-20 11:53:36+0100 [-]     raise CannotListenError(self.interface, self.port, le)
2013-12-20 11:53:36+0100 [-] twisted.internet.error.CannotListenError: Couldn't listen on any:10030: [Errno 98] Address already in use.

However, if I try to run only one rce-robot and then two rce-clients, the second client will complain it cannot connect to a robot endpoint.

How do I solve this?

Best,
Pieterjan

On Wednesday, December 18, 2013 5:05:46 PM UTC+1, Dominique Hunziker wrote:

Pieterjan van Gastel

unread,
Dec 20, 2013, 8:15:53 AM12/20/13
to rap...@googlegroups.com
Nevermind, I get it now. Only one rce-robot needs to be started for all robot end points.

I can start multiple rce-clients now. I forgot to do something in the configuration files I see.

Yung Lam

unread,
Jan 16, 2014, 12:25:00 PM1/16/14
to rap...@googlegroups.com
Only one rce-robot needs to be started for all robot end points.
That mean with many new machine, rce-robot only need to be started for 1 time at master or any one of the machine?

Pieterjan van Gastel於 2013年12月20日星期五UTC+8下午9時15分53秒寫道:

Dominique Hunziker

unread,
Jan 16, 2014, 12:51:20 PM1/16/14
to Yung Lam, rap...@googlegroups.com
At the moment the ports configuration for 'rce-robot' (as well as for the others processes) is loaded from the config file ('~/.rce/config.ini'), which is why there can be only one 'rce-robot' process per machine.

The idea, however, is to have many 'rce-robot' processes to distribute the load (ie cpu). Also because the current implementation does not use threads to take advantage of today's multi-core systems. Also if you don't use the rce-ros client but for example a javascript client the received JSON formatted messages have to be converted into a ROS message, which also uses some processing.

In contrast, the 'rce-container' process can not be run more than once in a machine, because there can only one process be responsible for the container management.

Dominique

Ryan Li

unread,
Jun 17, 2014, 5:09:52 AM6/17/14
to rap...@googlegroups.com
Hi

Can you tell me how to fix that ResourceNotFound: Can not load manifest for ROS package "Test" problem? I met the same error.

Thanks.

Ryan

在 2013年12月19日星期四UTC+8上午2时07分51秒,Pieterjan van Gastel写道:
Reply all
Reply to author
Forward
0 new messages