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

install #2

Open
kbwaaablya opened this issue Mar 27, 2019 · 21 comments
Open

install #2

kbwaaablya opened this issue Mar 27, 2019 · 21 comments
Labels
good first issue Good for newcomers

Comments

@kbwaaablya
Copy link

Greeting!
Is it possible for you to write a step-by-step Google Assistant installation guide for my Pepper robot, it would be awesome if you could, so I don't mess everything up(Just in case and so others can use such a piece of useful information)!
I am looking forward to hearing from you soon!
Best regards!

@kenanEkici
Copy link
Owner

Hi,
It depends on what you mean by installing Google Assistant on the Pepper robot. During the project, we had no access to the Pepper robot because of a lack of sudo credentials. If you do have access (either physically or via SSH) however, you can refer to the guide on https://developers.google.com/assistant/sdk/guides/library/python/embed/install-sample

Assuming your Pepper robot is running on a Linux environment and you are able to install Python3, Google Assistant should work seamlessly.

If this is not the case and similar to our scenario - you do not have access to your Pepper robot - then a remote installation is a solution. This is unfortunately less innocent and more error prone than it sounds and can possibly break your Pepper robot.

Let me know what you mean in more detail and I will gladly help you out.

@kenanEkici kenanEkici added the good first issue Good for newcomers label Mar 27, 2019
@kbwaaablya
Copy link
Author

Thank you for a quick reply,
So, I have full access to the Pepper robot and for now, the main idea is to push Google assistant to my sweat Pepper. Now I would like to describe my situation more precisely.
Firstly, Pepper documentation shows python 2.7 support only, but I don't think it is a big problem.
I am actually a beginner to this type of project, that's why I am in search of help. What should be done firstly, all preparations needed to get Google.A working and "push" it on Pepper? I want to understand how to look at this type of project and from where to start ( Well, I mean I have already made a connection with the robot, tried commercial programme ( Choreography), which is extremely limited, more like a joke, so I decided that I need to have full control over it, so that only my imagination can be limitation, so the first step would be to get Google assistant working on the robot and I believe then to add map, apps, AI etc. , but only when I get how this process works) . What are the possible solutions?
Every help is greatly appreciated.
Respectfully, Maxime.
P.S. Help!

@kenanEkici
Copy link
Owner

kenanEkici commented Mar 27, 2019

Hi,

Unfortunately, it is a rather technical procedure so I must refer to the tutorial. But if you indeed have full access to the Pepper, then there's nothing to worry about. Just make sure you have a backup in case things go south. Anyway, there's no need to "push" it on the Pepper. If you have access to the robot then you should be able to SSH to the robot and play around with it as if it was a standalone desktop with full root access. I hope you are familiar with Linux even though in your situation it really boils down to following Google's tutorial step by step. Refer to https://developers.google.com/assistant/sdk/guides/library/python/embed/setup?hardware=linux

Make sure you do not skip any step. As opposed to our project, you should not run into any trouble with audio. If you follow the tutorial, then PyAudio (or whatever sound library is being used on Google Assistant) should recognize the speakers and microphone of the Pepper robot. All you need to do is test if they indeed work and otherwise mess with the ALSA setup. Let me know if the audio test fails and what kind of error you might be getting. There might be some extra steps the tutorial is not mentioning to get it working. Afterwards you need to setup the developer project on Google. I have got to admit, it is a headache. When you do successfully register your Robot then the final steps include cloning the (Python 2.7) source code on the Robot and testing whether the provided sample code works. All in all, it is a lengthy process. If you run into problems during the tutorial, mention the step and/or the errors. Be careful with trying out solutions you might encounter on Stackoverflow, etc.. Otherwise, make sure you experiment in an open and safe space. When working with audio, it's a wise thing to check the volume. You do not want to blow up the speakers or mess with other (possibly dangerous) actuators.

If you have everything up and running, then it's pretty easy to extend the assistant with other functionality. However, there's a limitation of what you can do with the Google Assistant alone, unless you have been experimenting with Python and Linux before. For now, you should just focus on getting Google Assistant to run on the Pepper. Ultimately, you can combine Google Assistant and the NAOQI framework and experiment with your own Python code.

@kbwaaablya
Copy link
Author

Thank you for your answer!
Actually, the plan is to write my own code with the NAOqi as it is the main thing to control the robot and add Google.A. Anyways, This was helpful and educative.
Thank you very much!

@kbwaaablya
Copy link
Author

Hey! So when i connected to Robot hrough SSH and put there this project, how to actually make it run on the Robot?

@kbwaaablya
Copy link
Author

And we found out, that we dont have root

@kbwaaablya
Copy link
Author

so i've connected through ssh to the Robot, added assistant.py to the autoload.ini, but of cource Pepper's python doesnt have any extended-libs needed for this project. Tried to pip, but read-only. How did you get this to work on Pepper or maybe you hacked root somehow?

@kenanEkici
Copy link
Owner

kenanEkici commented Apr 3, 2019

Hi,

