2

How would I install things on Pepper, since I don't know what package manager it uses. I usually use apt on my Ubuntu machine and want to install some packages on Pepper. I'm not sure what package manager Pepper has (if any) and want to install some packages, but also only know the name of the package using apt (not sure if the package name is the same on other package managers). And if possible, would I be able to install apt on Pepper. Thanks.

Note: From the research I've done, Pepper is using NaoQi which is based off Gentoo which uses portage.

6 Answers6

6

You don't have root access on Pepper, which limits what you can install (and apt isn't on the robot anyway).

Some possibilities:

  • Include your content in Choregraphe projects - when you install a package, the whole directory structure is installed (more exactly, what's listed in the .pml); so you can put arbitrary files on your robot, and you can usually include whatever dependencies your code needs.
  • Install python packages with pip.

In NAOqi 2.5, a slightly older version of pip is installed that will not always work out of the box; I recommend upgrading it:

pip install --user --upgrade pip

... you can then use the upgraded pip to install other packages, using the upgraded pip, and always --user:

/home/nao/.local/bin/pip install --user whatever-package-you-need

Note however that if you do this and use your packages in your code running on Pepper, that code won't work on other robots until you do pip on them, which is why I usually only do this for tests; for production code I prefer packaging all dependencies in my app's package.

Emile
  • 2,946
  • 2
  • 19
  • 22
  • How would I package things? Say for example, on a Debian machine, I would do 'sudo apt-get install vlc'. How do I get that package and include it in my Choregraphe project? And as for pip, I only have one robot that I'm going to deploy my project on so installing it on a bunch of robots is not needed. – Muhammad Rahman Jan 25 '18 at 13:00
  • Well, pip may be the more convenient solution for you. – Emile Jan 25 '18 at 14:46
  • As for packaging: it's just including files in your choregraphe project; files you put in the project folder will be automatically included by choregraphe (in the .pml), and installed on the robot with the rest. But they will only be "installed" in the sense of being copied onto the robot; they won't be added to any path etc. – Emile Jan 25 '18 at 14:49
  • How do I get those files. Say for example I wanted to do install vlc on it but I can’t use emerge vlc command. How would I go on about it? Sorry, I’m pretty new to this stuff. – Muhammad Rahman Jan 25 '18 at 16:18
  • for just transfering files you can use scp: https://kb.iu.edu/d/agye; but you need to somehow have the file you want; e.g. libraries or executables may not be compiled for the right architecture and may not work... and I don't know off the top of my head where you could find a version of vlc for the right artchicture. Once you DO have that, though, just scp it onto the robot. – Emile Jan 25 '18 at 17:06
  • So what kind of file should I be looking for? And when I do find it, is there a specific way to include it in my project? – Muhammad Rahman Jan 26 '18 at 07:20
  • I'm not sure what you'r asking, you might want to create a new question. As I said in my answer, to include it in your project, just put it in the folder alongside your manifest.xml, behavior.xar, (projectname).pml, etc. – Emile Jan 26 '18 at 10:36
  • @Emile The pip is not being upgraded by pip install --user --upgrade pip. I am getting the below error Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip in /usr/lib/python2.7/site-packages – Innovator-programmer Nov 13 '18 at 04:16
  • @Innovator-programmer that may happen on older versions (e.g. on a NAO with NAOqi 2.1), but on a Pepper in NAOqi 2.5, which uses a recent enough version of Python, it should work fine. – Emile Jan 31 '19 at 15:52
  • The only thing I receive is `Downloading/unpacking portage Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement portage Cleaning up... No distributions at all found for pip Storing complete log in /home/nao/.pip/pip.log` I also tried it with `pip install --index-url=https://pypi.python.org/simple/ --upgrade pip`. – Micha93 Jun 08 '21 at 11:00
1

As a workaround if you need to install software (or just newer versions of software) using Gentoo Prefix is an option.

Gentoo Prefix builds a Gentoo OS on any location (no need of root, can be any folder). It includes it's own portage (package manager) to install new software.

I maintain a few projects to work with Pepper and use "any" software I want. Note that they are built for 64b (amd64) and 32b (x86) even though for Pepper only the 32b matter.

  • gentoo_prefix_ci and gentoo_prefix_ci_32b Which builds nightly the bootstrap of the Gentoo Prefix system. This is a process that takes a while to compile (3-6h depending on your machine) and that breaks from time to time (as upstream packages are updated and bugs are found, Gentoo is a rolling release distribution). Every night updated binary images ready to use can be found in the Releases section.
  • For ROS users that want to run it on the robot, based on the previous work, I maintain also ros_overlay_on_gentoo_prefix and ros_overlay_on_gentoo_prefix_32b. They provide nightly builds with binary releases of ROS Kinetic and ROS Melodic over Gentoo Prefix using ros-overlay. You can find ready-to-use 'ros_base' and 'desktop' releases.
  • For purposes related to the RoboCup@Home Social Standard Platform League where the Pepper robot is used I also maintain a specific build that contains a lot of additional software. This project is called pepper_os and it builds 270+ ROS packages, a lot of Python packages (250+ including Theano, dlib, Tensorflow, numpy...) and all the necessary dependencies for these to build (750+ packages). Note that the base image (it's built with Docker) is the actual Pepper 2.5.5.5 image, so it can be used for debugging as it if it was in the real robot (although without sensors and such).

Maybe this approach, or these projects, are useful.

awesomebytes
  • 11
  • 1
  • 6
0

The package manager on pepper is disabled. But you can copy the files to the robot and write your own service that imports any package you might need.

As a supplement on importing: http://www.about-robots.com/how-to-import-python-files-in-your-pepper-apps.html

Anders_K
  • 982
  • 9
  • 28
  • You say it’s disabled. Is there a way to enable it? Thanks. – Muhammad Rahman Jan 23 '18 at 10:41
  • And about the importing packages, how would I import a package like how I would do apt-get install package. Would I be able to use that package and put it onto Pepper somehow? Thanks. – Muhammad Rahman Jan 23 '18 at 10:45
  • You cannot enable it. The custom Gentoo is locked down like an apple product. You will need to get your python packages from github or https://pypi.python.org/pypi. – Anders_K Jan 23 '18 at 11:22
  • What about on NAO? I saw that NAO has a root user whereas Pepper doesn't (http://doc.aldebaran.com/2-5/dev/tools/opennao.html). Would I be able to do "normal" linux stuff using NAO? – Muhammad Rahman Jan 23 '18 at 20:23
  • Yes, you can do "normal" linux stuff on NAO or on Pepper (you can do more if you have root of course). Think of the robot as a gentoo box with arms :) – Emile Jan 25 '18 at 14:51
  • 1
    @Emile The pip is not being upgraded by pip install --user --upgrade pip. I am getting the below error Could not fetch URL pypi.python.org/simple/pip: There was a problem confirming the ssl certificate: Will skip URL pypi.python.org/simple/pip when looking for download links for pip in /usr/lib/python2.7/site-packages – Innovator-programmer Nov 13 '18 at 04:57
0

To get rid of error :

" SSL3_GET_SERVER_CERTIFICATE:certificate verify failed ".

If you use python and requests package, just add verify=False at the end of your parameters.

r=requests.get(URL,params,header,verify=False)

Works with my Pepper

Mohammad
  • 21,175
  • 15
  • 55
  • 84
0

To get rid of

InsecurePlatformWarning: A true SSLContext object is not available.

install

/home/nao/.local/bin/pip install --user requests[security]

To get rid of:

CryptographyDeprecationWarning: Support for your Python version is deprecated.

install

/home/nao/.local/bin/pip install --user cryptography==2.2.2
TVK
  • 1,042
  • 7
  • 21
0

If it based on Gentoo maybe we could try to install portage with pip.

pip install portage

Just a thought.

Micha93
  • 628
  • 1
  • 9
  • 22