ros control学习笔记3

http://wiki.ros.org/ros_control
https://github.com/ros-controls/ros_control/wiki

在一开始学习笔记1中,将controllers部分看完后,转头去看了joint_trajectory_controller 相关内容。
回过头来继续:

Hardware Interfaces

  硬件接口由ROS控制与上述一个ROS控制器共同使用,用于向硬件发送和接收命令。ros wiki该页面列出了一些已有的硬件接口,当然开发者可根据自己需求定义自己的接口。

  • Joint Command Interface 支持机器人关节
    包含以下:
    Effort Joint Interface
    Velocity Joint Interface
    Position Joint Interface
  • Joint State Interfaces 支持查阅关节状态
  • Actuator State Interfaces 支持查阅执行器状态
  • Actuator Command Interfaces
    包含以下:
    Effort Actuator Interface
    Velocity Actuator Interface
    Position Actuator Interface

http://docs.ros.org/en/melodic/api/hardware_interface/html/c++/annotated.html

https://github.com/ros-controls/ros_control/wiki

Transmissions

传输是控制管道中的一类元素(element)。
用于转换 effort/flow variables,从而令prodect-power保持不变。传输接口的实现会将 effort/flow variables 映射到 输出的effort/flow variables。同时保持功率不变。
机械传动是一种保持动力(power)的变换。
transmission_interface

力乘以时间是冲量,冲量是矢量,既有大小,又有方向,单位是NS。
力乘以位移是功,功是标量,只有大小,没有方向,单位是J(焦耳)。
力与速度的乘积为功率。
More generally, power is the product of an effort (eg. force, voltage) and a flow (eg. velocity, current) variable.

P_in        = P_out
F_in x V_in = F_out x V_out
effort map: F_joint = F_actuator * n
flow map:   V_joint = V_actuator / n
From the above it can be seen that power remains constant between input and output.

他这里给了一个补充链接,但正常无法打开。
科学上网后:该网页是维基百科,讲的是物理力作用能量转换的关系。

Transmission URDF Format

  传输元素是URDF机器人描述模型的扩展,该模型用于描述执行器和关节之间的关系。这使得人们可以对齿轮比和并联机构等概念进行建模。变速器会转换作用力/流量变量,使其产品(功率)保持不变。多个执行器可以通过复杂的传输连接到多个接头(关节)。
https://wiki.ros.org/urdf/XML/Transmission

 1 <transmission name="simple_trans">
   2   <type>transmission_interface/SimpleTransmission</type>
   3   <joint name="foo_joint">
   4     <hardwareInterface>EffortJointInterface</hardwareInterface>
   5   </joint>
   6   <actuator name="foo_motor">
   7     <mechanicalReduction>50</mechanicalReduction>
   8     <hardwareInterface>EffortJointInterface</hardwareInterface>
   9   </actuator>
  10 </transmission>

注意 actuator中的两个标签是可选的,其中hardwareinterface需要注意ros版本,kinetic这里是不需要的。正确的位置是在joint中。
https://github.com/ros-controls/ros_control/issues/164
这里讲明了gazebo ros control在Hydro版本是从actuator中进行hardware interfaces解析的,然后从indigo被修正了。
https://github.com/ros-simulation/gazebo_ros_pkgs/issues/52
里面主要是这句话:

Fully actuated transmissions don’t require to separately specify
hardware interfaces for actuators and joints, so the hardware
interface could be a transmission-level property, specified only once,
like so
13年,后面貌似是两三个人商量不断修改,才得到了这个最终版本。
之后14年又有修改,就有了最上面的。

Transmission Interfaces

  1. Simple Reduction Transmission
  2. Differential Transmission Four Bar
  3. Linkage Transmission
Usages:
transmission_interface::ActuatorToJointStateInterface to populate joint state from actuator variables.
hardware_interface::JointStateInterface to expose the joint state to controllers.

控制器本身不使用transmission接口(它不实现硬件接口),而是在控制器更新之前或之后,在机器人抽象的read()和write()方法(或等效方法)中运行。
附加介绍链接:
http://wiki.ros.org/transmission_interface?distro=noetic
给了个代码例子:
https://github.com/ros-controls/ros_control/wiki/transmission_interface

Joint Limits

joint limit interface本身不实现硬件接口的功能。在机器人抽象层。
强制执行限制将覆盖控制器设置的命令,它不会在单独的原始数据缓冲区上运行。
这里又冒出来了一个跟安全有关的Soft joint limits
https://wiki.ros.org/pr2_controller_manager/safety_limits
例子:
https://github.com/ros-controls/ros_control/wiki/joint_limits_interface

Additional Examples

ros wiki页面上还给出了一些别的例子。

controller_manager

最后再看看控制器管理器相关概念。
提供 hard-realtime-compatible loop
which is represented by a hardware_interface::RobotHW instance (see the hardware_interface package)
The controller_manager provides the infrastructure to load, unload, start and stop controllers.

The controller manager provides the infrastructure to interact with controllers. Depending on if you’re running controllers from a launch file, from the command line or from a ROS node, the controller manager provides different tools to run controllers.

其实就是可以通过一些命令来加载,停止或者是查看各类控制器。

总结

到这里其实大致的把有关接口的概念过了一遍。
ros有关的内容实在是太零散了,在查询相关概念时往往是链接套着一个链接。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值