How do I register the rce-client on one pc with the master node on another pc?

190 views
Skip to first unread message

Pieterjan van Gastel

unread,
Dec 9, 2013, 7:47:43 AM12/9/13
to rap...@googlegroups.com, R.J.M....@tue.nl, P.J.G.v...@tue.nl
Hello Rapyuta people,

I have installed the RCE on two computers. They are connected over a network and I can ping both of them. So I do not see a problem there.

On the "server"-pc I installed as followed: autoprovision mode: y, Container filesystem directory: /opt/rce/container, External communication interface: 131.155.103.107, internal communication interface: 127.0.0.1, internal container communication interface: 127.0.0.1.

On the "client"-pc I installed everything as default.


The connection details of the server:

IP: 131.155.103.107

Hostname: cst82.wtb.tue.nl

Inet addr: 131.155.103.107  Bcast: 131.155.103.255  Mask: 255.255.254.0


The connection details of the client:

IP: 131.155.65.84

Hostname: dyn-065084.nbw.tue.nl

Inet addr: 192.168.2.82  Bcast: 192.168.2.255  Mask: 255.255.255.0


On the client, in file /home/gostai/rce/test/debug.cfg, I set the “url” to “http://131.155.103.107:9010/”.


Now I want to run the simple test by using one computer as client and the other as server.

I start up the server with "rce-master", "rce-robot 131.155.103.107", and "sudo rce-container localhost".

And on the client I do "roscore" and "rce-ros /home/gostai/rce/test/debug.cfg", but then I get the following message:

