writen by wqj1212

函数命:transl
Purpose: translation transformation
Synopsis: T
=
transl(x,y,z)
T
=
transl(v)
v
=
Transl(T)
xyz
=
transl(TC)
Description;
The first two forms
return
a homogeneous transformation representing a translation expressed
as
three scalar x,y and z,Or a Cartesian vector v

The third form returns the translation part of a homogeneous transform
as
a
3
–
element column vector

The forth form returns a matrix whose columns are the X,Y and Z columns pf the 4x4xm Cartesian trajectory matrix Tc

函数命:ctraj
Purpose : Compute a Cartesian trajectory between two points
Synopsis: TC
=
ctraj(T0, T1, m)
TC
=
ctraj(T0, T1, r)
Description:
ctraj returns a Cartesian trajectory (straight line motion) TC from the point represented by
homogeneous transform T0 to T1. The number of points along the path
is
m or the length of
the given vector ector r. For the second
case
r
is
a vector of distances along the path (
in
the range

0
to
1
)
for
each point. The first
case
has the points equally spaced, but different spacing may
be specified to achieve acceptable acceleration profile. TC
is
a
4
×
4
×m matrix.

函数命:jtraj
Purpose: Compute a joint space trajectory between two joint coordinate poses
Synopsis : [q qd qdd]
=
jtraj(q0, q1, n)
[q qd qdd]
=
jtraj(q0, q1, n, qd0, qd1)
[q qd qdd]
=
jtraj(q0, q1, t)
[q qd qdd]
=
jtraj(q0, q1, t, qd0, qd1)
Description :
jtraj returns a joint space trajectory q from joint coordinates q0 to q1. The number of points
is
n
or the length of the given time vector t. A 7th order polynomial
is
used with
default
ault zero boundary
conditions
for
velocity and acceleration.
Non
–
zero boundary velocities can be optionally specified
as
qd0 and qd1.
The trajectory
is
a matrix, with one row per time step, and one column per joint. The function can
optionally
return
a velocity and acceleration trajectories
as
qd and qdd respecti respectively .


Examples To create a Cartesian path with smooth acceleration we can use the jtraj function to create
the path vector ector r with continuous derivitives.


>>
T0
=
transl([
0
0
0
]); T1
=
transl([
–
1
2
1
]);

>>
t
=
[
0
:
0.056
:
10
];

>>
r
=
jtraj(
0
,
1
, t);

>>
TC
=
ctraj(T0, T1, r);

>>
plot(t, transl(TC));











函数命:transl


=
transl(x,y,z)

=
transl(v)

=
Transl(T)

=
transl(TC)


return
a homogeneous transformation representing a translation expressed
as



as
a
3
–
element column vector






=
ctraj(T0, T1, m)

=
ctraj(T0, T1, r)



is
m or the length of

case
r
is
a vector of distances along the path (
in
the range

0
to
1
)
for
each point. The first
case
has the points equally spaced, but different spacing may

is
a
4
×
4
×m matrix.




=
jtraj(q0, q1, n)

=
jtraj(q0, q1, n, qd0, qd1)

=
jtraj(q0, q1, t)

=
jtraj(q0, q1, t, qd0, qd1)


is
n

is
used with
default
ault zero boundary

for
velocity and acceleration.

–
zero boundary velocities can be optionally specified
as
qd0 and qd1.

is
a matrix, with one row per time step, and one column per joint. The function can

return
a velocity and acceleration trajectories
as
qd and qdd respecti respectively .






>>
T0
=
transl([
0
0
0
]); T1
=
transl([
–
1
2
1
]);

>>
t
=
[
0
:
0.056
:
10
];

>>
r
=
jtraj(
0
,
1
, t);

>>
TC
=
ctraj(T0, T1, r);

>>
plot(t, transl(TC));











转载于:https://www.cnblogs.com/wqj1212/archive/2008/01/07/1028400.html