Install things on Pepper

2019-01-19 08:35发布

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.

4条回答
迷人小祖宗
2楼-- · 2019-01-19 09:06

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.

查看更多
【Aperson】
3楼-- · 2019-01-19 09:07

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
查看更多
做个烂人
4楼-- · 2019-01-19 09:10

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

查看更多
劳资没心,怎么记你
5楼-- · 2019-01-19 09:19

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

查看更多
登录 后发表回答