机器人操作系统ROS现状与应用实例ppt课件

上传人:pu****.1 文档编号:579263181 上传时间:2024-08-26 格式:PPT 页数:59 大小:5.64MB
返回 下载 相关 举报
机器人操作系统ROS现状与应用实例ppt课件_第1页
第1页 / 共59页
机器人操作系统ROS现状与应用实例ppt课件_第2页
第2页 / 共59页
机器人操作系统ROS现状与应用实例ppt课件_第3页
第3页 / 共59页
机器人操作系统ROS现状与应用实例ppt课件_第4页
第4页 / 共59页
机器人操作系统ROS现状与应用实例ppt课件_第5页
第5页 / 共59页
点击查看更多>>
资源描述

《机器人操作系统ROS现状与应用实例ppt课件》由会员分享,可在线阅读,更多相关《机器人操作系统ROS现状与应用实例ppt课件(59页珍藏版)》请在金锄头文库上搜索。

1、机器人与信息自动化研究所机器人与信息自动化研究所机器人与信息自动化研究所机器人与信息自动化研究所Institute of Robotics & Automatic Information SystemInstitute of Robotics & Automatic Information System每周工作报告 南开大学机器人与信息自动化研究所ROS-RobotOperatingSystem:现状与应用实例李宝全李宝全南开大学南开大学 :2014-7-3南开大学首届机器人学博士生论坛南开大学首届机器人学博士生论坛1Institute of Robotics and Automatic In

2、formation SystemInstitute of Robotics and Automatic Information System ROS-RobotOperatingSystemWhatWhat&WhyWhy现状现状HowHow&ResultsResults几个应用例程Sum-Sum-marymary综合实例:体感远程控制2Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 应用火爆的ROSROSRepositorie

3、s(50)Map:3Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 应用火爆的ROSRobotics&AutomationMagazine,IEEE该杂志上设立了专题讨论区:ROSTopics下方图片是在最新一期中ROSTopics的论文4Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Infor

4、mation System 应用火爆的ROS新加坡南洋理工大学(NTU)机器人相关实验室大家都在用,已经形成了全民一起上的局面所见的应用设备:Pioneer3AT/DXKinectAR.DroneTurtleBot5Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS体系Main:由WillowGarage公式维护核心部分程序Universe:全球范围的代码,由其它个人/组织维护相关知识库(Repository),即功能包(

5、例如先锋机器人的ROSARIA,Kinect的openni_tracker,语言识别pocketsphinx)6Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 几点说明虽然ROS的名字为“机器人操作系统”,但不是真正的操作系统,只是说它可以提供类似于操作系统的一些服务,比如底层通讯,分布式控制。对于机器人的相关功能,不使用ROS也能实现.但ROS使得机器人软件搭建的工作更方便,效率更高。7Institute of Roboti

6、cs and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS的程序的核心节点即可执行文件由.cpp文件编译生成而来(指C+)节点之间的通讯节点间信息的发布与接收PublishSubscribe8Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 节点将整个工程(Project)模块化,每个节点即为一个模块。

7、每个节点都可以单独维护,比如现在有N个节点已经在运行了,用户可以再编写第N+1个节点,然后编译,然后运行,即有N+1个节点共同运行。每个节点有唯一的名字节点之间可借助网络跨主机共同运行.9Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 节点之间的通讯发布者Publisher订阅者Subscriber话题:发布者与订阅者之间的通讯方式话题的名称:Topic:发布者与订阅者之间数据传输“管道”的名字,为一字符串消息:Message

8、:传输数据的类型,例如int,char,自定义类型。10Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS-RobotOperatingSystemWhatWhat&WhyWhy现状HowHow&ResultsResults几个应用例程几个应用例程Sum-Sum-marymary综合实例:体感远程控制11Institute of Robotics and Automatic Information SystemInstit

9、ute of Robotics and Automatic Information System ROS的几个例程Hello world图像先锋机器人P3AT/P3DXKinectSkeletonVoiceNetwork通讯12Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System HelloWorld程序节点:2个节点talker(talker.cpp):包含一个发布者节点listener(listener.cpp):包含一个接收者

10、节点间的通讯:Topic(话题的名称):“chatter”Message(传递的数据类型):std_msgs:StringString为ROS自定义的数据类型String中包含唯一变量为std:stringdata13Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System HelloWorld程序14Institute of Robotics and Automatic Information SystemInstitute of R

11、obotics and Automatic Information System HelloWorld程序15Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System HelloWorld程序16Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System HelloWorld程序1

12、7Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS的几个例程Helloworld图像图像先锋机器人P3AT/P3DXKinectSkeletonVoiceNetwork通讯18Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS的几个例程:图像图像的发

