How to make a Pepper Robot randomly move and then go to its charging station

Introduction: I have created an application that works well. The problem is, my Pepper Robot makes this app when it's in one place. I managed to get it to move at intervals using AlNavigation.explore (), but it looks like it's not the smoothest path as it basically makes circles around itself and then just moves a little. Also me, when Pepper gets below 15% battery, I want him to find his charging station. I did it successfully when it was offline, but when my app is open it won't work. I added ALRecharge.goToStation () to my application to fix this, but sometimes it works and sometimes it doesn't.

Questions:

1) How do you make Pepper "walk" smoothly in the room and then stop when someone is talking to Pepper?

2) How do I add a Recharger app to my app so that they work together, or should I do it myself for my app?

3) How to make sure Pepper finds the charger even if Pepper doesn't see it where it is?

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

thank

+3


source to share


3 answers


When you ask Pepper to go over to recharge, a charging station must be installed (i.e. less than about 3 meters away).

If not, he won't find it.

I would suggest using the map created while exploring ALNavigation in the background to send Pepper near its charging station, then you can run ALRecharge.goToStation () method.



So, the easiest way is to turn your Pepper on while charging (or just restart naoqi), so after exploring you just need to ask him to go to world position (0,0,0), then you can ask him to switch to recharge.

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

+5


source


Alexandre's solution is good.

If you create a map using the explore method in ALNavigation, you can also feed random targets on the map in navigateToInMap to navigate fairly smoothly.



Then you can stop navigation when you spot someone with ALFaceDetection or ALPeoplePerception.

+4


source


If you are using ALNavigation you can make a map and use it to navigate 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 confidence. Create a file somewhere on your robot and put the coordinates as {charger: [0,0]} if you have multiple coordinates to save.

If you want to navigate smoothly, you can use ALNavigation.navigateToInMap (coordinate), but it won't be very smooth. What better way is to use multiple ALMotion.moveToward (x, y, theta, configuration) and set the robot speed.

+3


source







All Articles