Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to launch motor controller #3

Closed
PeterBowman opened this issue Nov 7, 2018 · 12 comments
Closed

Unable to launch motor controller #3

PeterBowman opened this issue Nov 7, 2018 · 12 comments
Assignees

Comments

@PeterBowman
Copy link
Member

From freshly recompiled CMake 3.5.2, YARP 2.3.72.1 w/ opencv_grabber and asrob-uc3m/yarp-devices:

pi@raspberrypi ~ $ sudo yarpdev --from /usr/local/share/robotDevastation-robots/contexts/launch/launchRobot.ini
[ERROR]YARP network not available, check if yarp server is reachable

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, but yarp name list was showing the Docker one, only).

@jgvictores jgvictores mentioned this issue Nov 7, 2018
4 tasks
@jgvictores
Copy link
Member

sudo sometimes grabs different environmental variables. From here we see the one that really matters is setting YARP_CONF.

@jgvictores
Copy link
Member

PS: Docker??? (that could also affect #2)

@PeterBowman
Copy link
Member Author

Same error today, I didn't have to use --ip.

@jgvictores
Copy link
Member

What is the output of sudo yarp where?

@PeterBowman
Copy link
Member Author

Can't tell now, but I recall that plain yarp where gave the expected output (remote nameserver).

@jgvictores
Copy link
Member

Yes, that's why I'm concerned about the output using sudo.

@jgvictores
Copy link
Member

jgvictores commented Nov 17, 2018

Ideas for testing:

  1. All yarp detect etc in a sudo su so env variables are shared and yarp conf is in /root
  2. There was a way to 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.

@jgvictores
Copy link
Member

jgvictores commented Nov 17, 2018

PS: Sorry, cold fingers closed the issue, reopened. : )

@jgvictores
Copy link
Member

@PeterBowman
Copy link
Member Author

$ 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

@PeterBowman
Copy link
Member Author

It worked after I replaced YARP_CONF with YARP_CONFIG_HOME here (ref). Same for the camera device.

@jgvictores any compelling reason for not marking that as the final solution?

@jgvictores
Copy link
Member

Oh, yes! We had to do something similar for TEO here: roboticslab-uc3m/teo-developer-manual@2b79bde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants