近期收到留言,遇到安装或者网络问题,可以去官网反馈或查阅解决方案(链接如下):

https://support.bluestacks.com/

使用模拟器视频录像链接:

https://v.youku.com/v_show/id_XMzk4NjM4OTU4NA==.html

需要使用安卓模拟器:

连接成功后:

需要进行sdk开发和调试,参考官网按如下步骤配置:

使用adb调试:

在对应位置添加环境变量:

测试adb是否正常开启:

连接Cozmo_xxxxx:

完成配置后,就可以开发各类cozmo应用了,是不是很有趣!

忽略无网络链接:

----

Fin

----

补充vector的openai:https://github.com/open-ai-robot/Anki-Vector-AI


目录

  • 目录
  • Anki Vector AI ++
  • 物体检测
    • 自己运行代码
    • 这个怎么运作
  • 鞋子摆放

Anki Vector AI ++

Anki Vector - 具有交互式AI技术的家庭机器人。

好吧,我在2019年2月10日买了这个小家伙,如果你想要一个机器人宠物,并且你想对它做一些AI编程,那么我强烈建议你去Anki Vector。

我构建这个项目来分享我的代码和文档。

物体检测

此程序用于使Vector能够使用其相机检测对象,并告诉我们它找到了什么。

我们从Vector的相机拍摄照片,然后发布到Google Vision服务,然后Google Vision Service返回对象检测结果,最后,我们将所有标签文本转换为一个句子并发送到Vector,以便Vector可以大声说出来。

