Public Documentation
Documentation for ModernRoboticsBook.jl's public interface.
Contents
Index
ModernRoboticsBook.AdjointModernRoboticsBook.AxisAng3ModernRoboticsBook.AxisAng6ModernRoboticsBook.CartesianTrajectoryModernRoboticsBook.ComputedTorqueModernRoboticsBook.CubicTimeScalingModernRoboticsBook.DistanceToSE3ModernRoboticsBook.DistanceToSO3ModernRoboticsBook.EndEffectorForcesModernRoboticsBook.EulerStepModernRoboticsBook.FKinBodyModernRoboticsBook.FKinSpaceModernRoboticsBook.ForwardDynamicsModernRoboticsBook.ForwardDynamicsTrajectoryModernRoboticsBook.GravityForcesModernRoboticsBook.IKinBodyModernRoboticsBook.IKinSpaceModernRoboticsBook.InverseDynamicsModernRoboticsBook.InverseDynamicsTrajectoryModernRoboticsBook.JacobianBodyModernRoboticsBook.JacobianSpaceModernRoboticsBook.JointTrajectoryModernRoboticsBook.MassMatrixModernRoboticsBook.MatrixExp3ModernRoboticsBook.MatrixExp6ModernRoboticsBook.MatrixLog3ModernRoboticsBook.MatrixLog6ModernRoboticsBook.NearZeroModernRoboticsBook.NormalizeModernRoboticsBook.ProjectToSE3ModernRoboticsBook.ProjectToSO3ModernRoboticsBook.QuinticTimeScalingModernRoboticsBook.RotInvModernRoboticsBook.RpToTransModernRoboticsBook.ScrewToAxisModernRoboticsBook.ScrewTrajectoryModernRoboticsBook.SimulateControlModernRoboticsBook.TestIfSE3ModernRoboticsBook.TestIfSO3ModernRoboticsBook.TransInvModernRoboticsBook.TransToRpModernRoboticsBook.VecTose3ModernRoboticsBook.VecToso3ModernRoboticsBook.VelQuadraticForcesModernRoboticsBook.adModernRoboticsBook.se3ToVecModernRoboticsBook.so3ToVec
Public Interface
ModernRoboticsBook.Adjoint — MethodAdjoint(T)Computes the adjoint representation of a homogeneous transformation matrix.
Examples
julia> Adjoint([1 0 0 0; 0 0 -1 0; 0 1 0 3; 0 0 0 1])
6×6 Matrix{Float64}:
1.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 -1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0 0.0 0.0
0.0 0.0 3.0 1.0 0.0 0.0
3.0 0.0 0.0 0.0 0.0 -1.0
0.0 0.0 0.0 0.0 1.0 0.0ModernRoboticsBook.AxisAng3 — MethodAxisAng3(expc3)Converts a 3-vector of exponential coordinates for rotation into axis-angle form.
Examples
julia> AxisAng3([1, 2, 3])
([0.2672612419124244, 0.5345224838248488, 0.8017837257372732], 3.7416573867739413)ModernRoboticsBook.AxisAng6 — MethodAxisAng6(expc6)Converts a 6-vector of exponential coordinates into screw axis-angle form.
Examples
julia> AxisAng6([1, 0, 0, 1, 2, 3])
([1.0, 0.0, 0.0, 1.0, 2.0, 3.0], 1.0)ModernRoboticsBook.CartesianTrajectory — MethodCartesianTrajectory(Xstart, Xend, Tf, N, method)Computes a trajectory as a list of N SE(3) matrices corresponding to the origin of the end-effector frame following a straight line.
ModernRoboticsBook.ComputedTorque — MethodComputedTorque(thetalist, dthetalist, eint, g, Mlist, Glist, Slist, thetalistd, dthetalistd, ddthetalistd, Kp, Ki, Kd)Computes the joint control torques at a particular time instant.
ModernRoboticsBook.CubicTimeScaling — MethodCubicTimeScaling(Tf, t)Computes s(t) for a cubic time scaling.
Examples
julia> CubicTimeScaling(2, 0.6)
0.21600000000000003ModernRoboticsBook.DistanceToSE3 — MethodDistanceToSE3(mat)Returns the Frobenius norm to describe the distance of mat from the SE(3) manifold.
Examples
julia> DistanceToSE3([1.0 0.0 0.0 1.2; 0.0 0.1 -0.95 1.5; 0.0 1.0 0.1 -0.9; 0.0 0.0 0.1 0.98])
0.13493053768513638ModernRoboticsBook.DistanceToSO3 — MethodDistanceToSO3(mat)Returns the Frobenius norm to describe the distance of mat from the SO(3) manifold.
Examples
julia> DistanceToSO3([1.0 0.0 0.0; 0.0 0.1 -0.95; 0.0 1.0 0.1])
0.08835298523536149ModernRoboticsBook.EndEffectorForces — MethodEndEffectorForces(thetalist, Ftip, Mlist, Glist, Slist)Computes the joint forces/torques an open chain robot requires only to create the end-effector force Ftip.
Arguments
thetalist: the $n$-vector of joint variables.Ftip: the spatial force applied by the end-effector expressed in frame{n+1}.Mlist: the list of link framesirelative toi-1at the home position.Glist: the spatial inertia matricesGiof the links.Slist: the screw axesSiof the joints in a space frame, in the format of a matrix with axes as the columns.
Returns the joint forces and torques required only to create the end-effector force Ftip. This function calls InverseDynamics with g = 0, dthetalist = 0, and ddthetalist = 0.
Examples
julia> import LinearAlgebra as LA
julia> thetalist = [0.1, 0.1, 0.1]
3-element Vector{Float64}:
0.1
0.1
0.1
julia> Ftip = [1, 1, 1, 1, 1, 1]
6-element Vector{Int64}:
1
1
1
1
1
1
julia> M01 = [1 0 0 0;
0 1 0 0;
0 0 1 0.089159;
0 0 0 1]
4×4 Matrix{Float64}:
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.089159
0.0 0.0 0.0 1.0
julia> M12 = [ 0 0 1 0.28;
0 1 0 0.13585;
-1 0 0 0;
0 0 0 1]
4×4 Matrix{Float64}:
0.0 0.0 1.0 0.28
0.0 1.0 0.0 0.13585
-1.0 0.0 0.0 0.0
0.0 0.0 0.0 1.0
julia> M23 = [1 0 0 0;
0 1 0 -0.1197;
0 0 1 0.395;
0 0 0 1]
4×4 Matrix{Float64}:
1.0 0.0 0.0 0.0
0.0 1.0 0.0 -0.1197
0.0 0.0 1.0 0.395
0.0 0.0 0.0 1.0
julia> M34 = [1 0 0 0;
0 1 0 0;
0 0 1 0.14225;
0 0 0 1]
4×4 Matrix{Float64}:
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.14225
0.0 0.0 0.0 1.0
julia> Mlist = [M01, M12, M23, M34]
4-element Vector{Matrix{Float64}}:
[1.0 0.0 0.0 0.0; 0.0 1.0 0.0 0.0; 0.0 0.0 1.0 0.089159; 0.0 0.0 0.0 1.0]
[0.0 0.0 1.0 0.28; 0.0 1.0 0.0 0.13585; -1.0 0.0 0.0 0.0; 0.0 0.0 0.0 1.0]
[1.0 0.0 0.0 0.0; 0.0 1.0 0.0 -0.1197; 0.0 0.0 1.0 0.395; 0.0 0.0 0.0 1.0]
[1.0 0.0 0.0 0.0; 0.0 1.0 0.0 0.0; 0.0 0.0 1.0 0.14225; 0.0 0.0 0.0 1.0]
julia> G1 = LA.Diagonal([0.010267, 0.010267, 0.00666, 3.7, 3.7, 3.7])
6×6 LinearAlgebra.Diagonal{Float64, Vector{Float64}}:
0.010267 ⋅ ⋅ ⋅ ⋅ ⋅
⋅ 0.010267 ⋅ ⋅ ⋅ ⋅
⋅ ⋅ 0.00666 ⋅ ⋅ ⋅
⋅ ⋅ ⋅ 3.7 ⋅ ⋅
⋅ ⋅ ⋅ ⋅ 3.7 ⋅
⋅ ⋅ ⋅ ⋅ ⋅ 3.7
julia> G2 = LA.Diagonal([0.22689, 0.22689, 0.0151074, 8.393, 8.393, 8.393])
6×6 LinearAlgebra.Diagonal{Float64, Vector{Float64}}:
0.22689 ⋅ ⋅ ⋅ ⋅ ⋅
⋅ 0.22689 ⋅ ⋅ ⋅ ⋅
⋅ ⋅ 0.0151074 ⋅ ⋅ ⋅
⋅ ⋅ ⋅ 8.393 ⋅ ⋅
⋅ ⋅ ⋅ ⋅ 8.393 ⋅
⋅ ⋅ ⋅ ⋅ ⋅ 8.393
julia> G3 = LA.Diagonal([0.0494433, 0.0494433, 0.004095, 2.275, 2.275, 2.275])
6×6 LinearAlgebra.Diagonal{Float64, Vector{Float64}}:
0.0494433 ⋅ ⋅ ⋅ ⋅ ⋅
⋅ 0.0494433 ⋅ ⋅ ⋅ ⋅
⋅ ⋅ 0.004095 ⋅ ⋅ ⋅
⋅ ⋅ ⋅ 2.275 ⋅ ⋅
⋅ ⋅ ⋅ ⋅ 2.275 ⋅
⋅ ⋅ ⋅ ⋅ ⋅ 2.275
julia> Glist = [G1, G2, G3]
3-element Vector{LinearAlgebra.Diagonal{Float64, Vector{Float64}}}:
[0.010267 0.0 … 0.0 0.0; 0.0 0.010267 … 0.0 0.0; … ; 0.0 0.0 … 3.7 0.0; 0.0 0.0 … 0.0 3.7]
[0.22689 0.0 … 0.0 0.0; 0.0 0.22689 … 0.0 0.0; … ; 0.0 0.0 … 8.393 0.0; 0.0 0.0 … 0.0 8.393]
[0.0494433 0.0 … 0.0 0.0; 0.0 0.0494433 … 0.0 0.0; … ; 0.0 0.0 … 2.275 0.0; 0.0 0.0 … 0.0 2.275]
julia> Slist = [ 1 0 1 0 1 0;
0 1 0 -0.089 0 0;
0 1 0 -0.089 0 0.425]'
6×3 adjoint(::Matrix{Float64}) with eltype Float64:
1.0 0.0 0.0
0.0 1.0 1.0
1.0 0.0 0.0
0.0 -0.089 -0.089
1.0 0.0 0.0
0.0 0.0 0.425
julia> EndEffectorForces(thetalist, Ftip, Mlist, Glist, Slist)
3-element Vector{Float64}:
1.4095460782639782
1.857714972318063
1.392409ModernRoboticsBook.EulerStep — MethodEulerStep(thetalist, dthetalist, ddthetalist, dt)Compute the joint angles and velocities at the next timestep using first order Euler integration.
Arguments
thetalist: the $n$-vector of joint variables.dthetalist: the $n$-vector of joint rates.ddthetalist: the $n$-vector of joint accelerations.dt: the timestep delta t.
Return
thetalistNext: the vector of joint variables afterdtfrom first order Euler integration.dthetalistNext: the vector of joint rates afterdtfrom first order Euler integration.
Examples
julia> EulerStep([0.1, 0.1, 0.1], [0.1, 0.2, 0.3], [2, 1.5, 1], 0.1)
([0.11000000000000001, 0.12000000000000001, 0.13], [0.30000000000000004, 0.35000000000000003, 0.4])ModernRoboticsBook.FKinBody — MethodFKinBody(M, Blist, thetalist)Computes forward kinematics in the body frame for an open chain robot.
Examples
julia> M = [ -1 0 0 0 ;
0 1 0 6 ;
0 0 -1 2 ;
0 0 0 1 ];
julia> Blist = [ 0 0 -1 2 0 0 ;
0 0 0 0 1 0 ;
0 0 1 0 0 0.1 ]';
julia> thetalist = [ π/2, 3, π ];
julia> FKinBody(M, Blist, thetalist)
4×4 Matrix{Float64}:
-1.14424e-17 1.0 0.0 -5.0
1.0 1.14424e-17 0.0 4.0
0.0 0.0 -1.0 1.68584
0.0 0.0 0.0 1.0 ModernRoboticsBook.FKinSpace — MethodFKinSpace(M, Slist, thetalist)Computes forward kinematics in the space frame for an open chain robot.
Examples
julia> M = [ -1 0 0 0 ;
0 1 0 6 ;
0 0 -1 2 ;
0 0 0 1 ];
julia> Slist = [ 0 0 1 4 0 0 ;
0 0 0 0 1 0 ;
0 0 -1 -6 0 -0.1 ]';
julia> thetalist = [ π/2, 3, π ];
julia> FKinSpace(M, Slist, thetalist)
4×4 Matrix{Float64}:
-1.14424e-17 1.0 0.0 -5.0
1.0 1.14424e-17 0.0 4.0
0.0 0.0 -1.0 1.68584
0.0 0.0 0.0 1.0 ModernRoboticsBook.ForwardDynamics — MethodForwardDynamics(thetalist, dthetalist, taulist, g, Ftip, Mlist, Glist, Slist)Computes forward dynamics in the space frame for an open chain robot.
ModernRoboticsBook.ForwardDynamicsTrajectory — MethodForwardDynamicsTrajectory(thetalist, dthetalist, taumat, g, Ftipmat, Mlist, Glist, Slist, dt, intRes)Simulates the motion of a serial chain given an open-loop history of joint forces/torques.
ModernRoboticsBook.GravityForces — MethodGravityForces(thetalist, g, Mlist, Glist, Slist)Computes the joint forces/torques an open chain robot requires to overcome gravity at its configuration.
ModernRoboticsBook.IKinBody — MethodIKinBody(Blist, M, T, thetalist0, eomg, ev)Computes inverse kinematics in the body frame for an open chain robot.
Examples
julia> Blist = [ 0 0 -1 2 0 0 ;
0 0 0 0 1 0 ;
0 0 1 0 0 0.1 ]';
julia> M = [ -1 0 0 0 ;
0 1 0 6 ;
0 0 -1 2 ;
0 0 0 1 ];
julia> T = [ 0 1 0 -5 ;
1 0 0 4 ;
0 0 -1 1.6858 ;
0 0 0 1 ];
julia> thetalist0 = [1.5, 2.5, 3];
julia> eomg, ev = 0.01, 0.001;
julia> IKinBody(Blist, M, T, thetalist0, eomg, ev)
([1.5707381937148923, 2.999666997382942, 3.141539129217613], true)ModernRoboticsBook.IKinSpace — MethodIKinSpace(Slist, M, T, thetalist0, eomg, ev)Computes inverse kinematics in the space frame for an open chain robot.
Examples
julia> Slist = [ 0 0 1 4 0 0 ;
0 0 0 0 1 0 ;
0 0 -1 -6 0 -0.1 ]';
julia> M = [ -1 0 0 0 ;
0 1 0 6 ;
0 0 -1 2 ;
0 0 0 1 ];
julia> T = [ 0 1 0 -5 ;
1 0 0 4 ;
0 0 -1 1.6858 ;
0 0 0 1 ];
julia> thetalist0 = [1.5, 2.5, 3];
julia> eomg, ev = 0.01, 0.001;
julia> IKinSpace(Slist, M, T, thetalist0, eomg, ev)
([1.5707378296567203, 2.999663844672524, 3.141534199856583], true)ModernRoboticsBook.InverseDynamics — MethodInverseDynamics(thetalist, dthetalist, ddthetalist, g, Ftip, Mlist, Glist, Slist)Computes inverse dynamics in the space frame for an open chain robot.
ModernRoboticsBook.InverseDynamicsTrajectory — MethodInverseDynamicsTrajectory(thetamat, dthetamat, ddthetamat, g, Ftipmat, Mlist, Glist, Slist)Calculates the joint forces/torques required to move the serial chain along the given trajectory using inverse dynamics.
ModernRoboticsBook.JacobianBody — MethodJacobianBody(Blist, thetalist)Computes the body Jacobian for an open chain robot.
Examples
julia> Blist = [0 0 1 0 0.2 0.2;
1 0 0 2 0 3;
0 1 0 0 2 1;
1 0 0 0.2 0.3 0.4]';
julia> thetalist = [0.2, 1.1, 0.1, 1.2];
julia> JacobianBody(Blist, thetalist)
6×4 Matrix{Float64}:
-0.0452841 0.995004 0.0 1.0
0.743593 0.0930486 0.362358 0.0
-0.667097 0.0361754 -0.932039 0.0
2.32586 1.66809 0.564108 0.2
-1.44321 2.94561 1.43307 0.3
-2.0664 1.82882 -1.58869 0.4ModernRoboticsBook.JacobianSpace — MethodJacobianSpace(Slist, thetalist)Computes the space Jacobian for an open chain robot.
Examples
julia> Slist = [0 0 1 0 0.2 0.2;
1 0 0 2 0 3;
0 1 0 0 2 1;
1 0 0 0.2 0.3 0.4]';
julia> thetalist = [0.2, 1.1, 0.1, 1.2];
julia> JacobianSpace(Slist, thetalist)
6×4 Matrix{Float64}:
0.0 0.980067 -0.0901156 0.957494
0.0 0.198669 0.444554 0.284876
1.0 0.0 0.891207 -0.0452841
0.0 1.95219 -2.21635 -0.511615
0.2 0.436541 -2.43713 2.77536
0.2 2.96027 3.23573 2.22512 ModernRoboticsBook.JointTrajectory — MethodJointTrajectory(thetastart, thetaend, Tf, N, method)Computes a straight-line trajectory in joint space.
ModernRoboticsBook.MassMatrix — MethodMassMatrix(thetalist, Mlist, Glist, Slist)Computes the mass matrix of an open chain robot based on the given configuration.
ModernRoboticsBook.MatrixExp3 — MethodMatrixExp3(so3mat)Computes the matrix exponential of a matrix in so(3).
Examples
julia> MatrixExp3([0 -3 2; 3 0 -1; -2 1 0])
3×3 Matrix{Float64}:
-0.694921 0.713521 0.0892929
-0.192007 -0.303785 0.933192
0.692978 0.63135 0.348107 ModernRoboticsBook.MatrixExp6 — MethodMatrixExp6(se3mat)Computes the matrix exponential of an se3 representation of exponential coordinates.
Examples
julia> MatrixExp6([0 0 0 0; 0 0 -1.57079632 2.35619449; 0 1.57079632 0 2.35619449; 0 0 0 0])
4×4 Matrix{Float64}:
1.0 0.0 0.0 0.0
0.0 6.7949e-9 -1.0 1.01923e-8
0.0 1.0 6.7949e-9 3.0
0.0 0.0 0.0 1.0 ModernRoboticsBook.MatrixLog3 — MethodMatrixLog3(R)Computes the matrix logarithm of a rotation matrix.
Examples
julia> MatrixLog3([0 0 1; 1 0 0; 0 1 0])
3×3 Matrix{Float64}:
0.0 -1.2092 1.2092
1.2092 0.0 -1.2092
-1.2092 1.2092 0.0 ModernRoboticsBook.MatrixLog6 — MethodMatrixLog6(T)Computes the matrix logarithm of a homogeneous transformation matrix.
Examples
julia> MatrixLog6([1 0 0 0; 0 0 -1 0; 0 1 0 3; 0 0 0 1])
4×4 Matrix{Float64}:
0.0 0.0 0.0 0.0
0.0 0.0 -1.5708 2.35619
0.0 1.5708 0.0 2.35619
0.0 0.0 0.0 0.0 ModernRoboticsBook.NearZero — MethodNearZero(z)Determines whether a scalar is small enough to be treated as zero.
Examples
julia> NearZero(-1e-7)
trueModernRoboticsBook.Normalize — MethodNormalize(V)Normalizes a vector.
Examples
julia> Normalize([1, 2, 3])
3-element Vector{Float64}:
0.2672612419124244
0.5345224838248488
0.8017837257372732ModernRoboticsBook.ProjectToSE3 — MethodProjectToSE3(mat)Returns a projection of mat into SE(3).
Examples
julia> ProjectToSE3([0.675 0.150 0.720 1.2; 0.370 0.771 -0.511 5.4; -0.630 0.619 0.472 3.6; 0.003 0.002 0.010 0.9])
4×4 Matrix{Float64}:
0.679011 0.148945 0.718859 1.2
0.373207 0.773196 -0.512723 5.4
-0.632187 0.616428 0.469421 3.6
0.0 0.0 0.0 1.0ModernRoboticsBook.ProjectToSO3 — MethodProjectToSO3(mat)Returns a projection of mat into SO(3).
Examples
julia> ProjectToSO3([0.675 0.150 0.720; 0.370 0.771 -0.511; -0.630 0.619 0.472])
3×3 Matrix{Float64}:
0.679011 0.148945 0.718859
0.373207 0.773196 -0.512723
-0.632187 0.616428 0.469421ModernRoboticsBook.QuinticTimeScaling — MethodQuinticTimeScaling(Tf, t)Computes s(t) for a quintic time scaling.
Examples
julia> QuinticTimeScaling(2, 0.6)
0.16308ModernRoboticsBook.RotInv — MethodRotInv(R)Inverts a rotation matrix.
Examples
julia> RotInv([0 0 1; 1 0 0; 0 1 0])
3×3 adjoint(::Matrix{Int64}) with eltype Int64:
0 1 0
0 0 1
1 0 0ModernRoboticsBook.RpToTrans — MethodRpToTrans(R, p)Converts a rotation matrix and a position vector into homogeneous transformation matrix.
Examples
julia> RpToTrans([1 0 0; 0 0 -1; 0 1 0], [1, 2, 5])
4×4 Matrix{Int64}:
1 0 0 1
0 0 -1 2
0 1 0 5
0 0 0 1ModernRoboticsBook.ScrewToAxis — MethodScrewToAxis(q, s, h)Takes a parametric description of a screw axis and converts it to a normalized screw axis.
Examples
julia> ScrewToAxis([3; 0; 0], [0; 0; 1], 2)
6-element Vector{Int64}:
0
0
1
0
-3
2ModernRoboticsBook.ScrewTrajectory — MethodScrewTrajectory(Xstart, Xend, Tf, N, method)Computes a trajectory as a list of N SE(3) matrices corresponding to the screw motion about a space screw axis.
ModernRoboticsBook.SimulateControl — MethodSimulateControl(thetalist, dthetalist, g, Ftipmat, Mlist, Glist,
Slist, thetamatd, dthetamatd, ddthetamatd, gtilde,
Mtildelist, Gtildelist, Kp, Ki, Kd, dt, intRes)Simulates the computed torque controller over a given desired trajectory.
ModernRoboticsBook.TestIfSE3 — MethodTestIfSE3(mat)Returns true if mat is close to or on the manifold SE(3).
Examples
julia> TestIfSE3([1.0 0.0 0.0 1.2; 0.0 0.1 -0.95 1.5; 0.0 1.0 0.1 -0.9; 0.0 0.0 0.1 0.98])
falseModernRoboticsBook.TestIfSO3 — MethodTestIfSO3(mat)Returns true if mat is close to or on the manifold SO(3).
Examples
julia> TestIfSO3([1.0 0.0 0.0; 0.0 0.1 -0.95; 0.0 1.0 0.1])
falseModernRoboticsBook.TransInv — MethodTransInv(T)Inverts a homogeneous transformation matrix.
Examples
julia> TransInv([1 0 0 0; 0 0 -1 0; 0 1 0 3; 0 0 0 1])
4×4 Matrix{Int64}:
1 0 0 0
0 0 1 -3
0 -1 0 0
0 0 0 1ModernRoboticsBook.TransToRp — MethodTransToRp(T)Converts a homogeneous transformation matrix into a rotation matrix and position vector.
Examples
julia> TransToRp([1 0 0 0; 0 0 -1 0; 0 1 0 3; 0 0 0 1])
([1 0 0; 0 0 -1; 0 1 0], [0, 0, 3])ModernRoboticsBook.VecTose3 — MethodVecTose3(V)Converts a spatial velocity vector into a 4x4 matrix in se3.
Examples
julia> VecTose3([1 2 3 4 5 6])
4×4 Matrix{Float64}:
0.0 -3.0 2.0 4.0
3.0 0.0 -1.0 5.0
-2.0 1.0 0.0 6.0
0.0 0.0 0.0 0.0ModernRoboticsBook.VecToso3 — MethodVecToso3(ω)Converts a 3-vector to an so(3) representation.
Examples
julia> VecToso3([1 2 3])
3×3 Matrix{Int64}:
0 -3 2
3 0 -1
-2 1 0ModernRoboticsBook.VelQuadraticForces — MethodVelQuadraticForces(thetalist, dthetalist, Mlist, Glist, Slist)Computes the Coriolis and centripetal terms in the inverse dynamics of an open chain robot.
ModernRoboticsBook.ad — Methodad(V)Calculate the 6x6 matrix [adV] of the given 6-vector.
Examples
julia> ad([1, 2, 3, 4, 5, 6])
6×6 Matrix{Float64}:
0.0 -3.0 2.0 0.0 0.0 0.0
3.0 0.0 -1.0 0.0 0.0 0.0
-2.0 1.0 0.0 0.0 0.0 0.0
0.0 -6.0 5.0 0.0 -3.0 2.0
6.0 0.0 -4.0 3.0 0.0 -1.0
-5.0 4.0 0.0 -2.0 1.0 0.0ModernRoboticsBook.se3ToVec — Methodse3ToVec(se3mat)Converts an se3 matrix into a spatial velocity vector.
Examples
julia> se3ToVec([0 -3 2 4; 3 0 -1 5; -2 1 0 6; 0 0 0 0])
6-element Vector{Int64}:
1
2
3
4
5
6ModernRoboticsBook.so3ToVec — Methodso3ToVec(so3mat)Converts an so(3) representation to a 3-vector.
Examples
julia> so3ToVec([0 -3 2; 3 0 -1; -2 1 0])
3-element Vector{Int64}:
1
2
3