Problem while running barcode tutorial

179 views
Skip to first unread message

Nishant Kejriwal

unread,
Jan 7, 2014, 6:00:07 AM1/7/14
to rap...@googlegroups.com
Hello everyone,

I have installed rapyuta successfully according to instructions given on homepage.
Now i am  trying to run Barcode tutorial , but when i do
# sudo rce-make

it gives following error:

sudo: unable to resolve host nishant
Traceback (most recent call last):
  File "/usr/local/bin/rce-setup-rcemake", line 5, in <module>
    pkg_resources.run_script('rce-core==0.3', 'rce-setup-rcemake')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/rce_core-0.3-py2.7.egg/EGG-INFO/scripts/rce-setup-rcemake", line 47, in <module>
    settings = getSettings()
  File "/usr/local/lib/python2.7/dist-packages/rce_core-0.3-py2.7.egg/rce/util/settings.py", line 84, in getSettings
    _settings = _getSettings(checks)
  File "/usr/local/lib/python2.7/dist-packages/rce_core-0.3-py2.7.egg/rce/util/settings.py", line 102, in _getSettings
    parser = _RCESettingsParser()
  File "/usr/local/lib/python2.7/dist-packages/rce_core-0.3-py2.7.egg/rce/util/settings.py", line 495, in __init__
    self._get_iface_list()
  File "/usr/local/lib/python2.7/dist-packages/rce_core-0.3-py2.7.egg/rce/util/settings.py", line 499, in _get_iface_list
    with open('/proc/net/dev') as net_devices:
IOError: [Errno 2] No such file or directory: '/proc/net/dev'
Could not setup the rce environment.

Kindly reply.

Dominique Hunziker

unread,
Jan 7, 2014, 10:04:52 AM1/7/14
to Nishant Kejriwal, rap...@googlegroups.com
Hi,

Well it seems, based on your traceback, that the file '/proc/net/dev' is
not accessible / does not exist. Can you confirm that you are able to
locate and read the file, which would make this a problem with Rapyuta?
Otherwise this is a system problem... What kind of system are you using
to test Rapyuta (kernel, linux distribution)?

Dominique

Nishant Kejriwal

unread,
Jan 8, 2014, 2:06:24 AM1/8/14
to rap...@googlegroups.com, Nishant Kejriwal

Hello Dominique,

Thanks for the reply.

I am currently using ubuntu 12.04 , linux-version := 3.2.0-32-generic #51-Ubuntu SMP and ros-fuerte.
Also this folder "/proc/bet/dev" exist in my system.

See , i am able to install rapyuta successfully on my server machine and client machine both. At the end i
am able to get string on client side using server machine as cloud.

Now , in case of barcode tutorial i have downloaded barcode_cloud package on server and barcod_client on client machine.

Then i did,

$ sudo chroot /opt/rce/container/rootfs

and it changes the root directory. After this i type

root@nishant:/# sudo rce-make

and it shows the above error.

Is it problem with "sudo: unable to resolve host nishant"?
or something is missing. Kindly help.

Thanks in advance.
Nishant

Dominique Hunziker

unread,
Jan 8, 2014, 3:19:23 AM1/8/14
to Nishant Kejriwal, rap...@googlegroups.com
Ah, you don't have to run
$ sudo chroot ...

$ sudo rce-make
will do this for you.

FYI: In your case rce-make tries to open the file /opt/rce/container/rootfs/proc/net/dev which most probably does not exist. Because first have to mount --bind the proc directory in the container filesystem (and other directories as well; this is what rce-make does for you automatically)

Nishant Kejriwal

unread,
Jan 8, 2014, 5:32:31 AM1/8/14
to rap...@googlegroups.com, Nishant Kejriwal
Yeah thanks for the help. I can build barcode_client now in rce-container.

Now when i use same machine as cloud and client both , i am able to run everything successfully but when it comes to testing the extractor
neither it gives any output nor it shows any error.

$python barcode_client/scripts/servicescanner.py barcode_client/images/image01.jpg


Other running processes do not show any error message.
I am attaching a file which shows the outputs in different processes terminals.

Kindly help.

Thanks in advance.

Nishant
outputs.txt

Dominique Hunziker

unread,
Jan 8, 2014, 6:03:35 AM1/8/14
to Nishant Kejriwal, rap...@googlegroups.com
The problem is that the container is not started properly, rsp. the environment endpoint in the container.
Otherwise, the rce-master should have a line in the output of the form
> Connection to Environment process established.
Additionally, because Rapyuta can not create the requested connection between the robot and environment endpoint, the robot endpoint never informs the rce-ros client, that the interface is available, which would result in the creation of ROS interfaces and e.g. outputs of the form
> Local ROS Subscriber on topic '...' is up.
or
> Local ROS Service on address '...' is up.
for the rce-ros client.

Can you check that the container is running (use sudo lxc-ls)? Furthermore, you can check the log file for the environment endpoint in "/opt/rce/container/data/Cxxx/rce/env.log" (select the appropriate container number...)

Nishant Kejriwal

unread,
Jan 8, 2014, 6:19:29 AM1/8/14
to Dominique Hunziker, rap...@googlegroups.com
hi dominique,