Well, let's see how to do it.Run the code yourself
Install Vector Python SDK. You can test the SDK by running any of the example from anki/vector-python-sdk/examples/tutorials/
Set up your Google Vision account. Then follow the Quickstart to test the API.
Clone this project to local. It requires Python 3.6+.
Don forget to set Google Vision environment variable GOOGLE_APPLICATION_CREDENTIALS to the file path of the JSON file that contains your service account key. e.g. export GOOGLE_APPLICATION_CREDENTIALS="/Workspace/Vector-vision-62d48ad8da6e.json"
Make sure your computer and Vector in the same WiFi network. Then run python3 object_detection.py.
If you are lucky, Vector will start the first object detection, it will say "My lord, I found something interesting. Give me 5 seconds."
How it works
Connect to Vector with enable_camera_feed=True, because we need the anki_vector.camera API.
robot = anki_vector.Robot(anki_vector.util.parse_command_args().serial, enable_camera_feed=True)
We'll need to show what Vector see on its screen.
def show_camera():print('Show camera')robot.camera.init_camera_feed()robot.vision.enable_display_camera_feed_on_face(True)
and close the camera after the detection.def close_camera():print('Close camera')robot.vision.enable_display_camera_feed_on_face(False)robot.camera.close_camera_feed()
We'll save take a photo from Vector's camera and save it later to send to Google Vision.
def save_image(file_name):print('Save image')robot.camera.latest_image.save(file_name, 'JPEG')
We post the image to Google Vision and parse the result as a text for Vector.
def detect_labels(path):print('Detect labels, image = {}'.format(path))# Instantiates a client# [START vision_python_migration_client]client = vision.ImageAnnotatorClient()# [END vision_python_migration_client]# Loads the image into memorywith io.open(path, 'rb') as image_file:content = image_file.read()image = types.Image(content=content)# Performs label detection on the image fileresponse = client.label_detection(image=image)labels = response.label_annotationsres_list = []for label in labels:if label.score > 0.5:res_list.append(label.description)print('Labels: {}'.format(labels))return ', or '.join(res_list)
Then we send the text to Vector and make it say the result.
def robot_say(text):print('Say {}'.format(text))robot.say_text(text)
Finally, we put all the steps together.
def analyze():stand_by()show_camera()robot_say('My lord, I found something interesting. Give me 5 seconds.')time.sleep(5)robot_say('Prepare to take a photo')robot_say('3')time.sleep(1)robot_say('2')time.sleep(1)robot_say('1')robot_say('Cheers')save_image(image_file)show_image(image_file)time.sleep(1)robot_say('Start to analyze the object')text = detect_labels(image_file)show_image(image_file)robot_say('Might be {}'.format(text))close_camera()robot_say('Over, goodbye!')
We want Vector randomly active the detection action, so we wait for a random time (about 30 seconds to 5 minutes) for the next detection.
def main():while True:connect_robot()try:analyze()except Exception as e:print('Analyze Exception: {}', e)disconnect_robot()time.sleep(random.randint(30, 60 * 5))
When Vector success to active the detection action, you should see logs:
2019-02-17 21:55:42,113 anki_vector.robot.Robot WARNING  No serial number provided. Automatically selecting 009050ae
Connect to Vector...
2019-02-17 21:55:42,116 anki_vector.connection.Connection INFO     Connecting to 192.168.1.230:443 for Vector-M2K2 using /Users/gaolu.li/.anki_vector/Vector-M2K2-009050ae.cert
2019-02-17 21:55:42,706 anki_vector.connection.Connection INFO     control_granted_response {
}Show camera
Say My lord, I found something interesting. Give me 5 seconds.
Say Prepare to take a photo
Say 3
Say 2
Say 1
Say Cheers
Save image
Show image = /Workspace/labs/Anki-Vector-AI/resources/latest.jpg
Display image on Vector's face...
Say Start to analyze the object
Detect labels, image = /Workspace/labs/Anki-Vector-AI/resources/latest.jpg
Labels: [mid: "/m/08dz3q"
description: "Auto part"
score: 0.6821197867393494
topicality: 0.6821197867393494
]
Show image = /Workspace/labs/Anki-Vector-AI/resources/latest.jpg
Display image on Vector's face...
Say Might be Auto part
Close camera
Say Over, goodbye!
2019-02-17 21:56:12,460 anki_vector.connection.Connection INFO     control_lost_event {
}2019-02-17 21:56:12,460 anki_vector.robot.Robot WARNING  say_text cancelled because behavior control was lost
2019-02-17 21:56:12,461 anki_vector.util.VisionComponent INFO     Delaying disable_all_vision_modes until behavior control is granted
2019-02-17 21:56:12,707 anki_vector.connection.Connection INFO     control_granted_response {
}Vector disconnected
You can find the latest photo that Vector uses to detention in resources/latest.jpg.Shoes placed
This program is to enable Vector to place shoes for us. Vector will place our shoes when we're not at home, so we can leave home without worry about the shoes, especially when we're in a hurry.This program is in research. I'll share the plan, the design, the docs, the codes here. I highly recommend you make an issue on GitHub so we can talk about it further if you're interesting, any help is welcome!The design proposal is in this Google doc. https://docs.google.com/document/d/10TQEdbIdcvCW8gNAUvVVSe1YxzFxsQExP_X33M3_Aos/edit?usp=sharingimageHere is a draft demo video I made to give you guys a sense of the program:image

