Created
April 5, 2019 11:56
-
-
Save FirefoxMetzger/31a29eaacf67f723bdd2ce57a6e76dbc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from naoqi import ALBroker | |
from naoqi import ALProxy | |
from pprint import pprint | |
# start a local broker that connects to the NAO | |
robot_ip = "love" | |
myBroker = ALBroker("myBroker", "0.0.0.0", 0, robot_ip, 9559) | |
# get a handle to the module | |
posture_proxy = ALProxy("ALRobotPosture") | |
file_name = "firefoxmetzger-awesome-pose.pose" | |
posture_proxy._saveCurrentPostureWithName(9942, "myPosture") | |
custom_posture_id = 9942 | |
stand_posture_id = posture_proxy._getIdFromName("Stand") | |
posture_proxy._addNeighbourToPosture(stand_posture_id, custom_posture_id, 1) | |
posture_proxy._addNeighbourToPosture(custom_posture_id, stand_posture_id, 1) | |
posture_proxy._savePostureLibrary(file_name) | |
posture_proxy._loadPostureLibraryFromName(file_name) | |
posture_proxy._generateCartesianMap() | |
posture_proxy.goToPosture("Sit", 0.5) | |
posture_proxy.goToPosture("myPosture", 0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment