脑奇辣椒python SDK [英] Naoqi pepper python SDK

查看:50
本文介绍了脑奇辣椒python SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从他们的 SDK 文件中通过 python 使用编舞胡椒模拟调用动画包.我在使用常规动作和说话代理时没有遇到任何问题,但是我似乎无法使动画正常工作.这是代码.

I am trying to call an animation package using choreograph pepper simulation through python from their SDK files. I have not had any trouble using the regular motion and speak proxies, however I can't seem to get the animations working. Here is the code.

 animation_player_service = ALProxy("ALAnimationPlayer", "127.0.0.1",9559)
 future=animation_player_service.run("Animation/Moods/Positive/Pepper/Happy",_async=True)
 future.value()

每次我运行代码时,它都会显示RuntimeError: ALAnimationPlayer::run错误的路径格式(Animation/Moods/Positive/Pepper/Happy)已转换为:Animation/Moods/Positive/Pepper/Happy,应遵循以下模式:package/path"我正在使用它在他们网站上说的格式,所以我不确定为什么我会收到这个错误.我还尝试从我的计算机复制确切路径并将其粘贴到 animation_player_service.run() 中,并且还将/更改为 \ 因为窗口中的路径具有该语法.我将不胜感激任何建议!谢谢!

Every time I run the code it says "RuntimeError: ALAnimationPlayer::run Wrong path format (Animation/Moods/Positive/Pepper/Happy) which has been converted in: Animation/Moods/Positive/Pepper/Happy, it should follow the pattern: package/path" I'm using the format it says on their website, so I am not sure why I am getting this error. Ive also tried copying the exact path from my computer and pasting it into the animation_player_service.run(), and have also changed the / to \ since paths in window have that syntax. I would appreciate any advice! Thanks!

推荐答案

动画实际上是安装在 animations 包中的行为.您可以通过在机器人外壳中运行 find/home/nao/.local/share/PackageManager/apps/animations -name behavior.xar 列出所有已安装的标准动画.

Animations are actually behaviors installed in the package animations. You can list all installed standard animations by running find /home/nao/.local/share/PackageManager/apps/animations -name behavior.xar in the robot shell.

ALAnimationPlayer 调用的正确路径是包含 animations 包名称的目录(但没有 /behavior.xar),即

A correct path to the ALAnimationPlayer call is then the directory including the animations package name (but without /behavior.xar), i.e.

animation_player_service.run("animations/Stand/Gestures/ShowTablet_3",_async=True)

这是在 Linux 上运行的,所以字母大小写很重要.

This is run in Linux, so the letter case matters.

这篇关于脑奇辣椒python SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