Pepper autonomous recharge and displacements.

Posted 4 months by Arodriguez

Post a topic
Un Solved
A
Arodriguez

Hello,

I am software developer and I am developing an application for Pepper that includes displacements and also the charging base.


I am currently testing the Autonomous Recharge app and would like to implement its use in my app. After following the steps given on the following GitHub (qisdk-sample-autonomous-recharge-advanced-integration), I realized that for the docking/undocking process it is needed to do a change of Android activity.

That change interferes with the flow of my application, since the robot must be located on a map and the change of activity causes the robot to lose the location.


I wonder if someone could provide me a solution to this problem.

Thanks in advance.

0 Votes


4 Comments

Sorted by
A

Arodriguez posted 3 months

 Hello Lukas,

Thanks for your response.

As you describe in your answer, I have reached the same conclusion. And the solution you gave of checking
if the robot is on the Charging Station, to behave in one way or another is what I already have done.
So, thank you for confirming my theory.

1 Votes

L

Lukas Brandt posted 3 months

Unfortunately, there is no other way to use the Autonomous Recharge App.

It will always start its own activity, which interrupts the running activity and starts the docking process.

Before this happens you can subscribe to an event:


Subscribe to the docking soon event, triggered by the Autonomous Recharge application. This event is triggered when the battery level is less than 3% above the specified low battery threshold, or when the time is 5 minutes before the specified docking alarm goes off.


The listeners can be taken from this project:

https://github.com/softbankrobotics-labs/maplocalizeandmove/tree/master/autonomousrecharge/src/main/java/com/aldebaran/qi/sdk/autonomousrecharge


In the end, you have no choice but to include the listener and react to the event. As soon as the signal is received, Pepper should interrupt its work and navigate to the stored point of the Charging Station. As soon as Pepper arrives in front of the Charging Station, the command to dock should be given directly. This ensures that Pepper arrives at the Charging Station before the Autonomous Recharge App interrupts your activity on its own and Pepper then searches for the Charging Station in the wrong place.


A small tip would be to create the MapFrame directly in front of the Charging Station and to map this point very precisely. When Pepper returns to your Activity, it should be checked whether Pepper is on the Charging Station, in which case you could display a charging screen.

When the Autonomous Recharge App starts undocking after the charging process and returns to your Activity, you can check again at this point whether Pepper is on the charging station. In this case, relocation could be started directly in front of the charging station, which may also be the MapFrame, and the normal process of your app could be continued.

 

 

 

 

 

0 Votes

A

Arodriguez posted 3 months

 Hello Clement,

First of all, thanks for answering me.

I have read the documentation you refer me to and if I have understood correctly,
even though I manage the loading of the map when my activity resumes, the robot needs to localize again.

Is there any way in which I can establish to the robot the position in which it is in,
without doing the localization process?
Or is there a way to obtain the necessary code to carry out the docking/undocking process
and thus be able to include it in my app and not have to change the Activity?

0 Votes

C

Clement Portales posted 4 months Admin

Hello Arodriguez,


Thanks for contacting us ! 

I can give a few leads that may help in resolving your issue. 


From the information I could gather, you need to design the activity to deal with it accordingly. 


Assuming you are using the QiSDK localization features: you need to load the previously used ExplorationMap when your activity resumes: more info here.

You can also find more information on how to work with the exploration map here and here


I hope this can help ! 

Clement




0 Votes

Login or Sign up to post a comment