'Choregraphe position Pepper

I would like to teach a location to Pepper and when I move it close to that location, he would get there. But it would be best if there was a way to create positions that would move from one to another.

I tried this code from the documentation and I do not understand how to have access that location again after saving in this example.

et = localizationProxy.learnHome()
# Check that no problem occurred.
if ret == 0:
  print "Learning OK"
else:
  print "Error during learning " + str(ret)

# Make some moves.
motionProxy.moveTo(0.5, 0.0, 0.2)

# Go back home.
ret = localizationProxy.goToHome()
# Check that no problem occurred.
if ret == 0:
  print "go to home OK"
else:
  print "error during go to home " + str(ret)

# Save the data for later use.
ret = localizationProxy.save("example")


Solution 1:[1]

You can use ALLocalization.load("example") to reload the map.

The APIs learnHome / goToHome are a particular case of a more general mechanism. If you want to learn several locations to move to, use ALLocalization.getRobotPosition and save them into files under your app's writeable path. To go to these locations, once you have reloaded the map and these locations, tranform the position according to the current robot location, and use ALNavigation.navigateTo to go there.

You can use the ALNavigation APIs instead of ALLocalization, but it is lacking a tutorial.

I was told SLAM in NAOqi 2.5 is not working well and that in 2.9, using the Qi SDK, it works much more reliably.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Victor Paléologue