Problems with NRP source installation (steps 3, 6, 8)


#1

Hello,
I am trying to install the NRP from source on Ubuntu 20.04 (even though I already have the docker installation). I follow the instructions (https://neurorobotics.net/Documentation/latest/nrp/source_install.html) but get some errors regardless.

First things go wrong in point 3.7. The $CMAKE_PREFIX_PATH, $PKG_CONFIG_PATH, and $GAZEBO_MODEL_PATH are defined and contain the paths in question, but the appropriate folders do not exist. The end of my .bashrc file is as follows:

export HBP=$HOME/Documents/NRP
export NRP_INSTALL_MODE=user
PYTHONPATH=
. “$HBP”/user-scripts/nrp_variables
. “$HBP”/user-scripts/nrp_aliases

export NVM_DIR="/home/maurice/.nvm"
[ -s “$NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh” # This loads nvm

Sourcing .bashrc gives the following error:

bash: /home/maurice/Documents/NRP/GazeboRosPackages/devel/setup.bash: No such file or directory

Then in step 6.1 the nginx cannot be restarted:

Finally, in step 8.2 grunt installation gives several errors:

I would be grateful for your help with tackling these problems.
Best regards,
Mikołaj Miękus


#2

Hi,

First step 3.7 tells you do add the variables for the later gazebo build (step 9). So if you get troubles, you should get them only at step 9 as build errors. It is ok if the folders don’t exist at the time of 3.7.

It is also normal that you get this setup.bash not found error from bashrc before the build is complete (step 9).

Step 6.1, nginx not starting. It could be that you have another instance of nginx running in the background. Check with

ps aux | grep nginx

Could be also that your ports are blocked by either a firewall or services. Check with

netstat -ano -p tcp

Could be also that your docker NRP is running and blocking ports. Consider shutting it off with

./nrp_installer.sh stop

from your docker installation folder.

You can use the

cle-nginx restart

command to test nginx independently of any script.

For step 8.2, I would follow their instructions and use – force. You seem to have a prior installation of nvm (maybe you tried a first source install before). The warnings, you can safely ignore.

Hope this helps,
Best regards


#3

Thank you, this helped.
Unfortunately, when I ran ./update_nrp build --all from the step 9.2, the configuring did not get completed. There are some 3rd party packages missing (and apt-get cannot find them). This is the end of what got printed. Could you please help me understand what it tells me to do?

====== Finding 3rd Party Packages ======
-- Operating system is Linux
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'freeimage>=3.9.0'
--   No package 'freeimage' found
--   freeimage.pc not found, trying freeimage_include_dir and freeimage_library_dir flags.
--   Looking for FreeImage.h - not found
-- 	Missing: Unable to find FreeImage.h
--   Looking for libfreeimage - not found
-- 	Missing: Unable to find libfreeimage
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1") 
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR) 
-- 	Missing: OpenGL
-- Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR) 
-- 	OpenAL not found, audio support will be disabled.
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.4") found components: C CXX 
-- HDF5 Found
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.68.0")  
-- Checking for module 'libprofiler'
--   No package 'libprofiler' found
-- Looking for libprofiler - not found
-- Checking for module 'libtcmalloc'
--   No package 'libtcmalloc' found
-- Looking for libtcmalloc - not found
-- Found Simbody: /home/maurice/.local/include/simbody  
-- Looking for Simbody - found
-- Found OpenSim: /home/maurice/.local/sdk/include  
-- OpenSim Libraries found: optimized;/home/maurice/.local/lib/libosimCommon.so;optimized;/home/maurice/.local/lib/libosimSimulation.so;optimized;/home/maurice/.local/lib/libosimAnalyses.so;optimized;/home/maurice/.local/lib/libosimActuators.so;optimized;/home/maurice/.local/lib/libosimTools.so
-- Could NOT find DART (missing: DART_DIR)
-- Looking for DART - not found
-- 	DART 6.6 not found, for dart physics engine option, please install libdart6.6-dev.
-- Using system tinyxml.
-- Checking for module 'tinyxml'
--   Found tinyxml, version 2.6.2
-- Using system tinyxml2.
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 6.2.0
-- Looking for libtar.h - found
-- Looking for libtar.so - found
-- Checking for module 'tbb'
--   Found tbb, version 
-- Checking for module 'OGRE-RTShaderSystem>=1.7.4'
--   No package 'OGRE-RTShaderSystem' found
-- Checking for module 'OGRE>=1.7.4'
--   No package 'OGRE' found
CMake Warning at cmake/SearchForStuff.cmake:402 (find_package):
  By not providing "FindOGRE.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OGRE", but
  CMake did not find one.

  Could not find a package configuration file provided by "OGRE" with any of
  the following names:

    OGREConfig.cmake
    ogre-config.cmake

  Add the installation prefix of "OGRE" to CMAKE_PREFIX_PATH or set
  "OGRE_DIR" to a directory containing one of the above files.  If "OGRE"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:190 (include)


