Main Content

TransformTraj

在两个转换之间生成轨迹

描述

例子

[[tforms,,,,vel,,,,ACC] = transformtraj(T0,,,,TF,,,,tInterval,,,,Tsamples生成一个在两个4 x 4均匀转换之间插值的轨迹,T0andTF,,,,with points based on the time interval and given time samples.

[[tforms,,,,vel,,,,ACC] = transformtraj(T0,,,,TF,,,,tInterval,,,,Tsamples,,,,名称,价值)使用名称,价值pair arguments.

例子

全部收缩

从两个方向和位置构建转换。特定时间间隔和插值时间的矢量。

t0 = axang2tform([0 1 1 pi/4])*trvec2tform([0 0 0]); tF = axang2tform([1 0 1 6*pi/5])*trvec2tform([1 1 1]); tInterval = [0 1]; tvec = 0:0.01:1;

两个点之间的插值。使用plotTransforms。将转换转换为季节旋转和线性跃迁。该图显示了坐标帧的所有中间变换。

[[tfInterp, v1, a1] = transformtraj(t0,tF,tInterval,tvec); rotations = tform2quat(tfInterp); translations = tform2trvec(tfInterp); plotTransforms(translations,rotations) xlabel('X')ylabel('y')Zlabel('Z'

图包含一个轴对象。轴对象包含404个类型补丁的对象。

输入参数

全部收缩

初始转换,,,,specified as a 4-by-4 homogeneous transformation. The function generates a trajectory that starts at the initial transformation,T0,,,,and goes to the final transformation,TF

数据类型:单身的|双倍的

最终转换,指定为4 x-4均匀转换。该函数生成一个轨迹,该轨迹从初始转换开始,T0,,,,and goes to the final transformation,TF

数据类型:单身的|双倍的

该轨迹的开始和结束时间,在几秒钟内指定为两元素向量。

例子:[0 10]

数据类型:单身的|双倍的

轨迹的时间样本,指定为m- 元素向量为几秒钟。

例子:0:0.01:10

数据类型:单身的|双倍的

轨迹的时间样本,指定为m- 元素矢量。

例子:0:0.01:10

数据类型:单身的|双倍的

名称值参数

Specify optional pairs of arguments asname1 = value1,...,namen = valuen, 在哪里姓名是参数名称和Value相应的价值。名称-值参数must appear after other arguments, but the order of the pairs does not matter.

在R2021a之前,请使用逗号分隔每个名称和值,并附上姓名用引号。

例子:“时间标准”,[0 1 2;0 1 0;0 0 0]

时间缩放向量和前两个衍生物,指定为3乘m向量,哪里m是长度Tsamples。默认情况下,时间缩放是在时间点之间的线性时间缩放tInterval

对于非线性时间缩放,将时间点的值指定为第一行中的米的位置。第二行和第三行是m/s和m/s的时间点的速度和加速度2,,,,respectively. For example, to follow the path with a linear velocity to the halfway point, and then jump to the end, the time-scaling would be:

s(1,:) = [0 0.25 0.5 1 1 1] % Position s(2,:) = [1 1 1 0 0 0] % Velocity s(3,:) = [0 0 0 0 0 0] % Acceleration

数据类型:单身的|双倍的

输出参数

全部收缩

变换轨迹,以4 x-4 by-返回m均匀的转换矩阵阵列,其中m是积分数Tsamples

变换速度,以6乘返回mm/s的矩阵,其中m是积分数Tsamples。前三个要素是角速度,第二个要素是时间的速度。

转换加速度,返回6乘mm/s的矩阵2, 在哪里m是积分数Tsamples。前三个元素是角加速度,第二个元素是时间加速度。

References

[1] Lynch,Kevin M.和Frank C. Park。现代机器人技术:力学,计划和控制。Cambridge University Press, 2017.

扩展功能

C/C ++代码生成
Generate C and C++ code using MATLAB® Coder™.

版本历史记录

在R2019a中引入