ROS文件系统
catkin编译的工作流程
- 在工作空间catkin_ws/src/下递归的查找其中每一个ROS的package。
- package中会有package.xml和CMakeLists.txt文件,Catkin(CMake)编译系统依据CMakeLists.txt文件,从而生成makefiles(放在catkin_ws/build/)。
- 然后make刚刚生成的makefiles等文件,编译链接生成可执行文件(放在catkin_ws/devel)。
工作空间结构
- src: ROS的catkin软件包(源代码包)
- build: catkin(CMake)的缓存信息和中间文件
- devel: 生成的目标文件(包括头文件,动态链接库,静态链接库,可执行文件等)、环境变量
ROS通信架构
Node
最小的进程单元就是节点(node)。通常一个node负责者机器人的某一个单独的功能。roslaunch能够一次性把多个节点按照我们预先的配置启动起来。
Topic
异步性:在node1每发布一次消息之后,就会继续执行下一个动作,至于消息是什么状态、被怎样处理,它不需要了解。ROS是一种分布式的架构,一个topic可以被多个节点同时发布,也可以同时被多个节点接收。
Service
Service是同步通信方式,所谓同步就是说,此时Node A发布请求后会在原地等待reply,直到Node B处理完了请求并且完成了reply,Node A才会继续执行。Node A等待过程中,是处于阻塞状态的成通信。service不能重名。srv文件是用来描述服务。
TF与URDF
Link
The link element describes a rigid body with an inertia, visual features, and collision properties.
- Attributes: name
- Elements: inertial , visual , collision
Joint
The joint element describes the kinematics and dynamics of the joint and also specifies the safety limits of the joint.
- Attributes: name, type (revolute, continuous, prismatic, fixed, floating, planar)
- Elements: origin (This is the transform from the parent link to the child link. The joint is located at the origin of the child link)
参考文献
[1] http://wiki.ros.org/urdf/XML
[2] https://sychaichangkun.gitbooks.io/ros-tutorial-icourse163/content/