ros-naoqi / naoqi_driver

c++ bridge based on libqi
Apache License 2.0
51 stars 93 forks source link

Nao V6 is failling to start motors, either python, choregraphe or directly via SSH #160

Closed YusseffRuiz closed 10 months ago

YusseffRuiz commented 10 months ago

When running autonomous life or only wake up on Nao V6, it is not working. I've found the issue while running python code directly on the NAO.

`

def wakeUp(ip, port):
    myBroker = ALBroker("myBroker",
                        "0.0.0.0",  # listen to anyone
                        0,  # find a free port and use it
                        ip,  # parent broker IP
                        port)  # parent broker port

    try:
        motionProxy = ALProxy("ALMotion", ip, port)
    except Exception, e:
        print "Could not create proxy to ALMotion"
        print "Error was: ", e

    # print motion state
    print motionProxy.getSummary()
    names = "Body"
    stiffnessLists = 1.0
    timeLists = 1.0
    motionProxy.stiffnessInterpolation(names, stiffnessLists, timeLists)

    try:
        postureProxy = ALProxy("ALRobotPosture", ip, port)
    except Exception, e:
        print "Could not create proxy to ALRobotPosture"
        print "Error was: ", e

    postureProxy.goToPosture("StandInit", 1.0)
    time.sleep(5)
    postureProxy.goToPosture("Crouch", 1.0)

    # Go to rest position
    motionProxy.rest()

    print("Ending Task")
if __name__ == '__main__':
     wakeUp(ROBOT_IP,PORT)

`

After running the main code, it prints everything required, and if activating any other module, it works fine, however, any module requiring motors ex. ALMotion, ALRobotPosture. Gets the following error:

`

   inaoqi-broker: construct at 0.0.0.0:0, parent : 192.168.0.145:9559
   [W] 1699059819.595430 12352 qi.path.sdklayout: No Application was created, trying to deduce paths
   [I] 1699059819.602863 12352 qimessaging.session: Session listener created on tcp://0.0.0.0:0
   [I] 1699059819.791726 12352 qimessaging.transportserver: TransportServer will listen on: tcp://192.168.0.169:50272
   [I] 1699059819.791726 12352 qimessaging.transportserver: TransportServer will listen on: tcp://127.0.0.1:50272

`

Specifically: qi.path.sdklayout: No Application was created, trying to deduce paths

And it doesn't move, anyone knows about this problem?

victorpaleologue commented 10 months ago

To wake up the robot, you are supposed to call ALMotion.wakeUp:

motionProxy = ALProxy("ALMotion", ip, port)
motionProxy.wakeUp()

The rest of your code is redundant.

Closing because this is not a ROS driver question.