3

Intro: I have created an application now which works well. The problem is that my Pepper Robot is doing this application while standing in one place. I managed to get it moving in intervals with AlNavigation.explore() but it seems like this is not the smoothest way since it is mostly doing circles around itself and then just moving a little. Also i when Pepper is getting below 15% battery i want it to go find its charging station. I did it successfully when it was in autonomous life but when my application is opened then it does not work. I added ALRecharge.goToStation() to my application to fix this, but sometimes it works and sometimes it doesnt.

Questions:

1) How to make Pepper smoothly "walk" around in the room and then stop when someone is speaking to Pepper?

2) How to add Recharger app inside my application so they would work together, or should i do it myself for my application?

3) How to make sure Pepper finds charging stock even if Pepper does not see it from where it is standing?

Does anyone have any examples of this maybe where they made Pepper "live" in the room and also used Pepper charging stand.

Thanks

3 Answers3

5

When you ask your Pepper to go to recharge, the charging station has to be in view (ie roughly less than 3 meters).

If not, he won't find it.

What I would suggest is to use the map, created during the ALNavigation exploration in the background, to send Pepper near his charging station, then you can start the ALRecharge.goToStation() method.

So the easiest way it to turn your Pepper on while on his charger (or just restart naoqi) so after exploring you just have to ask him to go to world position (0,0,0) then you can ask him to go to recharge.

If you don't want to use navigation to move, you could also use the WorldRobotPosition to send it manually back to the position 0,0,0.

Alexandre Mazel
  • 2,462
  • 20
  • 26
  • I have tested around with this for a week. This is so unstable API. 70% of the time something fails in safe development environment. Be it successfully going to charging station or leaving it without getting error code or stuck somehow. Especially leaving the station. Since i get no responses from partner portal, this is where i write. –  May 11 '17 at 06:46
  • which naoqi version did you use ? – Alexandre Mazel May 15 '17 at 16:56
4

Alexandre's solution is a good one.

If you create a map through the explore method in ALNavigation, you could also feed random in-map targets to the navigateToInMap method, in order to navigate around quite smoothly.

You can then decide to stop the navigation when you detect someone, with ALFaceDetection or ALPeoplePerception.

Community
  • 1
  • 1
Maxime BUSY
  • 128
  • 5
3

If you use ALNavigation, you can make a map and use it to move with Pepper :

ALNavigation.explore() 
#The best is to start exploration near the charging station, so the coordinates (0,0) will be the charging station 
path = ALNavigation.saveExploration()
ALNavigation.loadExploration(path)
ALNavigation.startLocalization()

Ok, now you are localized. You can get the current position of your robot with

ALNavigation.getRobotPositionInMap() It returns an array with the position of the robot and the confidence. Create a file somewhere on your robot and put the coordinates like {charger : [0,0]} if you have multiple coordinates to save.

If you want to move smoothly, you can use ALNavigation.navigateToInMap(coord) but it will not be really smooth. What could be better is to use multiple ALMotion.moveToward(x,y,theta,configuration) and set the velocity of the robot.

Half
  • 107
  • 2
  • 5
  • Would it be stable enough to create this for a client and leave with them unattended? –  May 11 '17 at 06:02
  • You can use ALMotion apis which are reliable. – Half May 11 '17 at 20:49
  • did you succeed ? – Half May 15 '17 at 17:36
  • How can i make Auto Recharge app visible from my own app? –  May 18 '17 at 12:42
  • What do you mean by "visible" ? You can use ALRecharge to implement your own Recharge App. What you could do is ALRecharge.lookForStation() if it fails, try to move to the charger with ALNavigation.navigateToInMap(coordinates) like explained before. I don't know the use of ALRecharge, but I will try to make an easy sample. However, you should open a new question only for Stack Overflow for future users. – Half May 19 '17 at 12:59
  • Ok, you could try something like that (assuming you want to use NavigateToInMap, you created a map as explained before) ALRecharge = app.session.service("ALRecharge") ALNavigation = app.session.service("ALNavigation") success = ALRecharge.goToStation() if success != 0: ALNavigation.navigateToInMap(coordinatesOfThePod) ALRecharge.goToStation() Then you can iterate on that, everything is explained in the ALRecharge documentation [ALRecharge](http://doc.aldebaran.com/2-5/naoqi/motion/alrecharge-api.html#alrecharge-api) – Half May 19 '17 at 13:11
  • The problem is that in the middle of goToStation pepper hears someone say hi or sthing and then cancels it and starts the dialog. I call goToStation from javascript. –  May 22 '17 at 10:23
  • Then you just have to turn unsubscribe ALDialog http://doc.aldebaran.com/2-5/naoqi/interaction/dialog/aldialog-api.html#aldialog-api or so. I think it's a different question, don't hesitate to open an other question for this, it will be better for other users search – Half May 29 '17 at 08:18