NRP fresh install on new laptop


#1

Hello,

I’m trying to install the NRP on my new laptop (ubuntu 16.04), so fresh install. I’m meeting a problem when updating the nrp (step 15 “Install NRP”, point 2., line 15: “./update_nrp build”).

The problem comes after hbp-nrp-backend has been succesfully installed. Then it tries to create /lib/python2.7 with mkdir, but the permission is denied. So it makes an error and stops.

I tried to run “. $HBP/user-scripts/update_nrp build” instead of “./update_nrp build”, but then the update runs as before, and suddenly the terminal closes itself.

I’m a bit lost with this error… Could someone help me?

Thanks!
Alban


#2

Hello Alban,

The following instruction from $HBP/user-scripts/nrp_functions is responsible for your issue:
mkdir ${VIRTUAL_ENV}/lib/python2.7/site-packages/ -p || { echo ERROR;exit 1; }
The environment variable ${VIRTUAL_ENV} is set in $HBP/user-scripts/nrp_variables this way:
export VIRTUAL_ENV=$HOME/.opt/platform_venv

So it should look like /home/alban/.opt/platform_venv and not the empty string.
The file nrp_variables is sourced by your .bashrc script, i.e., you should see this line there:
. $HBP/user-scripts/nrp_variables
If it is not the case, then you missed the step 7 about the setup of your .bashrc.

Best regards,
Luc


#3

Ok thank you, you are right… that’s because I closed my computer during the installation … I was hungry …

But now I get a new error: when the script “./update_nrp build” tries to update the model, he does not find any model (because I guess the installation is fresh) and cannot create any symlink. Here is the error:


Models

[HBP-NRP] 2017-09-08 11:23:00+02:00 Creating symlinks to ~/.gazebo/models
[HBP-NRP] 2017-09-08 11:23:00+02:00 Creating link for empty_world
ln: impossible de créer le lien symbolique ‘/home/alban/.gazebo/models/empty_world’: Aucun fichier ou dossier de ce type
[HBP-NRP] 2017-09-08 11:23:00+02:00 Creating link for hosta_potted_plant
ln: impossible de créer le lien symbolique ‘/home/alban/.gazebo/models/hosta_potted_plant’: Aucun fichier ou dossier de ce type
[HBP-NRP] 2017-09-08 11:23:00+02:00 Creating link for husky_model

*** plenty lines like that, for all the models ***

[HBP-NRP] 2017-09-08 11:23:00+02:00 Creating link for fournitures/pingpongtable/
ln: impossible de créer le lien symbolique ‘/home/alban/.gazebo/models/pingpongtable’: Aucun fichier ou dossier de ce type
[HBP-NRP] 2017-09-08 11:23:00+02:00 Creating link for fournitures/pingpongtrainerbot/
ln: impossible de créer le lien symbolique ‘/home/alban/.gazebo/models/pingpongtrainerbot’: Aucun fichier ou dossier de ce type
ERROR

Should I download the models somehow? May be I made everything wrong by closing my laptop between steps.
Thanks for the help in any case!
Alban


#4

Hello Alban,

It looks as if /home/alban/.gazebo/models doesn’t exist. I am not sure if this folder is created when installing gazebo; something wrong might have happen with this installation. In any case, the command “mkdir -p /home/alban/.gazebo/models” will fix your issue with the simlinks.

Best regards,
Luc


#5

That worked!
Thanks :slight_smile:


#6

Hi again,