13、布:对应ROS中的Publisher.以如下三个图像源举例:Kinect的RGB摄像头笔记本内置摄像头外接USB摄像头图像的接收:对应ROS中的Subscriber图像的处理:可以与OpenCV相结合(OpenCV与ROS均属于WillowGarage公司,所以.)用户可以在该步骤中进行任意的图像处理操作(“soyoucandoeverythinginthisstep”)图像的显示:与OpenCV相结合19Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Infor

14、mation System 图像的发布:Kinect的RGB摄像头首先对Kinect设备进行配置,并进行初始化由于Kinect与ROS相互支持,因此配置过程非常简便初始化Kinect的过程就是发布一些列Topic的过程,这些Topic包括:/camera/rgb/image_color:该话题即对应于我们需要的RGB图像数据至此图像发布的任务完毕若想把图像显示出来,需要进行下一节“图像的接收与显示”/camera/rgb/image_raw:RGB图像的原始数据/camera/grey:这是灰度图像/camera/depth:这是场景深度图像20Institute of Robotics an

15、d Automatic Information SystemInstitute of Robotics and Automatic Information System 图像的发布:Kinect的RGB摄像头图图: Rviz中显示出的中显示出的Kinect发布的点云信息发布的点云信息21Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 图像的发布:笔记本内置摄像头对于笔记本内置USB摄像头的图像获取,要比Kinect复杂.这是由

16、于ROS对Kinect的支持包括了图像Topic的发布,而对于计算机的内置/外置USB摄像头,需要我们自己做些操作下载usb_cam包:t.包含如下3个文件/usb_cam.h/usb_cam.cpp:由于是在Ubuntu(12.04)系统下进行的,因此里面用到了Linux的V4L2视频驱动与服务/usb_cam_node.cpp摄像头的图像在此节点中发布22Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 图像的发布:笔记本内

17、置摄像头23Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 图像的发布:外置USB摄像头也需要利用包usb_cam由于外接USB摄像头的设备名为video1,因此将设备名的语句修改为除此之外,其它操作与上一节的内置摄像头图像发布一致24Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Informa

18、tion System 图像的接收,处理与显示ROS的图像数据使用sensor_msgs/Image的消息格式CvBridge:属于ROS的库,在vision_opencv(堆stack)/cv_bridge(包package)/image_geometry中.用以转换sensor_msgs/Image至cv:Mat该部分功能:从相应Topic中获得sensor_msgs:Image图像信息(接收者),并将其转化为cv:Mat的形式,并显示图像。当然,该部分首先需要图像源来发布一个图像Topic,例如上节的Kinect,内置USB摄像头,外接USB摄像头25Institute of Robot

19、ics and Automatic Information SystemInstitute of Robotics and Automatic Information System 图像的接收,处理与显示26Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 图像的接收,处理与显示27Institute of Robotics and Automatic Information SystemInstitute of Robotic

20、s and Automatic Information System 图像的接收,处理与显示上页的image_converter节点对应于图像发布源为Kinect,若想要获得外置/内置摄像头的图像时,将订阅者的Topic改为“/image_raw”即可.改为因此将该节点修改后重新编译并运行,便可以继续获取另一个图像源的图像.这也体现了ROS的代码维护非常灵活.28Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 图像的接收,处理

21、与显示29Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS的几个例程Helloworld图像先锋机器人先锋机器人P3AT/P3DXKinectSkeletonVoiceNetwork通讯30Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 先锋机器人P3A

22、T/P3DXP3AT/P3DX的配置角速度和线速度控制量的发布控制量发布的节点:对应Publisher控制量的接收控制量接收的节点:对应Subscriber即控制机器人的运动31Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System P3AT/P3DX的配置由于P3AT是串口通讯,我的笔记本上仅有USB口,因此首先需要配置USB转串口.安装ROSARIAARIA是ActivMedia公司为先锋机器人提供的驱动与服务由于该公司也支持RO

23、S,因此发布了ROSARIA版本32Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 角速度和线速度控制量的发布话题名称/RosAria/cmd_vel“该话题名称要与下一节接收节点中的一致消息类型为ROS自定义的:geometry_msgs:Twist在该Twist数据结构中,包括了角速度控制量与线速度控制量33Institute of Robotics and Automatic Information SystemInst

24、itute of Robotics and Automatic Information System 角速度和线速度控制量的发布34Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 控制量的接收首先下载包rosaria:该包中含有RosAria.cpp文件将该文件编译为节点RosAria,并运行该节点节点RosAria的功能:接收上节的Twist数据结构(即订阅者),Twist中含有角速度与线速度的数据.将控制量发送给先锋机器人

