- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我项目的目标是对 NAO 机器人进行编程,以使用神经网络检测和识别机器人。我在 MatLab 中使用神经网络对对象进行分类,我正在编写脚本以通过 Python 中的 NAO 机器人捕获图像。我拥有所有必要的导入(来自 naoqi 的 ALProxy、来自 PIL 的图像、随机、时间、操作系统、系统、cv2 和 vision_definitions),并在 python 代码中为每个代理(postureProxy、motionProxy、speechProxy)配置了 ip 和端口、anspeechProxy、sprecogProxy、memoryProxy 和 photoCaptureProxy)。
try:
photoCaptureProxy = ALProxy("ALPhotoCapture", ip, port)
#this was done for each proxy listed above
except Exception, error:
print("Connection error: ", error)
如果我遇到任何连接问题,我会打印出错误,我确实做到了。我收到了如下错误通知:
RuntimeERror('\tALBroker::createBroker\n\tCannot connect to tcp://ip:port',))
我知道因为涉及到 TCP,所以计算机和 NAO 机器人之间的有线连接出了点问题。是否有解决此问题的方法?
下面是一段较大的代码:
ip = "192.168.208.254"
port = 9559
#ALProxy setups
try:
postureProxy = ALProxy("ALRobotPosture", ip, port)
motionProxy = ALProxy("ALMotion", ip, port)
speechProxy = ALProxy("ALTextToSpeech", ip, port)
anspeechProxy = ALProxy("ALAnimatedSpeech", ip, port)
sprecogProxy = ALProxy("ALSpeechRecognition", ip, port)
memoryProxy = ALProxy("ALMemory", ip, port)
photoCaptureProxy = ALProxy("ALPhotoCapture", ip, port)
except Exception, error:
print("Connection error: ", error)
resolution = vision_definitions.kVGA
colorSpace = vision_definitions.kYUVColorSpace
fps = 30
最佳答案
看起来你的 ip 变量的值是“ip”而不是你的机器人的实际 IP 地址;港口也一样。端口变量应为 9559(除非您使用的是虚拟机器人)。
如果没有,您可能想要显示更大的代码片段。
(编辑,现在有一个更大的片段)
当我尝试该代码时,我得到了一些东西
Cannot connect to tcp://192.168.208.254:9559
所以您显示的错误消息似乎与代码不匹配(或者发生了一些奇怪的事情 - 也许您使用的是旧版本的 python SDK,它以不同的方式显示错误消息)。
您的计算机可能与机器人不在同一个网络上 - 只需在命令行中 ping 该 IP 地址,或使用网络浏览器打开它即可。
关于Python 脚本连接到 NAO 机器人,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51502607/
我正在对 NAO 机器人进行人机交互编程,我需要更改“人感知”中的第一和第二限制距离。问题是,我不知道如何使用它。我尝试使用 AlMemory (...DistanceUpdated) 中的事件并输入
任务:计划让 Nao 向人类提出一些问题并给出答案变体。人们应该为每个问题给出一个答案变体,但在每五个问题之后,Nao 应该说:好的,你回答了 5 个问题并给出了 3 个正确答案和 2 个错误答案。请
我项目的目标是对 NAO 机器人进行编程,以使用神经网络检测和识别机器人。我在 MatLab 中使用神经网络对对象进行分类,我正在编写脚本以通过 Python 中的 NAO 机器人捕获图像。我拥有所有
我刚刚开始使用带有 C++ SDK 的 NAO 机器人。我想使用 NAO 作为演示者,比如在小组面前或教室里作为讲师。同时我希望 NAO 控制笔记本电脑的幻灯片演示(例如使用 Powerpoint)。
我正在尝试使用 python naoqi SDK 版本 2.1.4.13 使用 NAO v4 执行一些远程音频处理,但我在执行此操作时遇到了困难。我尝试使用 Alexandre Mazel 在 NAO
我在文件 say.py 中使用 Python SDK 编写了一个简单的程序。 Aldebaran Nao 连接到 IP 172.26.96.164 的网络 from naoqi import ALPr
我正在使用 NAOqi 和 Python 为我的 NAO 机器人编程。当我从 Python 文件复制代码时 here它工作正常。我这样调整它以适应我的变量: nav.setStiffnesses("H
在被一些行为不端的用户滥用后,软银关闭了 NAO 和 Pepper 的论坛,现在我找不到任何活跃的 NAO 和 Pepper 论坛。所以想问问你知道的地方是否还有 NAO 和 Pepper 的论坛。
NAOqi 2.8不再具有DCM。如何替换它,例如,在下面的代码中? proxy = new AL::DCMProxy(pBroker); // does not work anymore proxy
我不确定以前是否尝试过,但我正在尝试使用 Kinect并检测 Nao robot 做出的手势. 我做了一个Kinect应用,a gesture based picture viewer它可以很好地检测
我正在尝试将视频和图像从 Pepper 和 NAO 机器人的摄像头远程传输到我的笔记本电脑。 首先,我使用 while 循环从 NAO 的相机中重复捕获图像,并通过 opencv 处理图像。然而,正如
我的问题如下。我有一个Python脚本被执行,以便机器人执行各种操作而不会停止,直到执行停止,但是出于安全原因(以防机器人发疯并想要杀死我们所有人)我需要添加此指令来停止它使用他头部的触摸传感器,以防
我正在与来自 Aldebaran 的机器人 Nao 一起做一个项目。我必须做出一个简单的行为,让 Nao 与某人玩 Connect 4(连续 4 次)。 为此,我必须将 Nao 与 Windows A
我正在为我的 Alderbaran Nao V5 机器人编写一个模块。 Alderbaran 建议使用 qibuild 来编译模块,我能够成功地做到这一点,但现在我正在尝试转向编写我自己的 makef
我正在尝试遵循 Aldebaran here 提供的文档为了让我的 NAO 为 Python 编程做好准备。我正确下载了适用于我的操作系统(linux 64 位)的 NAOqi 框架,然后输入命令行
从 NAOqi 移植到 qi 框架时,我取得了部分成功。但是,我仍然有以下问题。 我不知道如何在 qi 框架中使用 ALSoundExtractor 实现声音处理。 在老脑奇里,有一个例子: http
我对将自定义服务应用程序打包和部署到机器人的正确过程感到困惑。我正在使用Python。 我读过this document但它看起来更像是一个应用程序创建的指南。 另一方面,我尝试了 robot-jum
我正在用来自 php 的数据填充这个 mysql 表(通过 post 并使用 filter_input)。数据库是 utf8,但是当我有一个用户输入带有 ^,',',~ 的单词(例如 Não)时,我得
我在网上寻找如何在 NAO v6 中使用 C++ 编程,但我什么也找不到,我知道如何在 choregraphe 中使用 python 编程,但我找不到方法用c++编程。有什么教程之类的,或者如果很简单
我正在尝试进行一些图像处理,并且我有一个用 Python 编写的脚本,可以在 NAO 上运行。我需要将代码传输到 choreographe,以便它可以在机器人上运行。 如何使用 python 为 NA
我是一名优秀的程序员,十分优秀!