-- 	Missing: Ogre3d version >=1.7.4(http://www.orge3d.org)
-- Checking for module 'OGRE-Terrain'
--   No package 'OGRE-Terrain' found
-- Checking for module 'OGRE-Overlay'
--   No package 'OGRE-Overlay' found
-- Checking for module 'ccd>=1.4'
--   No package 'ccd' found
-- Using internal copy of libccd
-- Checking for module 'libswscale'
--   Found libswscale, version 5.5.100
-- Checking for module 'libavdevice>=56.4.100'
--   Found libavdevice, version 58.8.100
-- Checking for module 'libavformat'
--   Found libavformat, version 58.29.100
-- Checking for module 'libavcodec'
--   Found libavcodec, version 58.54.100
-- Checking for module 'libavutil'
--   Found libavutil, version 56.31.100
-- Checking for modules 'playercore>=3.0;playerc++;playerwkb'
--   No package 'playercore' found
--   No package 'playerc++' found
--   No package 'playerwkb' found
-- 	Player not found, gazebo plugin for player will not be built.
-- Checking for module 'gts'
--   Found gts, version 0.7.6
-- Looking for GTS - found
-- Checking for module 'bullet>=2.82'
--   Found bullet, version 2.88
-- Checking for module 'libusb-1.0'
--   No package 'libusb-1.0' found
-- 	libusb-1.0 not found. USB peripherals support will be disabled.
-- Checking for module 'OculusVR'
--   No package 'OculusVR' found
-- 	Oculus Rift support will be disabled.
-- Looking for ignition-math6 -- found version 6.10.0
-- Searching for dependencies of ignition-math6
-- Looking for SDFormat9  - found
CMake Error at cmake/SearchForStuff.cmake:633 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5" with any of
  the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:190 (include)


-- Configuring incomplete, errors occurred!
See also "/home/maurice/Documents/NRP/gazebo/build/CMakeFiles/CMakeOutput.log".
See also "/home/maurice/Documents/NRP/gazebo/build/CMakeFiles/CMakeError.log".
gazebo

These are the logs that were mentioned:
CMakeError.txt (2.8 KB)
CMakeOutput.txt (46.8 KB)


#4

You need to install the ogre and qt5 libraries

sudo apt-get install libogre-1.9-dev qt5-default

#5

Thank you. That seems to have solved some issues but not all:

(...)
-- Looking for libignition-common3 - found
-- Looking for libignition-fuel_tools4 - found
-- Looking for libosvrClientKit and ClientKit.h - not found
-- 	OpenSource Virtual Reality (OSVR) support will be disabled.
CMake Error at cmake/SearchForStuff.cmake:859 (file):
  file STRINGS file
  "/home/maurice/Documents/NRP/gazebo/QWT_INCLUDE_DIR-NOTFOUND/qwt_global.h"
  cannot be read.
Call Stack (most recent call first):
  CMakeLists.txt:190 (include)


-- Looking for qwt >= 6.1.0 - not found
-- 	Missing: libqwt-dev. Required for plotting.
-- Found libnoise: NO
-- ----------------------------------------

(...)

-- BUILD WARNINGS
-- 	OpenAL not found, audio support will be disabled.
-- 	DART 6.6 not found, for dart physics engine option, please install libdart6.6-dev.
-- 	Player not found, gazebo plugin for player will not be built.
-- 	libusb-1.0 not found. USB peripherals support will be disabled.
-- 	Oculus Rift support will be disabled.
-- 	ronn not found, manpages won't be generated
-- 	OpenSource Virtual Reality (OSVR) support will be disabled.
-- END BUILD WARNINGS

-- BUILD ERRORS: These must be resolved before compiling.
-- 	Missing: Unable to find FreeImage.h
-- 	Missing: Unable to find libfreeimage
-- 	Missing: libqwt-dev. Required for plotting.
-- END BUILD ERRORS

CMake Error at CMakeLists.txt:385 (message):
  Errors encountered in build.  Please see the BUILD ERRORS above.


-- Configuring incomplete, errors occurred!
See also "/home/maurice/Documents/NRP/gazebo/build/CMakeFiles/CMakeOutput.log".
See also "/home/maurice/Documents/NRP/gazebo/build/CMakeFiles/CMakeError.log".
gazebo

#6

Looks like you miss

-- |Missing: Unable to find libfreeimage|
-- |Missing: libqwt-dev. Required for plotting.|

I’d try to install those and rebuild.


#7

I have tried that but apt-get cannot find them.


#8

You have to google for their ubuntu package names. Here is a full list of packages which you can search.
https://ubuntu.pkgs.org/20.04/ubuntu-universe-amd64/


#9

Thank you. Now while building I am getting more errors:



If I understand correctly, I just have to install appropriate packages? But where can I find the actual names of the packages? After installing several similarly-named packages I found one that seemed to solve one of the errors (and its name was not even explicitly listed in the link you have sent above). There surely is a better way to find the names of the packages needed? I would appreciate your advice in this regard.

PS. What I mean is: where can I find that instead of, for example, sensor_msgs I should actually use the name ros-noetic-sensor-msgs?


#10

Hi,

Regarding your last question in the PS, this is a question about Linux in general. When you get build errors, they mention missing files or missing library files on your system that are generally part of ubuntu packages, sometimes pip packages and the names generally differ. It is of common use when building for Linux to google the missing files or libraries to find out how the ubuntu package is called.

About the errors you have, I guess you have many missing libraries, like libssl-dev (maybe you installed a desktop only version of ubuntu, stripping off development packages?).

My suggestion would be to use the docker version of NRP, which you have already. Installing from source is meant for Linux experts and developers. The Docker NRP is meant for regular users and has an easy installation process.


#11

Then why the tutorials require me to have the source installation?


#12

Which tutorial are you following?


#13

The first one, about the baseball experiment.


#14

I reached out to the development team and I have good news. A recent addition to the docker NRP enables to run an ipython notebook from the docker containers. The tutorial doesn’t mention it yet and should be updated (thanks for the heads up by the way!).

So, I would suggest that you be sure to shut down all services from your failed source install:

cle-kill
sudo killall nginx

Then start your docker NRP and connect to the backend container:

./nrp_installer.sh start
./nrp_installer.sh connect_backend

In the terminal that pops up (you are inside the container), you can run the tutorial as described. Just skip the update_nrp command at the beginning of course.

When you run, at the end of the tutorial page the

cle-virtual-coach ipython notebook tutorial_baseball.ipynb

line, the notebook server is started. You can then access this notebook from your host computer (open a browser window and give the notebook port on localhost:

http://localhost:8888

If this port is not usable on your system (already used for example), you can change it with the -np option while starting the docker NRP with ./nrp_installer.sh.


#15

A ticket has been submitted for the dev team to update the tutorial:
https://hbpneurorobotics.atlassian.net/browse/NUIT-286


#16

Thank you, that’s great news. Unfortunately, my 8888 port seems to be taken, but even if I start the platform with, e.g. ./nrp_installer.sh -np 8889 start, jupyter notebook still tries to use the 8888 port.


#17

Hi,

You need to start the jupyter notebook in the container from the same different port. From the container terminal, in the my_first_experiment folder, give:

cle-virtual-coach jupyter notebook --no-browser --port=8889 tutorial_baseball.ipynb

You should get the following output:

I 12:22:08.833 NotebookApp] Writing notebook server cookie secret to 
/home/bbpnrsoa/.local/share/jupyter/runtime/notebook_cookie_secret
[I 12:22:09.118 NotebookApp] Serving notebooks from local directory: 
/home/bbpnrsoa/nrp/src/Experiments/my_first_experiment
[I 12:22:09.118 NotebookApp] Jupyter Notebook 6.4.4 is running at:
[I 12:22:09.118 NotebookApp] http://localhost:8889/?token=f57e98323061d02615a96d8762432b953f4d801bf39c4037
[I 12:22:09.118 NotebookApp]  or http://127.0.0.1:8889/?token=f57e98323061d02615a96d8762432b953f4d801bf39c4037
[I 12:22:09.118 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 12:22:09.175 NotebookApp] No web browser found: could not locate runnable browser.
[C 12:22:09.176 NotebookApp] 

To access the notebook, open this file in a browser:
    file:///home/bbpnrsoa/.local/share/jupyter/runtime/nbserver-3205-open.html
Or copy and paste one of these URLs:
    http://localhost:8889/?token=f57e98323061d02615a96d8762432b953f4d801bf39c4037
or http://127.0.0.1:8889/?token=f57e98323061d02615a96d8762432b953f4d801bf39c4037

Then open the browser from your host machine and give the url with localhost.


#18

Thank you. I did that, and now in the terminal everything seems right. But no matter which port I choose, I cannot access the notebook from the browser. I get messages that Firefox of Chrome are unable to connect.
(And I can open notebooks when I start them from outside the container.)


#19

Ok, I gave it another try and owe you more details as follows.

First, port 8888 is exposed by default, so you don’t need the -np parameter with nrp_installer.sh.
Second, the -np parameter with nrp_installer.sh is only taken into account if you reset your containers:

./nrp_installer.sh -np 8889 reset

sorry I missed that point earlier.

Though, on my side, either ports (8888 or 8889) are unavailable from the host browser (ERR_CONNECTION_RESET) and I guess that’s also what you get.

I am forwarding this to the development team as a bug report and hope that we get a quick fix or work around from them.

https://hbpneurorobotics.atlassian.net/browse/NUIT-287


#20

@mmiekus Try this when you want to run the Jupyter server inside the backend container:
cle-virtual-coach ipython notebook "--ip=0.0.0.0" tutorial_baseball.ipynb
Also consider that you must run this command inside this folder:
/home/bbpnrsoa/nrp/src/Experiments/tutorial_baseball_exercise