七段S型加减速算法--多轴时间同步方案调研

基本概念

7段S型加减速算法(7 segments S-curve velocity profile),是由T型加速度曲线(Trapezoidal motion profile)演化而来(此外,还有多项式规划(Polynomial Profile),如三次多项式、五次多项式、七次多项式等。虽然五次以上多项式曲线可以让速度加速度都连续变化,但速度曲线没有匀速运动时间,不利于对加减速过程进行优化。),通过在速度曲线的加速段与匀速段之间增加抛物线(parabolic)或者三角函数(triangular)过度,是的加速度平滑(smooth)过渡,从而解决了加区间两端速度不连续(discontinuous)的问题。顾名思义,典型的7段S型加速度曲线包括如下7段:加加速(increase acceleration)、匀加速(constant acceleration)、减加速(decrease acceleration)、匀速、加减速(increase deceleration)、匀减速(constant deceleration)、减减速(decrease deceleration)。通过指定始末位移量(displacement),最大允许转速(Vel)、最大允许加速度(acc)、以及加加速度(jerk),在减少对系统冲击与振动的前提下,充分利用电机伺服性能,以最快的速度(时间最短,)完成运动插补。

问题提出

多轴联动必须考虑时间同步(synchronize),这本质上是一个 non-convex optimization 问题 ,Since there are constraints on initial and final velocities which can be non-zero it is necessary to synchronize each DOF in time 。 Suppose DOF ii takes time TT to reach its destination, you need to synchronize other DOFs with time t=Tt=T, because DOF ii cannot go any faster 。

参考资料

链接: robotics.stackexchange.com/generating-double-s-curve-velocity-profiles-with-given-time.

参考一:

解决方案:velocity profile stretching,we stretch the velocity profile such that it has duration as specified earlier。

链接1

看这篇文章,可能要翻一下.
先分别求出每个独立关节的S曲线,以总规划时间最短(或运动距离最远)的关节时间T为优化对象,再对其他关节进行速度优化调整。

链接2

github.com/rdiankov/openrave.
相比上篇,约束条件少一些,并且给出了实现过程以及源码。
必须指出的是, given a duration tt to synchronize a trajectory with, the problem is not always feasible due to inoperative time interval (参考2有提到). Basically, due to velocity and acceleration limits of the robot joints, given a set of boundary conditions (such as initial and final velocities), there might exists some time interval t = [ t0 , t1 ] such that there exists no trajectory which satisfies the boundary conditions and has a duration t.

链接3

Trajectory Planning for Automatic Machines and Robots.
By Long Smith:I have found a solution. Quiet simple actually. To generate minimum time double s-curve profile I used algorithm presented in the wonderful book above. After computing trajectory for the first DOF I perform the same algorithm for the other DOFs but if trajectory is infeasible with given time, it is appeared to be a good idea to make maximum possible acceleration smaller and smaller with some factor(I use 0.95) which leads to longer trajectory execution. Moreover we can do the same with maximum velocity and jerk constraints which will make more trajectories to be feasible. However this will take significantly more time and since all my tests passed with only decreasing acceleration I am satisfied.

参考二

google search key words: s-curve profile synchronize PDF
养成使用Google的好习惯,关键字后面加一个 PDF 。这部分尚未具体展开,大家可以自行调研。

实现方案

对于七段S加减速,这里不再赘述,可以参考一下几篇博文:
CSDN博主–septembernine–S形加减速.
CSDN博主–勤为本–【龙印】步进电机使用七段式抛物线型S曲线加减速和路径规划的理论分析和实现.
这里,主要基于已有的S加减速算法,以及链接2、3(链接2中有S加减速github源码),增加多轴时间约束,达到多轴时间同步的目的。

后续

后续会持续跟进,后期会更新处理结果以及相关资源。感兴趣的同学欢迎私我进行沟通。
更新于20210129:鉴于私下很多人联系我讨论多轴同步与指定时间规划的问题,这里补充说明一下:本人近期打算开始对这一块对相关C代码进行测试整理,到时会分享源码,欢迎做机械臂轨迹插补的同行一起交流哈

引用\[2\]:transition 属性是一个简写属性,用于设置四个过渡属性: transition-property 规定设置过渡效果的 CSS 属性的名称。 transition-duration 规定完成过渡效果需要多少秒或毫秒。 transition-timing-function 规定速度效果的速度曲线。 transition-delay 定义过渡效果何时开始。 根据你提供的信息,7段S型加减速算法是一种过渡效果的算法。在CSS中,可以使用transition属性来实现这种效果。具体的实现步骤如下: 1. 设置transition-property属性,指定要过渡的CSS属性的名称。 2. 设置transition-duration属性,指定完成过渡效果需要的时间。 3. 设置transition-timing-function属性,指定速度效果的速度曲线。对于7段S型加减速算法,可以使用cubic-bezier函数来定义自定义的速度曲线。 4. 设置transition-delay属性,定义过渡效果何时开始。 通过使用这些属性,你可以实现一个具有7段S型加减速效果的过渡动画。这种动画效果可以应用于各种元素,例如滚动条、图像切换等。 #### 引用[.reference_title] - *1* *2* *3* [前端200道面试题及答案(更新中)](https://blog.csdn.net/m0_65450343/article/details/125238400)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值