ROS基础ppt课件_第1页
ROS基础ppt课件_第2页
ROS基础ppt课件_第3页
ROS基础ppt课件_第4页
ROS基础ppt课件_第5页
已阅读5页,还剩17页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、(Robot Operating System, ROS),湖南大学 电气与信息工程学院,1,1、ROS的定义,Linux操作系统,ROS开发环境,Hans Cute,TurtleBot2,ROS is robotics middleware (i.e. collection of software frameworks for robot software development).,2,串口协议,ROS环境,串口协议,机械臂,1.将机械臂发送上来的信息以话题的形式发布 在ROS环境中 如:/joint1_controller/state /claw_controller/state,2.将

2、话题信息转换成机械臂所需要的串口信息 如:/joint1_controller/command /claw_controller/commmand,3,也就是说,ROS环境,键盘(节点),手柄(节点),平板(节点),机器人底盘(节点),4,2、ROS的基本概念,1、节点管理器master: master在整个网络通信架构里相当于管理中心,管理着各个node。node首先在master处进行注册,之后master会将该node纳入整个ROS程序中。 2、node之间的通信也是先由master进行“牵线”,才能两两的进行点对点通信。,5,理解话题(topic),node2,master,node1

3、,注册节点 publish topic,注册节点 subscribe topic,/topic_name,/topic_name,/topic_name,基本的msg包括bool、int8、int16、int32、int64(以及uint)、float、float64、string、time、duration、header、可变长数组array、固定长度数组arrayC。,topic是ROS中的一种单向的异步通信方式。然而有些时候单向的通信满足不了通信要求,比如当一些节点只是临时而非周期性的需要某些数据,如果用topic通信方式时就会消耗大量不必要的系统资源,造成系统的低效率高功耗。,6,理解

4、服务(service),nodeA (client),nodeB (server),/service,request,reply,Service是同步通信方式,所谓同步就是说,此时Node A发布请求后会在原地等待reply,直到Node B处理完了请求并且完成了reply,Node A才会继续执行。Node A等待过程中,是处于阻塞状态的成通信。这样的通信模型没有频繁的消息传递,没有冲突与高系统资源的占用,只有接受请求才执行服务,简单而且高效。,7,话题和服务的对比,8,3、ROS文件系统,1、创建工作空间,$ mkdir p catkin_ws/src #创建工作空间 $ cd catki

5、n_ws #进入工作空间 $ catkin_make #编译 catkin_ws/src /Cmakelists.txt /build /devel,catkin_make的工作流程,9,创建package,2、创建包,$ cd catkin_ws/src #进入工作空间的src下 $ catkin_create_pkg package_name std_msgs rospy roscpp catkin_ws/src /package_name /, CMakeLists.txt #package的编译规则(必须) package.xml #package的描述信息(必须) src/ #源代码

6、文件 include/ #C+头文件 scripts/ #可执行脚本 msg/ #自定义消息 srv/ #自定义服务 models/ #3D模型文件 urdf/ #urdf文件 launch/ #launch文件,10,自定义发布topic,/talker,/listener,publish,/chatter,subscribe,bool、int8、int16、int32、int64、uint、 float、float64、string、time、duration、 header、可变长数组array、固定长度数组arrayC,发布任何名称的话题,任意数据:,以某一频率,11,自定义servi

7、ce,/client,/server,发送请求,接收回复,bool、int8、int16、int32、int64、uint、 float、float64、string、time、duration、 header、可变长数组array、固定长度数组arrayC,12,sudo apt-get install kdevelop,13,14,回顾:ROS的定义,Linux操作系统,ROS开发环境,Hans Cute,TurtleBot2,ROS is robotics middleware (i.e. collection of software frameworks for robot softw

8、are development).,15,The ROS controller will not directly communicate with the hardware, instead of that, the robot hardware interface can talk with hardware. The main function of the hardware interface is that it will act as a mediator between ROS controllers and the Real Hardware/Simulator.,ROS co

9、ntroller,16,urdf和xarco,Unified Robot Description Format,统一机器人描述格式,简称为URDF。 ROS中的urdf功能包包含一个URDF的C+解析器,URDF文件使用XML格式描述机器人模型。,robot: This tag encapsulates the entire robot model that can be represented using URDF. Inside the robot tag, we can define the name of the robot, the links, and the joints of

10、the robot.The syntax is as follows: . . . . .,17,link: The Visual section represents the real link of the robot, and the area surrounding the real link is the Collision section. The Collision section encapsulates the real link to detect collision before hitting the real link., . ., . . . . .,18,joint: The joint tag supports the different types of joints such as revolute, continuous, prismatic, fixed, floating, and planar, . . . . .,19, . ., . . . . .,20,学

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论