Nao robot study Note 2

Source: Internet
Author: User
Today, we have implemented a function on the nao platform to allow a robot to imitate the movements of one robot, currently, it is detected in python that the joint values of a machine are passed to other robots and set them to their joint values. However, there is a problem here, the active robot is executing various actions, such as the execution station.

Today, we have implemented a function on the nao platform to allow a robot to imitate the movements of one robot, currently, it is detected in python that the joint values of a machine are passed to other robots and set them to their joint values. However, there is a problem here, the active robot is executing various actions, such as the execution station.

Today, we have implemented a function on the nao platform to let a robot imitate the movements of one of your robots. Currently, we have detected the values of each joint of a machine in python and then

Pass the shutdown value to another robot and set it to its joint value. However, there is a problem here: the active robot is performing various actions, for example, when performing a stand-up action, it has a lot of internal control, pid interpolation, status detection, and so on, so the main robot runs smoothly, however, if we only pass the joint value to another robot, its actions cannot be completed. It is simple and barely possible, but it cannot be complicated, because it does not clone all of them.

Since it was the first time that the program was downloaded from the robot's system, write down the specific steps:

First, use WinSCP to remotely connect to a robot and fill in the robot address 192.168.1.146 (depending on the robot). User name: nao

Password: nao. Click login. Open PuTTY and enter the robot IP address 192.168.1.146 in the session Directory. Click open to open a control terminal, because it is on the robot's operating system (linux 2.6.2 * in the kernel *) install the python interpreter to directly create a python file in its operating system, write a program (which is nearly installed with the vim Editor), and run it.

From naoqi import ALProxy memProxy = ALProxy ("ALMemory", "192.168.1.146", 9559) clientMotion1 = ALProxy ("ALMotion", "192.168.1.148", 9559) clientMotion2 = ALProxy ("ALMotion ", "192.168.1.145", 9559) serverMotion = ALProxy ("ALMotion", "192.168.1.146", 9559) names = "Body" stiffness1 = 0.6 stiffness = 0; timeLists = 0.04 isAbsoulte = Truesensor = Truespeeds = 0.2 while (1): data0 = serverMotion. getAngles (names, sensor) clientMotion1.setAngles (names, data0, speeds) clientMotion2.setAngles (names, data0, speeds)

The final result is that you move one robot and the other (two in this example) will do the same action. Since the nao robot platform has something open, we are

It is implemented using the open APIs.

There are a lot of things on the platform. Today I also saw a function that can return the red ball position, getPostion () But I don't know why

Using its agent to call this function always returns an error. If a correct result is returned, the distance between the red balls can be detected, in addition, the distance between the robot camera is also a function that can be used to obtain this value. These will continue in the future study.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.