Closed PeterBowman closed 5 years ago
sudo
sometimes grabs different environmental variables. From here we see the one that really matters is setting YARP_CONF
.
PS: Docker??? (that could also affect #2)
Same error today, I didn't have to use --ip
.
What is the output of sudo yarp where
?
Can't tell now, but I recall that plain yarp where
gave the expected output (remote nameserver).
Yes, that's why I'm concerned about the output using sudo
.
Ideas for testing:
sudo su
so env variables are shared and yarp conf is in /root
chmod /dev/mem/something
to avoid need of sudo. I guess an udev rule could be set up. However, seems dangerous. Anyway, once we get back to the script to which I pointed above (via daemontools) there will be no need for sudo.
PS: Sorry, cold fingers closed the issue, reopened. : )
$ yarp where
Looking for name server on 222.1.1.92, port number 10000
If there is a long delay, try:
yarp conf --clean
Name server /root is available at ip 222.1.1.92 port 10000
$ sudo yarp where
Looking for name server on 222.1.1.26, port number 10000
If there is a long delay, try:
yarp conf --clean
=======================================================================
==
== PROBLEM
== No valid YARP name server is available.
== Here is the expected configuration:
== host: 222.1.1.26 port number: 10000
== namespace: /root
== type of name server: yarp
== But such a name server was not found.
[...]
You were right:
$ yarp conf
/home/pi/.config/yarp/yarp.conf
$ sudo yarp conf
/root/.config/yarp/yarp.conf
Oh, yes! We had to do something similar for TEO here: https://github.com/roboticslab-uc3m/teo-developer-manual/commit/2b79bde7890d48f7daf68437b62caa83b89961c3
From freshly recompiled CMake 3.5.2, YARP 2.3.72.1 w/ opencv_grabber and asrob-uc3m/yarp-devices:
YARP network is available and I can launch test_grabber, for instance. Looks like this error originates upstream, not in our own code. Any ideas?
PS I had to start YARP's name server on my PC with
yarpserver --ip 222.1.1.92 --write
since Docker's networking was being picked as the first option (both were apparently reported as available, butyarp name list
was showing the Docker one, only).