3

I am currently working on a Pepper Robot. The project aims to welcome visitors in a laboratory and to guide them to the office/teacher he wants to see. To do that, i need to make Pepper create her map of the environment and to localize herself.

I have encountered two problems:

  • the quality of the map,
  • the navigation with this map.

A good navigation implies a good map, but even though when there is only free space around, Pepper is not able to navigate on it.

I use the SoftBank's :

Below are the maps I have (note that the floor reflects light) : Black is free space - White is obstacle

To better the map i went in a room with no reflexion on the floor (carpet floor) and here are the map i had Carpet Floor Carpet Floor Lights On (the environment changed but it is quiet recognizable with some imagination)

For now I couldn't test the navigation on a carpet floor but on the first two maps, Pepper movements are completely incorrect. Moreover, the localization gives me ellipse errors 2 meters wide and 3 meters long on an exploration of 5 meters.

So my questions are :

  • am I doing something incorrect?
  • how could i solve my problems?
  • it is my first experience with navigation, am I expecting too much of it? or are the softbank's functions not efficient?

My code to explore :

PepperSpeech = session.service("ALTextToSpeech")
PepperSpeech.say("Connexion")
PepperNavig = session.service("ALNavigation")
PepperMvt = session.service("ALMotion")
PepperMvt.wakeUp()
PepperSpeech.say("Lancement de l'exploration")
state = PepperNavig.explore(5.0)
print(state)
PepperSpeech.say("Exploration terminee")
time.sleep(2)
PepperNavig.stopExploration()

path = PepperNavig.saveExploration()
print(path)
time.sleep(2)
PepperSpeech.say("sauvegarde terminee")

loadingsuccess = PepperNavig.loadExploration(path)
print(loadingsuccess)
CurrentMap = PepperNavig.getMetricalMap()

fichier = open("Map5m312Obst.txt", "w")
print(type(CurrentMap))
print(type(CurrentMap[0]))
formatted = [format(v) for v in CurrentMap]
fichier.write(str(formatted))
fichier.close()

My code to navigate:

adress = str("/home/nao/.local/share/Explorer/2018-01-18T084351.874Z.explo")
etat = PepperNavig.loadExploration(adress)
print("etat load :")
print(etat)
Map = PepperNavig.getMetricalMap()

PepperNavig.startLocalization()

PepperNavig.relocalizeInMap([0, 0, 0])

id = PepperNavig.navigateToInMap([0, -1, 0])
PepperNavig.wait(id)
pose1 = PepperNavig.getRobotPositionInMap()
print("pose1 = " + str(pose1))
time.sleep(5)

id = PepperNavig.navigateToInMap([0, 0, 0])
PepperNavig.wait(id)
pose2 = PepperNavig.getRobotPositionInMap()
print("pose2 = " + str(pose2))
time.sleep(5)

id = PepperNavig.navigateToInMap([-1, 0, 0])
PepperNavig.wait(id)
pose2 = PepperNavig.getRobotPositionInMap()
print("pose2 = " + str(pose2))
time.sleep(5)

id = PepperNavig.navigateToInMap([0, -1, 0])
PepperNavig.wait(id)
pose3 = PepperNavig.getRobotPositionInMap()
print("pose3 = " + str(pose3))
time.sleep(5)
  • In my experience a soft carpet floor may both absorb the laser light and also cause inaccurate odometry. Thus impeding navigation. – Anders_K Jan 22 '18 at 11:16
  • Thank you for the advice. I'll do further tests to find the exact cause of the problem. – ElNavigator Jan 22 '18 at 13:07
  • The black carpet had better result than the reflecting ground. I used the choregraphe package below and it works better whatever the ground. Thanks for the help. – ElNavigator Jan 24 '18 at 19:22

2 Answers2

4

You seem to call the correct APIs in the right order. But if there is effectively free space around the robot, the map should be all white, not black. You say "Black is free space - White is obstacle", normally it is the opposite. The color of the pixel represents the probability of the zone being free: - 1.0 (or 100 here) means free area - 0.0 (or 0) means not free area, so obstacle You can find working code samples here: https://github.com/aldebaran/naoqi_navigation_samples

"ellipse errors 2 meters wide and 3 meters" means that you robot is lost. May be the relocalizeInMap([0.0, 0.0, 0.0]) did not went well. Is the robot placed correctly in the (0.0, 0.0) location before call?

ngaga
  • 126
  • 1
  • To plot the map, i use this matlab code : MapArray = Map5m312SansObst; lengthMap = length(MapArray); sizeMatrix = sqrt(lengthMap); MapMatrix = reshape(MapArray, sizeMatrix, sizeMatrix); figure(1) imshow(MapMatrix, [0 100]) I tried in a full free zone environment but the map was filled in black so i guess black is free zone. Admitting this, the navigation was quiet chaotic (I tried a one metter square using four NavigateToInMap for each side). This could maybe be explained if Pepper "thinks" she is trapped in an obstacle. Maybe? – ElNavigator Jan 22 '18 at 13:21
  • I thank you, the map is way better! And so is the navigation! – ElNavigator Jan 24 '18 at 19:19
1

If you haven't already, updating to NAOqi 2.7 should improve navigation http://doc.aldebaran.com/2-7/news/2.7/whatsnew2.7.html#navigation-abilities-improved

Anders_K
  • 982
  • 9
  • 28
  • Okay i'll try that, but my collegues are working on a 2.5.7. Is there any compatibility problem if i work in 2.7 and my collegues on the 2.5.7 version? – ElNavigator Jan 22 '18 at 13:25
  • That is a good question. I have not heard of any issues, but at the same time I don't know how many developers have adopted the new version. – Anders_K Jan 22 '18 at 13:42
  • Okay i'll try ASAP, keep in touch – ElNavigator Jan 22 '18 at 15:54
  • I've checked the 2.7 version. This could help me a lot but i didn't find any where to download it, not even on SoftBank's Website. https://community.ald.softbankrobotics.com/en/resources/software/language/en-gb/robot/pepper-3/field_software_type/sdk – ElNavigator Jan 23 '18 at 15:33
  • Try requesting it from support and give them the head ID of your robot. Carefully read the list of changes first, some modules are deprecate: http://doc.aldebaran.com/2-7/news/index.html – Anders_K Jan 24 '18 at 08:05
  • I did, but there are few problems with the 2.7 for now. Going from 2.5 to 2.7 works, but the opposite does not work. The rest of my collegues used 2.5 and i don't want to risk incompatibilities. – ElNavigator Jan 24 '18 at 19:25