【转载】Sim2Real问题[3]

原文链接
原创 Cong Wang
2月17日
微信公众号:robot_learning123

今天来看一篇paper: Setting up a Reinforcement Learning Task with a Real-World Robot, 主要是以UR5为例, 分析了RL在实际机器人task中遇到的问题, 对于研究真机实验有一定的帮助. 作者后续增加了移动机器人和舵机的控制, 发表在CoRL2018 Benchmarking Reinforcement Learning Algorithms on Real-World Robots. 不过今天主要看第一篇, 因为里面有很多与机械臂相关的分析(其实是因为我在用UR5啊~).

Kindred公司

Kindred是一家成立于2014年的公司, 致力于AI-Powered Robots, 也算是产学研结合了. 具体感兴趣的可以去了解一下, 几个官网的视频(稍有不同,具体参见原文

Kindred 公司的 Robots(1)

Kindred 公司的 Robots(2)

Paper概述

一个好的Benchmark对于一个领域的发展能够起到积极的促进作用, 比如CV中的ImageNet, RL中的OpenAI Gym. 同台竞技, 八仙过海, 各显神通. 但是, 当前RL在应用到真实世界机器人时是缺乏有效的guidelines, 所以作者采用UR5开发了一个直接在真实世界进行学习的task, 希望能够成为一个通用的benchmark. 该task也不复杂, 模仿的是Gym Reacher, 包括2D的Reacher task和3D的Reacher task, 就是让UR5末端到达工作空间内一个指定的目标点.
在这里插入图片描述
Task: UR-Reacher-2
在这里插入图片描述
Task: UR-Reacher-6

UR5 Reacher Task

UR5是一个轻量级的协作型机械臂, 底层控制器是URControl, 可以通过TCP/IP进行通讯, 通过脚本URScript进行编程控制, 实时通讯的周期是8ms, 也就是125Hz. 每一个数据packet包含所有关节的位置, 速度, 加速度, 电流. URScript中的servoj提供位置控制, speedj提供速度控制, 没有力矩控制.
Task中的状态空间包括:

  • joint angles

  • joint velocities

  • vector difference between the target and the fingertip coordinates

  • previous action (be helpful for learning in systems with delay)

    奖励函数: , 其中是target与fingertip之间的Euclidean distance. 每一个episode的时间是4s. 另外定义了fingertip的有效工作空间, 目标位置也是随机在里面进行选取.

关键因素分析

下面就是分析几个在仿真中不太关注, 但是在真实机器人上比较重要的因素.

1. Concurrency, ordering and delays of computations

在仿真中, agent与environment之间的计算同步一般都不是问题, 但是真实世界就不一样了. 下图是仿真与真实世界的RL流程. 真实机器人上agent获得机器人的状态反馈通常都会有延时, 这对于agent的学习和机器人的控制都会有一定的影响. 作者将task的实现分成两部分: robot communication process和reinforcement learning process. Robot部分又分成sensor thread和actuator thread两个独立线程, 以8ms的时间周期运行. RL部分也是分成两个线程, learning update和action有一定的独立性, 和仿真相区别.
在这里插入图片描述

2. The medium of data transmission

作者通过测试发现, 有线TCP/IP连接的8ms周期实际值是[7.8,8.6]ms, 而如果换成无线的WiFi连接, 则变成[0.2,127]ms.
在这里插入图片描述

3. The rate of sending actuation commands to the Robot

不同机器人的控制方式不同, UR5 Reacher中选择默认的8ms.

4. The action cycle time

action cycle time, 也即time-step duration, 就是agent策略更新相邻两个action序列之间的时间. 选择一个合适的时间并不是显而易见的, 文献中也没有很多可供参考的内容. 太长或者太短的周期都可能会有问题, 作者针对这个任务选择的周期是40ms, 并且对不同长短时间周期的影响进行了比较.
5. The action space: position vs velocity control

真实世界的action space选择是比较困难的, 因为一般机器人在设计的时候并没有考虑learning这个过程. 很多仿真中的机器人会选择力矩作为action, 实际的UR5可以以8ms的周期发送位置或者速度指令进行控制. 直接位置控制存在一些问题, 因为policy初始阶段随机生成的动作可能导致运动不连续或急停等, 而速度控制就会平滑很多. 因此选择速度控制作为baseline, 平滑后的位置控制作为对比. 此处速度限制为[-0.3,+0.3] rad/s, 加速度限制为1.4 rad/s2. 位置控制需要平滑两次才能避免大的抖动. 下图实验也表明速度控制与电机的反馈信号相关性比位置控制要好.
在这里插入图片描述

实验对比

下图就是不同因素对学习过程的影响. 作者认为, 系统延时和action space的选择对learning性能的影响最大, action cycle time相对较小.
在这里插入图片描述

结论

作者最后得出来的几条结论, 有助于指导我们的实验:

  • System delays occurring in different computational stages are generally detrimental to learning. Consequently, wired communications are preferable to the wireless ones. (有线优于无线)

  • Too small action cycle times make learning harder. Too long action cycle times also impede performance as they reduce precision and cause slow data collection. (选择合适的动作时间周期)

  • Choosing action spaces where actions are applied more directly to the robot makes learning easier by having more direct relationships with future observations. (尽量选择对状态影响比较直接的action space)

  • Due to reduced delays, some concurrent computations are preferable to sequential computations of conventional simulated tasks. (对RL过程合理划分, 降低延时)

资源

Code: https://github.com/kindredresearch/SenseAct
Paper: https://arxiv.org/pdf/1803.07067.pdf

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一些Sim2Real挑战赛的学习资料: 1. Sim-to-Real Reinforcement Learning for Robotics: A Reality Gap is a challenge in robotics where models trained in simulation often fail to perform well in the real world. This paper examines the problem and proposes a sim-to-real approach to reinforcement learning for robotics. 2. Sim2Real Viewpoint Invariant Visual Servoing by Recurrent Control: This paper proposes a view-invariant visual servoing technique that can generalize well from simulated to real-world environments. 3. Sim-to-Real Transfer of Robotic Control with Dynamics Randomization: This paper introduces a method of training robots in simulation using randomized dynamics and then transferring the learned control policies to the real world. 4. Sim-to-Real Transfer for Deep Reinforcement Learning with Safe Exploration: This paper proposes a method for safe exploration in Sim2Real transfer for deep reinforcement learning. 5. Sim2Real View-Invariant Visual Servoing by Combining Simulation and Deep Learning: This paper proposes a view-invariant visual servoing technique that combines simulation and deep learning to achieve robustness to viewpoint changes. 6. Sim2Real Transfer for Robotic Manipulation: A Survey: This paper provides a comprehensive survey of the existing literature on Sim2Real transfer for robotic manipulation. 7. OpenAI Robotics: Sim2Real Transfer: This blog post by OpenAI provides an overview of Sim2Real transfer for robotics and highlights some of the challenges and opportunities in the field. 8. NVIDIA Research: Sim-to-Real Transfer Learning for Robotics: This video by NVIDIA Research provides an overview of Sim2Real transfer learning for robotics and showcases some of the recent advancements in the field. 9. Sim-to-Real Transfer of Robotic Control with Deep Reinforcement Learning: This paper proposes a method for Sim2Real transfer of robotic control using deep reinforcement learning and demonstrates its effectiveness on a real-world robotic arm. 10. Sim-to-Real Transfer of Control Policies for Robotics using Adversarial Domain Adaptation: This paper proposes a method for Sim2Real transfer of control policies for robotics using adversarial domain adaptation and demonstrates its effectiveness on a real-world robotic arm.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值