As per your last reply, i tried

$ sudo lxc-ls

there is no output and also there is no log file generated for the container(C100).
Note: C100 is the only container created in the system.

Thanks
Nishant

Dominique Hunziker

unread,
Jan 8, 2014, 8:34:25 AM1/8/14
to Nishant Kejriwal, rap...@googlegroups.com
Are you able to start and use a default lxc container?
checkout http://linuxcontainers.org/ for an example on how to.

Nishant Kejriwal

unread,
Jan 9, 2014, 1:42:16 AM1/9/14
to rap...@googlegroups.com, Nishant Kejriwal
Hey dominique,

Thanks. It was just matter of restarting my machine and everything worked fine.
Now i can successfully run barcode tutorial on the same machine(both cloud and client).
But when i am running client on different machine , it gives some error on client side.
I have configured ip in the barcode_client configuration file to the ip of server machine.
On rce-master terminal , it says "Connection to Environment process established" but with some errors.
And on client side , all connections are established but it gives error as
"ResourceNotFound: Can not load manifest for ROS package "barcode_cloud"."

I am attaching a file for outputs of terminal from client and server side both.
Please help.

Thanks
Nishant

Mayank Singh

unread,
Jan 9, 2014, 1:45:56 AM1/9/14
to Nishant Kejriwal, rapyuta
Hi Nishant,

In the barcode.cfg of barcode_client, change the iCls of node with eTag testRobot and iTag ScannerService to "barcode_client/Scanner" instead of "barcode_cloud/Scanner".

Regards,
Mayank

Nishant Kejriwal

unread,
Jan 9, 2014, 1:47:09 AM1/9/14
to rap...@googlegroups.com, Nishant Kejriwal
I forgot to attached files with last post.
Please look into it.

Thanks
Nishant
serveroutputs.txt
clientoutput.txt

Nishant Kejriwal

unread,
Jan 9, 2014, 2:17:12 AM1/9/14
to rap...@googlegroups.com, Nishant Kejriwal
Hey mayank,

Thanks for the reply.

I made the changes in the barcode.cfg file. But now on client side, it gives different error:

Service Client to RCE Interface 'ScannerService' is up.
Publisher to RCE Interface 'ScannerReq' is up.
Subscriber to RCE Interface 'ScannerResp' is up.
Received ERROR message: Can not connect two interfaces with different message/service type.
Local ROS Subscriber on topic 'barcodeRequest' is up.
Local ROS Publisher on topic 'barcodeResponse' is up.

Kindly help.

Thanks
Nishant

Mayank Singh

unread,
Jan 9, 2014, 3:18:48 AM1/9/14
to Nishant Kejriwal, rapyuta
Hi Nishant,
You could try a few things but first undo the change I suggested earlier. 
All of this is on the host side. Not under rce-make.
1.  rosmake barcode_cloud once on the host system as well and then try the tutorial.
2. Or you could try renaming barcode_client to barcode_cloud and rosmake on the host system just like you do in the tutorial.
The two are exclusive. You don't have to try them together. See if any of them work.

Mayank

Mayank Singh

unread,
Jan 9, 2014, 3:38:57 AM1/9/14
to Nishant Kejriwal, rapyuta
Hi Nishant,

I don't think the 2nd point will work as there are other dependencies to the name 'barcode_client' in the code. Just try the first. 

Mayank

Nishant Kejriwal

unread,
Jan 9, 2014, 4:03:44 AM1/9/14
to rap...@googlegroups.com, Nishant Kejriwal
Hey mayank,

Thanks for the reply. It works fine. Now i am able to run tutorial on different(one cloud and other client) machine also.
But i am not able to understand why do i need to compile barcode_cloud package on client side?

Thanks
Nishant

Dominique Hunziker

unread,
Jan 9, 2014, 4:09:20 AM1/9/14
to rap...@googlegroups.com
The problem is that originally the ROS packages where the same, but we wanted to split the package into separate cloud/client packages. The problem then was that both packages define the same services/messages and ROS needs to use the same message/service definition, i.e., they use the same package (barcode_cloud) on both sides. -> Which is why you need to compile the package on both sides...

I'm currently fixing this issue.

Mayank Singh

unread,
Jan 9, 2014, 4:16:05 AM1/9/14
to Nishant Kejriwal, rapyuta
Hi Nishant,

Dominique's already explained it but my two cents as well since I already typed it. 
The barcode_client and barcode_cloud packages contain different scripts, services and messages. However, they both have a few same services and messages. When you connect two interfaces together, their types should be the same. Even though barcode_client/Scanner.srv and barcode_cloud/Scanner.srv have the same contents they aren't counted as the same because their paths/names are different. So, you need that barcode_cloud/Scanner.srv accessible on both sides which necessitates barcode_cloud's rosmake on the host side as well.
I hope that clears it up.
Regards,
Mayank

Nishant Kejriwal

unread,
Jan 9, 2014, 4:43:54 AM1/9/14
to Mayank Singh, rap...@googlegroups.com
Thanks Dominique and mayank. i got it now. :)

Nishant
Reply all
Reply to author
Forward
0 new messages