So you are basically experiencing the same problem, not being able to access the root of the robot. That is one of the reasons why we had to write this extension for the Google Assistant. So to answer your question, you have to clone this project onto a host computer and not on the robot. Because you have no root access, there is no way you will be able to install any packages on the Robot at all. After you have cloned this project on an external computer you have to do the following.

  1. Make sure to install the python packages as specified in requirements.txt (pip install -r requirements.txt)
  2. Make sure you have all the credentials that the Google Assistant package needs in order to function. Refer to the tutorial for this because it is a tricky process
  3. Change the config.ini and edit it according to the network configuration of both the computer you are hosting the project on and the network configuration of the Pepper robot.
  4. Untar the snowboyassistant.tar package
  5. Run the webserver.py. If I remember correctly, you will be prompted for options.

Let me know how it goes. I can not test this project myself unfortunately mainly because I do not have a Pepper robot anymore. So I will try to get you through this.

@kbwaaablya
Copy link
Author

Hi! I will try to to do this just in a moment, meanwhile i've found that you actually can install packages(https://stackoverflow.com/questions/48387823/install-things-on-pepper) and it goes well, but Pepper cannot install google-assistant-libraries for whatever reason, sound-play librarie doesnt not exist at all, even on PyPy and pyaudio gives errors. Will all of that by adding assistant.py to the autoload in pepper it shows on start Assistant circle, but does not recognize OK, google or any similar command. Maybe you have any idea with the packages i mentioned and with that startup. I will reply for your installation as soon as I get there.
Respectfully,

@kenanEkici
Copy link
Owner

kenanEkici commented Apr 3, 2019

It is possible that some of the packages that are used within this project are not compatible with the environment of the robot (Python3 vs Python2 ). I suggest you try cloning the Google Assistant package from the tutorial and start with a clean slate. To answer your actual question, I guess what they mean on Stackoverflow is that you must clone each of the necessary packages from github individually and build them, such as the sound libraries, etc... Assuming that kind of procedure is not prohibited by the environment. I haven't tried it before but I recommend you to work from scratch first, before continuing with this project.

@kbwaaablya
Copy link
Author

You have written, that i need to install all packages, but package sound-play seems to not exist at all, where can I find it?

@kenanEkici
Copy link
Owner

kenanEkici commented Apr 6, 2019

Hi,

I'm sorry, that package was used to test a sound streaming for ROS. In your case, it is irrelevant so you do not need it for this project. I will delete it from the requirements.txt.

@skimbeh
Copy link

skimbeh commented Apr 8, 2019

To install pip and python 2.7 on the pepper robot:

Connect to the robot using SSH. I used PuTTY, connect to the robot's IP (tap his chest button and he'll say it) and it'll ask you to authenticate. Once you're logged in, enter these commands.

wget https://bootstrap.pypa.io/get-pip.py

python get-pip.py --user

@skimbeh
Copy link

skimbeh commented Apr 8, 2019

When following the guide to install the Google Assistant (https://developers.google.com/assistant/sdk/guides/library/python/embed/install-sample), I can't execute any of the commands because of the following error:
sudo: apt-get: command not found

So instead of apt-get I've tried yum and emerge, but they don't work either, any thoughts?

@kbwaaablya
Copy link
Author

Install Linux?

@kenanEkici
Copy link
Owner

When following the guide to install the Google Assistant (https://developers.google.com/assistant/sdk/guides/library/python/embed/install-sample), I can't execute any of the commands because of the following error:
sudo: apt-get: command not found

So instead of apt-get I've tried yum and emerge, but they don't work either, any thoughts?

Hi I've moved this to a new issue

@kbwaaablya
Copy link
Author

In the Google SDK installation i need to provide a json file to env, Am I doing things right? And right now they dont have such an option as "Device registration" so I can't really make progress in that. What do I need to do to continue?

@kenanEkici
Copy link
Owner

You should always refer to the latest version of the tutorial. If the Google Developers console lacks a certain option that is mentioned in the Google Assistant tutorial, you should definitely contact them about it. However, I doubt they have not thought it through. I am currently reading (https://developers.google.com/assistant/sdk/guides/library/python/embed/config-dev-project-and-account). And at step 4 they mention: "If you created a new project, click the Device registration box near the bottom of the page. If you imported a previously-created project, this box will not be displayed; select the Device registration tab (under ADVANCED OPTIONS) from the left navbar."

@kbwaaablya
Copy link
Author

Thank you! That helped, now I am getting a step closer. I've seen you using Py3+(I guess), but if I use Python 2.7.15+ instead on host laptop, is it okay? Or I need to reinstall and get to work everything but on Python 3+?

@kenanEkici
Copy link
Owner

Because most of the packages are intertwined with Google Assistant, you should stick with Python3 in general. Unless you have a specific reason not to.

@awesomebytes
Copy link

Hello. I just updated with my answer on https://stackoverflow.com/questions/48387823/install-things-on-pepper and at the same time I found this issue. I offer a way to install stuff in Pepper without having root, I maintain a few projects that support it. You may be interested.

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

No branches or pull requests

4 participants