25、,即让机器人做相应运动.35Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 控制量的接收36Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS的几个例程Helloworld图像先锋机器人P3AT/P3DXKinectSkeleton(人体骨骼识别人体骨骼识

26、别)VoiceNetwork通讯37Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System KinectSkeleton由于用到了Kinect的骨骼识别,因此首先需要安装NiTE之后下载包openni_tracker:openni_tracker节点将用户的骨骼位置发布(发布者)Topic为“/tf”Message为tf2_msgs:TFMessage,一个TFMessage的对象包括了一个关节的位置与姿态信息38Institute

27、of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System KinectSkeleton39Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System KinectSkeleton40Institute of Robotics and Automatic Information SystemInstit

28、ute of Robotics and Automatic Information System KinectSkeleton图图: Rviz显示出的发布的显示出的发布的tf的信息的信息41Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS的几个例程Helloworld图像先锋机器人P3AT/P3DXKinectSkeletonVoiceNetwork通讯42Institute of Robotics and Automa

29、tic Information SystemInstitute of Robotics and Automatic Information System Voice语音识别语言发布综合:声音的接收与发声43Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System Voice:语言识别包pocketsphinx的安装与配置pocketsphinx用以语言识别,并发布(Publish)识别结果String识别结果的接收与显示将pockets

30、phinx发布的String其获取(Subscribe)后从屏幕上显示44Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System Voice45Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System Voice:语言发布包sound_play的安装与配置利用程序来控制发声46

31、Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System Voice:综合:声音的接收与发声利用pocketsphinx对语言进行识别,并以String的消息类型来发布接收pocketsphinx发布的String将String显示到屏幕上发声:将String朗读出来当然也可以朗读其它语句,即实现了人机之间的对话47Institute of Robotics and Automatic Information SystemInstitu

32、te of Robotics and Automatic Information System Voice:综合:声音的接收与发声48Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS的几个例程Helloworld图像先锋机器人P3AT/P3DXKinectSkeletonVoiceNetwork通讯通讯49Institute of Robotics and Automatic Information SystemInst

33、itute of Robotics and Automatic Information System Network通讯(以两主机为例)ROS的分布式特点:对两主机进行简单配置后,若有相同的Topic,则节点之间即可跨主机利用网络进行通讯.因此网络通讯/控制变为十分简单.实验场景:取名为”hal”的电脑上连接先锋机器人P3AT,并连接Wifi取名为”marvin”的电脑(我的笔记本)没有连接设备,但与”hal”连接了同一个Wifi目标:让”marvin”将先锋机器人的控制命令通过Wifi发送给”hal”,然后”hal”再把此命令发送给先锋机器人50Institute of Robotics a

34、nd Automatic Information SystemInstitute of Robotics and Automatic Information System Network通讯(以两主机为例)51Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS-RobotOperatingSystemWhatWhat&WhyWhy现状HowHow&ResultsResults几个应用例程Sum-Sum-marymary综合

35、实例综合实例: :体感远程控制体感远程控制52Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS综合实例:实验目标通过网络,远程控制机器人的运动使用者在Kinect前移动,当距离Kinect超过1米时,让远方的机器人做前进运动;当距离Kinect小于1米时,让机器人后退;并且机器人的运动速度与使用着距Kinect1米的误差成正比.将上一章“几个应用例程”结合在了一起.53Institute of Robotics and

36、Automatic Information SystemInstitute of Robotics and Automatic Information System ROS综合实例:实验场景取名为”hal”的电脑上连接先锋机器人P3AT,并连接Wifi取名为”marvin”的电脑(我的笔记本)连接了Kinect,并与”hal”连接了同一个Wifi54Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS综合实例:实现方法通过K

37、inect读取用户的骨骼位置(KinectSkeleton)根据用户的头部位置,主机“marvin”来设计P3AT的线速度量.通过Wifi将机器人的速度控制量传到主机“hal”上“hal”将速度控制量发送到P3AT上55Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System ROS综合实例:框架56Institute of Robotics and Automatic Information SystemInstitute of Ro

38、botics and Automatic Information System ROS综合实例:视频展示1_Kinetct-P3AT_TrackingPeople.mp42_ControlThroughNetwork.mp43_withMe综合.mp457Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System 总结与展望总结ROS的应用已非常火爆介绍了ROS的几个典型应用,并给出了一综合实例展望ROS整合了世界范围内的很多很强大的功能,比如语言的识别与发布,骨骼位置获取,可以使机器人更智能.ROS的模块化特点,使得代码易于维护ROS本身是基于分布式的,因此网络通讯/控制变为十分简单58Institute of Robotics and Automatic Information SystemInstitute of Robotics and Automatic Information System Q & A Thanks!59

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 工作计划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号