Unable to register with master node [http://pico:11311]: master may not be running yet. Will keep trying.


Also if I do "rosservice list", I get the following message:

ERROR: Unable to communicate with master!


I also tried to run rce-robot 131.155.65.84 instead of rce-robot 131.155.103.107 (I was thinking I might have misunderstood what IP to fill in for the robot endpoint), but that did not fix anything either.


I am thinking that the address of the master node should not be http://pico:11311, is that correct? If so, I have no clue how to change this. Can someone help me with this?

Can someone tell me what I am doing wrong here? Am I missing something? Thanks in advance.


Best,

Pieterjan van Gastel

Pieterjan van Gastel

unread,
Dec 9, 2013, 8:00:07 AM12/9/13
to rap...@googlegroups.com
Also, I just forgot to mention, and I'm not really sure it is that important, but I am doing port forwarding on the client computer.

- Pieterjan

Pieterjan van Gastel

unread,
Dec 9, 2013, 8:50:17 AM12/9/13
to rap...@googlegroups.com
I also tried another computer as client now, to see if that works (but eventually I want to get it to work on the first client).

The connection details of this client:

IP: 131.155.65.84

Hostname: dyn-065084.nbw.tue.nl

Inet addr: 192.168.2.142  Bcast: 192.168.2.255  Mask: 255.255.255.0


Calling "rce-ros ~/rce/test/debug.cfg" gives the following output:

Connect to Master Process on: http://131.155.103.107:9010/

No JSON object could be decoded


When I then interrupt the process (with Ctrl+C) it prints the following:

^CRequest removal of parameter 'str' from container 'cTag_01'.

Unhandled error in Deferred:

Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 524, in __bootstrap
    self.__bootstrap_inner()
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/python/threadpool.py", line 191, in _worker
    result = context.call(ctx, function, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.2.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
  File "/usr/local/lib/python2.7/dist-packages/rce_comm-0.3-py2.7.egg/rce/comm/client.py", line 266, in _getRobotURL
    return json.loads(f.read())
  File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
exceptions.ValueError: No JSON object could be decoded

And calling "rosservice list" on the client gives the following:
/RCE_ROS_Client_4096_1386594938204/get_loggers
/RCE_ROS_Client_4096_1386594938204/set_logger_level
/rosout/get_loggers
/rosout/set_logger_level

This seems to be an entirely different problem now.
Can anyone help me with this?

Best,
Pieterjan


Dominique Hunziker

unread,
Dec 9, 2013, 9:08:06 AM12/9/13
to rap...@googlegroups.com
On 09.12.2013 13:47, Pieterjan van Gastel wrote:
Hello Rapyuta people,

I have installed the RCE on two computers. They are connected over a network and I can ping both of them. So I do not see a problem there.

On the "server"-pc I installed as followed: autoprovision mode: y, Container filesystem directory: /opt/rce/container, External communication interface: 131.155.103.107, internal communication interface: 127.0.0.1, internal container communication interface: 127.0.0.1.

On the "client"-pc I installed everything as default.


The connection details of the server:

IP: 131.155.103.107

Hostname: cst82.wtb.tue.nl

Inet addr: 131.155.103.107  Bcast: 131.155.103.255  Mask: 255.255.254.0


The connection details of the client:

IP: 131.155.65.84

Hostname: dyn-065084.nbw.tue.nl

Inet addr: 192.168.2.82  Bcast: 192.168.2.255  Mask: 255.255.255.0


On the client, in file /home/gostai/rce/test/debug.cfg, I set the “url” to “http://131.155.103.107:9010/”.


Now I want to run the simple test by using one computer as client and the other as server.

I start up the server with "rce-master", "rce-robot 131.155.103.107", and "sudo rce-container localhost".

And on the client I do "roscore" and "rce-ros /home/gostai/rce/test/debug.cfg", but then I get the following message:

Unable to register with master node [http://pico:11311]: master may not be running yet. Will keep trying.


Also if I do "rosservice list", I get the following message:

ERROR: Unable to communicate with master!

This is a ROS error. Did you check whether the address [http://pico:11311] can be resolved, i.e. can you ping pico? Otherwise the ROS master was not started properly.


I also tried to run rce-robot 131.155.65.84 instead of rce-robot 131.155.103.107 (I was thinking I might have misunderstood what IP to fill in for the robot endpoint), but that did not fix anything either.

No, this would be wrong. As the help/documentation states the IP address of the master (i.e. rce-master) needs to be passed along.


I am thinking that the address of the master node should not be http://pico:11311, is that correct? If so, I have no clue how to change this. Can someone help me with this?
Yes, this would be my guess as well. But as already mentioned this is a ROS problem and has nothing to do with Rapyuta. To change the address used to locate the master you can use ROS_MASTER_URI or ROS_HOSTNAME, ROS_IP; for further info checkout http://wiki.ros.org/ROS/EnvironmentVariables



Can someone tell me what I am doing wrong here? Am I missing something? Thanks in advance.


Best,

Pieterjan van Gastel


Dominique

Pieterjan van Gastel

unread,
Dec 9, 2013, 10:05:54 AM12/9/13
to rap...@googlegroups.com
Hello Dominique,

Thanks, I got the right value for the ROS_MASTER_URI-variable now and I can connect to the Master Process.

But now I get the following message when calling "rce-ros ~/rce/test/debug.cfg":

Connect to Master Process on: http://131.155.103.107:9010/

No JSON object could be decoded


And when I then interrupt the process (with Ctrl+C) it prints the following:


I am not sure if this is a ROS or a Rapyuta problem. Anyway, do you know what is going wrong here?
The error "No JSON object could be decoded" is very general I think, and it is not very clear (to me) what the problem is.

Pieterjan

Dominique Hunziker

unread,
Dec 9, 2013, 10:19:38 AM12/9/13
to rap...@googlegroups.com
It seems to me as if the connection could not be made.

Can you run the following GET request in a browser and check whether you get back JSON object:
http://131.155.103.107:9010/?userID=testUser&version=20130902

Dominique Hunziker

unread,
Dec 9, 2013, 10:25:25 AM12/9/13
to rap...@googlegroups.com, pjvg...@gmail.com
Also, did you change the default configuration? The port should by default is 9000 and not 9010 for the master process. (9010 is used for the robot process); therefore also test the http request with port 9000 if you didn't change the port settings.

Pieterjan van Gastel

unread,
Dec 9, 2013, 10:47:40 AM12/9/13
to rap...@googlegroups.com
Thanks.

It seems that I had the port wrong. I need port 9000 not 9010..

I get back a JSON object when I run http://131.155.103.107:9000/?userID=testUser&version=20130902 in a browser.

Running rce-ros now shows no warnings or errors, and at the end (after a number of requests) prints:
Service Client to RCE Interface 'stringEchoService' is up.
Publisher to RCE Interface 'stringEchoReq' is up.
Subscriber to RCE Interface 'stringEchoResp' is up.
Service Client to RCE Interface 'parameterTest' is up.

However, I cannot do a ROS service call to the stringEchoService, the service also does not show up when I call "rosservice list".

Dominique Hunziker

unread,
Dec 9, 2013, 11:11:47 AM12/9/13
to Pieterjan van Gastel, rap...@googlegroups.com
Do you get the following log output:
Local ROS Service on address 'stringEchoService' is up.
Local ROS Subscriber on topic 'stringEchoReq' is up.
Local ROS Publisher on topic 'stringEchoResp' is up.
Local ROS Service on address 'parameterTest' is up.

or just the four lines you copied? Also are the container(s) created on the server side and does the master report that connection(s) have been made to the environment processes, e.g.:
2013-12-09 17:07:23+0100 [Broker,client] Start container 'C100'
2013-12-09 17:07:23+0100 [Broker,client] Start container 'C101'
2013-12-09 17:07:23+0100 [Broker,client] Start container 'C102'
2013-12-09 17:07:24+0100 [Broker,2,10.0.3.101] Connection to Environment process established.
2013-12-09 17:07:24+0100 [Broker,3,10.0.3.102] Connection to Environment process established.
2013-12-09 17:07:24+0100 [Broker,4,10.0.3.100] Connection to Environment process established.

Pieterjan van Gastel

unread,
Dec 9, 2013, 11:22:22 AM12/9/13
to rap...@googlegroups.com, Pieterjan van Gastel
No I don't get those Local ROS etc., I only see the four I copied.

The containers are created, but the master does not report that connections are made to the environment processes.
The master prints the following:
2013-12-09 17:20:05+0100 [Broker,3,131.155.103.107] 131.155.65.84 - - [09/Dec/2013:16:20:04 +0000] "GET /?userID=testUser&version=20130902 HTTP/1.1" 200 37 "-" "Python-urllib/2.7"

And this is what I get from the robot endpoint:
2013-12-09 17:20:05+0100 [RobotWebSocketProtocol,15,131.155.65.84] Starting factory <twisted.spread.pb.PBClientFactory instance at 0x328a050>

Dominique Hunziker

unread,
Dec 9, 2013, 11:30:30 AM12/9/13
to Pieterjan van Gastel, rap...@googlegroups.com
Do you get the output of the form "2013-12-09 17:07:23+0100 [Broker,client] Start container 'C1xx'" for the container process? What is the output of "sudo lxc-ls" on the server machine; are the containers listed?

The client does request the creation of containers, right?

Pieterjan van Gastel

unread,
Dec 10, 2013, 4:19:26 AM12/10/13
to rap...@googlegroups.com
Yes, the client requests the creation of three containers: 'cTag_01', 'group_01', and 'group_02'. 

The rce-container process prints that output with the "Start container 'C1xx'" for three containers (C100, C101, and C102).

The output of "sudo lxc-ls" is however nothing. No output, no containers listed...

Nishant Kejriwal

unread,
Jan 8, 2014, 7:00:46 AM1/8/14
to rap...@googlegroups.com
Hello pieterjan

I have successfully installed rapyuta and able to communicate on different client and server(cloud) machines.
But while trying barcode tutorial ,I have also stuck to similar kind of problem where no containers are listed,
 but clients has requested the creation of containers.
Also "sudo lxc-ls" does not output anything.
As i can see this thread corresponds to similar problem, can you please help me in this issue?

Thanks in advance.

Nishant
Reply all
Reply to author
Forward
0 new messages