the NRP is now installed, but when loading an experiment, when I press the “play” button, Gazebo “dies unexpectedly”. The first error message apparing in the terminal of the backend happens around these lines (for the full terminal output, I pasted it here: https://justpaste.it/1b4cn):

[ INFO] [1505122858.109855543, 0.021000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1505122858.170543056, 0.026000000]: Physics dynamic reconfigure ready.
gzserver: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreRenderSystem.cpp:546: virtual void Ogre::RenderSystem::setDepthBufferFor(Ogre::RenderTarget*): Assertion `bAttached && “A new DepthBuffer for a RenderTarget was created, but after creation” “it says it’s incompatible with that RT”’ failed.
2017-09-11 11:40:58,328 [Thread-12 ] [hbp_nrp_cle.] [ERROR] Error retrieving service result
2017-09-11 11:40:58,329 [Thread-46 ] [hbp_nrp_cles] [ERROR] Error in CLE (General Error): transport error completing service call: unable to receive data from sender, check sender’s logs for details
Traceback (most recent call last):
File “/home/alban/Documents/NRP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/SimulationServerLifecycle.py”, line 78, in __simulation
self.__cle.start()
File “/home/alban/Documents/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/cle/ClosedLoopEngine.py”, line 244, in start
self.run_step(self.timestep)
File “/home/alban/Documents/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/cle/ClosedLoopEngine.py”, line 215, in run_step
self.rca_future.result()
File “/home/alban/.opt/platform_venv/lib/python2.7/site-packages/concurrent/futures/_base.py”, line 403, in result
return self.__get_result()
File “/home/alban/Documents/NRP/CLE/hbp_nrp_cle/hbp_nrp_cle/robotsim/AsynchronousServiceProxy.py”, line 171, in __retrieve_results_async
“transport error completing service call: %s” % (str(e)))
ServiceException: transport error completing service call: unable to receive data from sender, check sender’s logs for details
2017-09-11 11:40:58,367 [Thread-46 ] [transitions.] [INFO] Initiating transition from state started to state halted…
2017-09-11 11:40:58,367 [Thread-46 ] [transitions.] [INFO] Exited state started
2017-09-11 11:40:58,367 [Thread-46 ] [transitions.] [INFO] Entered state halted
2017-09-11 11:40:58,383 [/joint_state] [rospy.intern] [WARNING] Unknown error initiating TCP/IP socket to 127.0.0.1:53007 (http://127.0.0.1:40795/): Traceback (most recent call last):
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py”, line 555, in connect
self.socket.connect((dest_addr, dest_port))
File “/usr/lib/python2.7/socket.py”, line 228, in meth
return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused

So for what I have understood, Gazebo crashes, because a depth buffer is not compatible with the render target. I am not sure what to do…

Edit: the experiment is the normal Husky Braitenberg Experiment ; my version of Ubuntu is 16.04 ; I used Google Chrome.

Again, thanks a lot if you can give me some help!
All the best,
Alban


#7

Hi Alban,

This might be a pure rendering issue caused by your graphics card setup.
Could you display the output of this command?
$ cat ~/.gazebo/ogre.log

If you run gazebo the following way
$ gazebo

and observe a similar crash, then we’ll look into your graphics card setting.

Best regards,
Luc


#8

Hi,

This might be a pure rendering issue caused by your graphics card setup.

Indeed, when I move in the environment before pressing “play”, it’s very sluggish, whereas it was not with my previous laptop that had an older graphic card.

Could you display the output of this command?
$ cat ~/.gazebo/ogre.log

Here it is: https://justpaste.it/1b4ea

If you run gazebo the following way
$ gazebo
and observe a similar crash, then we’ll look into your graphics card setting.

I tried, and gazebo opens. Then I can insert some objects (normal ones) without any bug, but when I try to insert a robot (the robotic hand e.g.), it does that error:

[FATAL] [1505129217.368167242]: You must call ros::init() before creating the first NodeHandle
Couldn’t find an AF_INET address for []
Couldn’t find an AF_INET address for []
[ERROR] [1505129217.369524559]: [registerPublisher] Failed to contact master at [:0]. Retrying…
Couldn’t find an AF_INET address for []
Couldn’t find an AF_INET address for []
Couldn’t find an AF_INET address for []
Couldn’t find an AF_INET address for []
Couldn’t find an AF_INET address for []
Couldn’t find an AF_INET address for []

Note: I could launch the “Empty Template Pioneer P3DX experiment” and play without any crash, but with some errors when the experiment is built ; no error when I press play (output of the backend terminal for this experiment, after pressing launch, here, if that can be of any help: https://justpaste.it/1b4ez).

Thanks again,
Alban


#9

Hi Alban,

Because of this section in ogre.log

13:18:20: RenderSystem capabilities
13:18:20: -------------------------
13:18:20: RenderSystem Name: OpenGL Rendering Subsystem
13:18:20: GPU Vendor: unknown
13:18:20: Device Name: Gallium 0.4 on llvmpipe (LLVM 4.0, 256 bits)
13:18:20: Driver Version: 3.0.0.0

I think this link may be useful: https://askubuntu.com/questions/787055/ubuntu-16-04-using-gallium-0-4-on-llvmpipe-llvm-3-8-256-bits-instead-of-intel

Tell me if the troubleshooting instructions of the link help.
Best regards,
Luc


#10

I already set the correct NVidia driver to use in “Softwares and updates”, here is what I have:

And this nvidia-384 driver is the one I should use with the GPU I have (GeForce GTX-1070 (Notebook)). The problem is that I am not sure how this tells me that this driver is actually being used. On the link you gave me, one of the guy says that I have to upgrade to the 4.9 kernel version of Ubuntu. But mine is already:

alban@alban-GL502VSK:~$ uname -a
Linux alban-GL502VSK 4.10.0-33-generic #37~16.04.1-Ubuntu SMP Fri Aug 11 14:07:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I think a good way to solve my problem is to correctly update the NVidia driver (nvidia-384). I already tried to do the following:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
ubuntu-drivers devices
sudo apt-get install nvidia-384

But after reboot, that just did a bug where when I login to my Ubuntu session, it goes back to the login screen forever. So I just loaded a different kernel and sudo apt-get remove nvidia-384… But now that the image above shows me I’m using the correct driver, and at the same time that the log and the sluggishness of the NRP tell me I’m not using my GPU at all, … I don’t know what to do :s

Sorry for being lost…
Alban


#11

Did you try to download the NVIDIA run file directly from NVIDIA website? (This solved the issue of the last post.)
Anyway, I’ll ask someone using Ubuntu 16.04 to share her/his configuration with you.

Best regards,
Luc


#12

Hi Alban!
I’m currently working with Ubuntu 16.04 on a Nvidia 1070 (desktop version) using Nvidia’s binary drivers version 381.22 from the nvidia-381 package.

Have you tried this version of the drivers?


#13

Hello Ugo!

So for now I tried to install nvidia-384 using the run file directly from the NVidia website and I kind of broke my ubuntu down because it proposed me to disable the nouveau driver, which I did … But after the installation of nvidia-384 driver failed, I was let with no driver.

Let me just find out how to reinstall my nouveau driver, and then I will try your solution ^^

Alban


#14

Ok I made it! I installed your nvidia-381 driver. And everything works fine with the NRP.

But unfortunately, the only way to use this driver properly with a dual boot (windows 10) is to disable the secure boot (UEFI). I guess this is not a good thing… If you have some idea that I could use, don’t hesitate!

Have a nice day,
Alban


#15

Sadly, you must deactivate it; details here.

If you want to use third-party kernel modules (e.g the nvidia driver) you have to disable secure boot, because those modules are not signed.

In any case is not that bad, it’s a recent security measure recently put in place by Canonical in Ubuntu 16.10