Cozmo机器人脱离智能手机使用的不完全攻略相关推荐

  1. 机器人辅助的符文天赋_LOL6.15版本机器人辅助天赋符文出装全攻略

    在LOL6.15版本中,机器人的潜力很强,各大赛区对于机器人的选择率和胜率都是榜单上名列前茅的,那么LOL6.15版本机器人辅助天赋加点该怎么加?符文该怎么搭配?出装该怎么选择?下面今日首发小编就为大 ...

  2. csgo删除机器人_csgo1v1去除机器人 | 手游网游页游攻略大全

    发布时间:2016-08-14 我们都知道,恐怖机器人可以轻易扭转战局.它们不仅可以瘫痪你的装甲部队,使之成为对手的炮灰,也可以让MCV这种庞然大物去轻松碾死这些倒霉的车辆. 但恐怖机器人更突出的作用 ...

  3. 合作模式歌利亚机器人_歌利亚全任务流程图文攻略_歌利亚通关攻略_牛游戏网攻略...

    <歌利亚>一款角色扮演类游戏,玩家需要收集.打造名为"Goliath"的巨型机器人,与令人恐惧的庞大怪兽正面战斗,并求得生存.今天小编带来了"PauL_Han ...

  4. 星界边境机器人升级_《星界边境》图文攻略 全流程任务图文攻略

    主线任务-取得机器人的古物 老婆婆根据取得的线索,判断机器人的古物在一座城堡里,由某个奇怪的机器人看管着. 主角决定前去找他谈谈. 这个任务需要强力的武器和大量的恢复药剂,在前往城堡前,需要你升级武器 ...

  5. 大海贼探险物语机器人_大航海探险物语攻略大全 职业、宠物选择配色攻略汇总...

    第7页:队伍阵容配置 展开 队伍阵容配置 装备强化由于没赶上上个周五,都只强到15级左右,这周五双倍经验主力装备上25级没问题.装备水平如下: 这三天的收获有这些:装备抢了两把猩猩枪,一把软子叉 ...

  6. 重装上阵两个人合体机器人_重装上阵多人机甲合体攻略 机甲怎么合体

    重装上阵手游多人机甲是玩家之间合体组成的一类事物,其体积和强度远远超过单一的机甲,可在各种挑战中打出高额的收益.那么,重装上阵手游多人机甲怎么合体呢?多人机甲有什么组装技巧呢?相信这是不少玩家关心的问 ...

  7. 尼尔机械纪元游乐园怎么去机器人村_尼尔机械纪元图文攻略 系统教程+全任务剧情流程...

    尼尔机械纪元图文攻略,尼尔机械纪元是一款由白金工作室开发的动作游戏,故事背景设定在地球被外星机械生命体占领的时代,和有着相同的世界观,但是本作的剧情几乎和前作没什么关联.人类被逼着逃离地球,并在月球上 ...

  8. 卷毛机器人符文_卷毛分享锤石天赋攻略:守护者虚弱主w

    卷毛分享锤石天赋攻略:守护者虚弱主w 来源:网络 作者:阿姆斯特朗雷 时间:2020-04-30 好久没发英雄攻略了 今天给大家发一个锤石不同的天赋攻略:守护者虚弱主w的锤石!灵感是来自wevstes ...

  9. 机器人最新天赋符文天赋加点图_LOLS7机器人符文天赋加点_S7赛季机器人怎么出装_牛游戏网攻略...

    英雄联盟lolS7赛季蒸汽机器人布里茨天赋符文加点以及出装攻略,LOLs7赛季天赋符文改动很大,很多玩家不清楚机器人S7天赋符文加点,下面牛游戏小编就为大家带来LOL机器人s7天赋符文加点以及出装攻略 ...

最新文章

  1. 正则表达式最常用的符号匹配
  2. 一男子蒙冤入狱 10 天,竟是 AI 认错了!
  3. 关于C++指针的理解
  4. 2019最新Python学习路线图:如何用Python创建微信机器人
  5. 程序员必备的 10 大 GitHub 仓库
  6. 虚拟机中在红帽的Linux 下安装yum工具
  7. 微服务采用何种远程调用方式?
  8. 靠刷算法题,真的可以刷进大厂吗?
  9. 前端学习(2788):完成图片商品数据页面渲染
  10. linux getdents 例子,Linux内建命令和外部命令(整理)
  11. 04_SpringCloud 整合Ribbon细粒度配置自定义
  12. 【小记录】关于dojo中的on事件
  13. 使用某些 DOCTYPE 时会导致 document.body.scrollTop 失效
  14. mysql 小数点多余0_mysql中如何去除小数点后面多余的0
  15. 关乎Java多线程+Runnable和Thread…
  16. 蔡颖-《APS走向实践》书解读之三:供应、计划排程、供应链优化
  17. 驱动器空间、关节空间与笛卡尔空间
  18. kitty猫的基因编码
  19. 关于接口连续调用,查询数据库数据不一致的情况
  20. 五个问题搞清气候数据怎么用,包括台风山竹能否预测?

热门文章

  1. Android Studio实现推箱子小游戏
  2. 自然语言处理 特征提取
  3. (十六)Alian 的 Spring Cloud Eureka 集群配置(主机名方式)
  4. Pygame(八)事件(1)
  5. Python —交集
  6. osgi官网demo,idea整合osgi
  7. mysql decimal 实现_mysql中decimal的使用
  8. 通信网络中的数据透传
  9. 如何在storyboard设置圆角(cornerRadius)、边框(borderWidth)等操作。
  10. Hudi学习02 -- Hudi核心概念