Home

Linkage Designer User Manual

image

Contents

1. Animate the four bar mechanism by driving the link1 crank from 0 to 2z with different resolutions grls AnimateLinkage fourBarMechanism2 91 gt 0 91 gt x 91 gt 27 Boxed False Resolution o 2 8 m This is the number of frames generated by the animation function Length grls 2m LP pase points T 3x LE e Y JU A Internal points ly Internal point generation for Resolution gt 2 8 2 4 6 8 10 All linkage animation function allows to draw trace lines of certain points of the links This could be useful to visualize the movement of the point of interest Load the pre defined puma560 robot In 36 Get ToFileName LinkageExamplesDirectory puma560 txt Out 36 LinkageData 7 List the driving variables In 37 puma560 LDDrivingVariables Out 37J ql gt 0 q2 gt 0 q3 gt 0 q430 q530 q6 gt 0 3 Render linkages 93 List the link names of puma560 linkage In 38 GetAllLinkNames puma560 Out 38J Puma560 Ground Puma56001l1ink0 Puma560 link1 Puma56001link2 Puma560 1link3 Puma560 1link4 Puma560 1link5 Puma560 1link6 Animate the puma560 robot and draw the trace line of the point 150 0 0 relative to link6n 1 link In 5 AnimateLinkage puma560 ql gt 0 q2 gt 70 q3 gt 160 ql gt 130 q4 gt 60 q6 gt 90 Boxed gt False Resolution gt 5 L
2. Mathematica LinkageDesigner Copyright Linkage Designer is a trademark of Bit Pli 2003 BT Aug 2005 First edition Intended for use with Mathematica Versions 5 0 5 1 or 5 2 Software and manual written by Dr G bor Erd s Copyright O 2005 byDr G bor Erd s All rights reserved No part of this document may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical photocopying recording or otherwise without prior written permission of the author Dr Gabor Erd s Bit Pli 2003 BT and Wolfram Research Inc Dr G bor Erd s is the holder of the copyright to the Linkage Designer software and documentation Product described in this document including without limitation such aspects of the Product as its code structure sequence organization look and feel programming language and compilation of command names Use of the Product unless pursuant to the terms of a license granted by Wolfram Research Inc or as otherwise authorized by law is an infringement of the copyright The author Dr G bor Erd s Bit Pli 2003 BT and Wolfram Research Inc make no representations express or implied with respect to this Product including without limitations any implied warranties of merchantability or fitness for a particular purpose all of which are expressly disclaimed Users should be aware that included in the terms and conditions under which Wolfram Research is wi
3. Connect x Crank e Ground Slider Out 31 Graphics In 32 ShowLinkageGraph crankSliderMechanism _ 7 Connect ingRod ir Slider Crank Ground Out 32 Graphics 1 Principles of linkage definition 39 1 4 How to define kinematic pair RotationalJoint allows relative rotation of the two links of the kinematic pair around a common axis TranslationalJoi allows relative translation of the two links of the kinematic pair nt along a common axis but no relative rotation of the links UniversalJoint allows relative rotation of the two links of the kinematic pair around two perpendicular axis PlanarJoint allows relative translation of the two links of the kinematic pair in a common plane and relative rotation around an axis perpendicular to the plane CylindricalJoint allows relative translation and rotation of the two links of the kinematic pair along a common axis SphericalJoint allows relative rotation of the two links of the kinematic pair around a common point FixedJoint connects the two links of the kinematic pair rigidly Kinematic pairs available in LinkageDesigner LinkageDesigner provides two functions DefineKinematicPair and DefineKinematicPairTo whose add new kinematic pairs to the kinematic graph You can define kinematic pairs based on tree scenarios 1 The links of the kinematic pairs are not pre assembled therefore they a
4. Set the geometry of the Slider link after translating with 0 0 15 vector In 25 piston LinkGeometry Slider PlaceShape geomList 3 MakeHomogenousMatrix 0 0 15 Set the simple parameters of the piston In 26 SetSimpleParametersTo piston 10 gt 100 11 gt 45 12 100 Out 26J LinkageData 7 In 27 ClearVisualizer m Visualize the new crank slider mechanism In 28 VisualizeLinkage SetDrivingVariables piston 91 gt 40 3 Render linkages 85 Crank slider mechanism with detailed geometry 3 3 Render linkage in VRML97 viewer As the third possibility LinkageDesigner support the rendering linkages in VRML97 viewer This is done by exporting linkage into a WRML Virtual Reality Modelling Language file that can be loaded into the VRML97 viewer The VRML world has many features that can be useful in design a linkage It is capable to display text and geometry in a real time 3D environment therefore almost all display options of Graphics3D object Axes FaceGrids BoundingBox Scaling etc is exported VRML World has ceratin features transparent surface rendering multiple viewpoint viewpoint defined in LLRF of the links etc that has no correspondent options in the Graphics3D object These extra features can be controlled by the options of the VRML export functions To export a linkage into a WRL file use the WriteVRMLLinkage function 86 LinkageDesigner User Ma
5. 1B gt 0 W1B gt 0 y2A 0 62B gt 0 Q2B5 0 W2B gt 0 w3A7 gt 0 63B gt 0 3B gt 0 W3B gt 0 61C gt 0 0000397087 W1C 2 0 00180307 Out 107 J LinkageData 7 m mx2 specifies the joint marker relative to the LLRF of the movingPlatform link used for the B legs In 108 Mat rixForm mx2 MakeHomogenousMatrix movingPlat formChamfer 2 movingPlatformRadius V3 movingPlatformChamfer 2 o Out 108 MatrixForm 100 t vingr latro iCHa ser 0 1 0 v3 ii o r movingPlatformRadius 0 0 1 0 0 0 0 1 5 Advanced Linkage Detinition 135 Show the link markers of the spherical joint between leg B and movingPlatform In 109 Show Linkage3D deltaRobot LinkMarkers gt leg1B mx1 movingPlatform mx2 MarkerSize gt 8 Axes gt True Out 109 Graphics3D 136 LinkageDesigner User Manual Define the spherical joint between leg1B and movingPlatform In 110 DefineKinematicPairTo deltaRobot Spherical O1D 91D y1D leg1B mx1 movingPlatform mx2 CandidateLoopVariables 61B 1B 01A This is a loop closing kinematic pair Placing links into constrained position is finished in 3 745 sec Candidate loop variables 01A J1A 01B 1B O1C W1C Non redundant constraint equations 3 Selected loop variables O1B 1B 914A The updated list of driving variables ql gt 0 365532 q2 gt 0 359292 q3 gt 0 355589 WIA gt 0 00121527 J1B20 Y2
6. 12 Linkage Designer Getting Started To define the rotational joint two joint marker has to be specified The joint markers specifiy the position and orientation of the rotational joint The markers are given relative to the LLRF of the two links The common z axis of the joint markers is the axis of the rotation Since the rotational joint axis is parallel with the z axis of the LLRF of link it is enough to translate the LLRF of linkI with 0 11 0 vector to obtain the first joint marker The second joint marker is defined to be identical with the LLRF of Iink2 In LinkageDesigner markers are defined with a 4x4 homogenous transformation matrixes To define the joint markers you can use MakeHomogenousMat rix function MakeHomogenousMatrix m v creates a homogenous transformation matrix from a 3 x 3 rotation matrix m anda 3 x translation vector v MakeHomogenousMatrix m creates a homogenous transformation matrix from a 3 x 3 rotation matrix m with a 0 0 0 translation vector MakeHomogenousMatrix v creates a homogenous transformation matrix from a 3 x 1 translation vector v and with a 3 x 3 identity matrix MakeHomogenousMatrix o z creates a homogenous transformation matrix of a coordinate frame defined by its vector of origin o and the direction vector of the z axis z MakeHomogenousMatrix function If the joint marker definition use some parameters the numerical substitution value of the parameters sh
7. 21 gt gt 43 gt gt 0 0 Try perturbing the initial point s SetDrivingVariables fdrootfail There might be no solution for the linkage at q1 gt 0 3623775294252710 lt 16 gt 3B gt 0 driving variable values Check the simple parameters or change the FindRoot options Out 102 LinkageData 7 In the second loop closing kinematic pair definition you have received some error messages This is the result of the incorrect loop variable selection The loop variables are responsible to move the link pairs into their constrained position if some of the driving variable values 130 LinkageDesigner User Manual are changed This can be achieved only if the loop variable really influencing the loop closing constraints The loop variables J1C 01C 01C are not influencing ones since for example w1C variable rotates the eg A link around its axis This movement can not place the movingPlate link into its constrained position if the linkage is moved out from the pose of the definition After some practice you can build the capability to find the correct loop variables of the loop Also you can use DefineKinematicPair function to look and try the different set of candidate loop variables until you find the correct ones List the driving variables of the linkage In 103 deltaRobotTest LDDrivingVariables All 1 Out 103 ql q2 q3 01A 01A O1B 1B W1B O2A 2A W2A 92B Q2B W2B W3A O3B 3B W3B
8. 4 997 Second LinkageData 10 List the record identifier of cardanShaftT1 linkage cardanShaftT1 1 All 1 SMechanismID DrivingVariables SimpleParameters Structure LowOrderJoint LinkGeometry SDerivedParametersB LinkGroundTransformation SDrivingVelocities TimeDependentVariables STimeDependentVariables m List the SDrivingVelocities record cardanShaftT1 LDDrivingVelocities ar t gt 1 m List the STimeDependentVariables record Short cardanShaftT1 LDTimeDependentVariables 15 Dilat t NonConstants gt q1 62 63 64 65 gt ql t D e2 t NonConstants gt ql 92 063 04 95 gt 12 Cos q1 Cos 03 Cos 2 y1 Sin 92 ql t 11 l 11 11 11 11 1 Lt 11 11 LI 12 Cos Cos 2 Cos Cos Cos Cos Cos 2 Cos Cos qi t Cos Cos Cos gi p ql Cos 3 Cos 04 Cos 065 Cos 2 y1 Sin 92 ql t 2 y1 Sin ql Sin 63 ql t 64 Cos 5 Cos 2 y1 Sin g1 Sin 63 ql t 63 Cos 5 Cos 2 y1 Sin g1 Sin e4 ql t ql Cos 5 Cos 2 y1 Sin 2 Sin O3 Sin O4 ql t ql Cos 92 Cos 2 y1 Sin 95 qi t 63 Sin g1 Sin 62 Sin 1 Sin 2 w1 ql t 63 Cos 04 Cos 05 Sin ql Sin 62 Sin 1 Sin 2 y1 12Cos q1 Sin 93 Sin 1 Sin 2 J1 ql t ql Cos 04 Cos 5 Sin 63 Sin 1 Sin 2 wl ql t ql Cos 3 Cos 65 Sin 04 Sin d1 Sin 2 y1
9. 7 Kinematics of linkages 175 Define the rotational joint between the Workbench and link1 DefineKinematicPairTo cardanShaft Rotational 21 Workbench MakeHomogenousMatrix 0 0 0 1 0 0 link1 MakeHomogenousMatrix 0 11 0 0 1 0 LinkageData 6 Define the universal joint between link and link2 DefineKinematicPairTo cardanShaft Universal 02 63 link1 MakeHomogenousMatrix 0 0 0 link2 MakeHomogenousMatrix 0 0 0 LinkageData 6 The two forks of the intermediate shaft ink2 lies in the same plane therefore the joint marker of ink2 should be rotated 90 around the y axes This rotation is needed because the universal joint is defined in such way that it allows to rotate the lower link relative to the upper link along two perpendicular axis These two axis is defined by the z axis of the upper joint marker and the x axes of the lower joint marker Define the universal joint between ink2 and link3 DefineKinematicPairTo cardanShaft Universal 04 65 link2 MakeHomogenousMatrix RotationMatrix 0 1 0 x 2 0 12 0 link3 MakeHomogenousMatrix 0 0 0 LinkageData 6 176 LinkageDesigner User Manual There are predefined geometries stored in the STL subdirectory of the SLinkageExamplesDirectory Before the loop closing rotational joint is defined between link3 and Workbench assign the geometries to t
10. m 5 2 2 Manual oop variables selection The automatic loop variable selection assumes that the driving variables of the final linkage is located in the beginning of the DrivingVariables record In case of the Delta robot the three driving variable of the final linkage q1 q2 q3 located at the beginning of the list but as it will turn out there are 6 other driving variables of the linkage namely W1A V1B V2A W2B 3A 3B These variables are not useful driving variables since they are turning the leg links around their axis In order to prevent the DefineKinematicPair function from selecting the final driving variables we will specify the loop variables explicitly using the CandidateLoopVariables option 5 Advanced Linkage Detinition 131 You can check graphically the position of link markers to be used in the DefineKinematicPair function In 104 Show Linkage3D deltaRobot LinkMarkers gt leg2A mx1 movingPlatform rotMx mx2 MarkerSize gt 8 Axes gt True Out 104 Graphics3D 132 LinkageDesigner User Manual Define the spherical joint between eg2A and movingPlatform links In 105 DefineKinematicPairTo deltaRobot Spherical 02C 2C w2C leg2A mx1 movingPlatform rotMx mx2 CandidateLoopVariables 02A 2A 1A This is a loop closing kinematic pair Placing links into constrained position is finished in 14 27 sec Candidate loop variables
11. ql gt 0 373209 q2 gt 0 361729 q3 30 3572 J1A gt 0 00167222 J1B20 Y2A gt 0 J2B 5 0 J3A2 0 3B70 Out 112 LinkageData 7 m 5 2 3 Finalizing the linkage definition m List the SDrivingVariables record of Delta robot In 113 deltaRobot LDDrivingVariables Out 113 J ql gt 0 3732088493293637 q2 gt 0 3617288840018200 q3 gt 0 3572004446495979 W1A gt 0 001672221892288313 J1B0 wW2A gt 0 Y2B 5 0 Y3A gt 0 Y3B gt 0 We have finished the definition of the Delta parallel manipulator By listing the DrivingVariables record of the linkage you can see that the mobility of the linkage is 9 Out of this 9 driving variables only 3 are real driving variables ql q2 q3 that influence the position of the movingPlatform link As we have already discussed in Section 5 2 2 the remaining driving variables W1A W1B Y2A W2B W3A W3B rotate the legs around their main axes 5 Advanced Linkage Detinition 139 There is one important implication of the this linkage definition It indicates that the last degree of freedom of the spherical joints connecting the legs with the arms are not used therefore they can be frozen Freezing means that the symbol of the driving variables are substituted by their value this way preventing to change the value of these variables However if we freeze these driving variables it result a linkage where the upper spherical joints are functionally equivale
12. testelinki test Workbench Cos ql Sin ql 0 0 Sin ql Cos ql 0 0 0 0 1 y Sin ql Cos q1 0 0 0 0 1 0 0 0 GHH The Structure record of the returned LinkageData object contains two kinematic pairs test Base 0 test RotationalJoint 1 You can see that the homogenous transformation matrix of this kinematic pair contains two symbol q1 and 11 The first symbol is a driving variable while the second is a simple parameter Both the driving variables and the simple parameters are independent variables of the linkage This means that their values can be changed independently This statement is not fully true in case of linkages having kinematic graph that contains loop s In this case the values of the independent variables are restricted by the loop closure equations Certain combinations of independent variable values result non solvable loop closure equations which means that linkage would break to arrive to the prescribed independent values The driving variables of the linkage are stored in the SDrivingVariables record of the LinkageData object m Get the DrivingVariables record of testReturn LinkageData object testReturn DrivingVariables ql gt 0 The most important difference between driving variables and simple parameters is that the previous defines the mobility of the linkage In case of non loop closing kinematic pair definition the mobility of the linkage is a
13. 14 PAGS the MASS 2 decode oni bidon aea aai aoaaa aaa Ludus Ponit 16 Dele 08 geomety Secon eee eee eee bia Ce ere ee ee ee ree doute 17 Te mpl t ABSA Solver C 20 Solve the loop closure constraint equation esee 2 Define twosesalved linkage acsieoduiniteet admin OD RINT I UI RP Mira xa AEN 24 Saye linkage eC 25 Animate Linkage M 26 Principles of linkage definition sse 31 1 1 Rigid body Tepresentalton s iibi ed bed tptte neun ou Ue dde 31 1 2 Homogenous matrixes os sce oe we d cuu Mu rana drea cata baeuenee 33 1 5 Kinematic ADU Socata cea tecti naien tu MEME simu t EOS toss bes ISET 35 1 4 How to define kinematic pait eseseessesseesessessessresstesrrrressersstrressteseresressessresresseeee 39 1 4 1 Out Of Place kinematic pair definition eeeeeeeeeeeeeeeeeeerereerrreereeeee 40 1 4 2 In Place kinematic pair definition uie e erepto rna sepes ed beis ed 45 1 4 3 Kinematic pair definition with Denavith Hartenberg variables 49 LankageData A new datatyp eer ottenere pepe Ee per Yp Rl vea Ee kde va ie vs ry epe uda 53 2 1 Predetumned Teconfs aiat ipe tp iei iR i aia dii eect tind ed 54 2 2 Structural information of the linkage iie oerte qtue pearl n eb g Rea 55 2 3 Independent variables of the linkage reet emerit reti tenia eric 39 2 4 Dependent variables of the l
14. 62 5 0 63 0 m Define the loop closing kinematic pair The fourth rotational joint between link3 and linkO will create a loop in the kinematic graph therefore it will decrease the mobility of the linkage DefineKinematicPair function will automatically calculate the non redundant constraint equations imposed by the loop closing kinematic pair and remove as many driving variables from DrivingVariables record as the number of non redundant constraint equations The removed driving variables are appended to the DerivedParametersB record since they are not independent variables of the linkage any more Their value are determined by the generated constraint equations The driving variables selected to move into DerivedParametersB record are called loop variables Normally there are many possibilities to select the loop variables Any driving variable that appear in the generated constraint equations are potential candidates to become a loop variable and called candidate loop variables DefineKinematicPair function select automatically the loop variables from the list of candidate loop variables by removing the candidate loop variables from the end of the DrivingVariables record If you want to change the order of selection of the loop variables specify the list of candidate loop variables with the CandidateLoopVariables option option name default value CandidateLoopVv Automatic list of driving variables that can a
15. LinkGroundTransformation record could speed up the rendering considerably To illustrate this render the Delta robot than call the PlaceLinkageTo function which will calculate and add the LinkGroundTransformation record to the LinkageData object of delta robot and redisplay the resulted linkage 5 Advanced Linkage Detinition 141 Display the linkage having no precalculated LinkGroundTransformation record In 120 Timing Show Linkage3D deltaRobot LinkMarkers gt movingPlatform Axes gt True PlotRange gt All 10 10 10 20 Out 120 11 807 Second Graphics3D Calculate and append the LinkGroundTransformation record In 121 PlaceLinkageTo deltaRobot Out 121 LinkageData 8 Template based solver The solution of inverse kinematics problem is one of the most challenging problem in manipulator design The problem is formulated as follows Given the desired position and orientation of the tool relative to the reference coordinate frame how do we compute the set of joint angles which will achieve this result There are numerous solution technique has been developed ranging from the numerical solution to the closed form solutions For a summary of the existing techniques you can consult any standard textbook on robotics like 1 2 3 LinkageDesigner has a support to formulate and solve the equations of inverse kinematics problem in closed form It applies a technique called temp
16. loffs Cos p1 401 402 403 412 Sin O3 11 Sin 62 63 Cos p1 61 62 63 1 2 LinkageData A new datatype 65 Every time the independent variables are changing the dependent variables have to be recalculated SetDrivingVariables and SetSimpleParameters function re calculates the constraint equations using the new independent variable values m Set the 01 driving variables to 30 SetDrivingVariablesTo crankSliderMechanism 91 gt 30 LinkageData 7 Get the implicitly defined dependent variables of crank slider mechanism crankSliderMechanism DerivedParametersB CrankSlider TranslationalJoint 4 92 gt 0 77638 032 0 253774 10 Sin p1 91 92 093 loffs Cos p1 01 02 03 12 Sin 63 11 Sin 02 03 Cos p1 01 02 93 1 m 2 4 2 Explicitly defined dependent variables The loop closing constraint equations of the crank slider mechanism can be easily solved in closed form You can use the in build Solve function to find the explicit solution of equation 1 for variable 62 and 63 2 10 Sin p1 91 92 03 loffs Cos p1 01 92 03 12 Sin O3 1 11 Sin 2 93 Cos p1 901 92 903 1 62 gt p1 01 03 63 gt ArcTan vV 1 loffs 11 Sin p1 901 12 2 loffs 11 Sin p1 01 12 Instead of using the implicitly derived parameters of crankSliderMechanism you can exchange the DerivedParametersB record with DerivedParametersA record You might n
17. q2 q3 z1Sin ql q2 q3 i 2 z1Cos q1 q4 z1 Cos q1 q2 q3 q4 lt 14 gt gt z2 Sin ql q2 q3 q4 5 T5 q5 gt ArcTan 4 Csc q4 z2 Cos ql q2 q3 2 z3 Cos q2 q3 z2 Cos q1 q2 q3 z1 Sin q1 q2 q3 z1 Sin q1 q2 q3 z2Cos q1 z1 Sin q1 6 T5 q5 gt ArcTan i Sec q4 z2 Cos ql q2 q3 2 z3 Cos q2 q3 z2 Cos ql q2 q3 z1Sin ql q2 q3 z1Sin ql q2 q3 i z1Cos ql q2 q3 z1 Cos ql q2 q3 z2 Sin ql q2 q3 2 z3 Sin q2 q3 z2 Sin ql q2 q3 166 Ch 06 TemplateBasedSolver nb m Append the 4th template solution to FinalSolution Short AppendTemplateSolutionTo FinalSolution solutionSet 4 15 1 Fith Iteration m Search for template solution on q6 unknown variables Timing solutionSet PatternSolve eqlist q6 BaseTemplateEquations T5 UseBaseTemplates gt False ExcludedParameters gt O1 02 03 y1 y2 y3 46 287 Second Null Display the solutions FormattedTemplateSolutions solutionSet 3 No Name Solution Conditic 1 T5 q6 gt ArcTan x2 Cos ql q2 q3 2 x3 Cos q2 q3 x2 Cos ql q2 q3 xl1Sin ql q2 q3 x1 Sin q1 q2 q3 4 Csc q5 2 x2 Cos q1 q4 x2 Cos q1 q2 q3 q4 2 x3 Cos q2 q3 q4 lt 14 gt x1 Sin q1 q2 q3 q4 x1 Sin q1 q2 q3 q4 2 T5 q6 gt ArcTan i x
18. Cos p1 01 Sin 62 Sin O3 Cos 3 Cos 02 Sin p1 61 Cos p1 61 Sin 02 Cos p1 61 Cos 02 Sin p1 01 Sin 62 Sin 0O3 0 11 Cos pl 01 12 Cos p1 61 Cos 02 Sin pl 61 Sin 2 Cos 03 Cos 62 Sin pl 61 Cos p1 91 Sin O2 Cos p1 61 Cos 02 Sin p1 061 Sin O2 Sin O3 Cos 03 Cos p1 01 Cos 62 Sin p1 01 Sin O2 Cos 02 Sin p1 91 Cos pl 061 Sin 62 Sin O3 0 11 Sin p1 61 12 Cos 62 Sin p1 061 Cos p1 01 Sin 62 0 0 1 0 0 0 0 1 CrankSlider Workbench C010 07 017 0 he 05 0 07 0 1 035 0507 Oz EEE Re generate the linkage animation Timing AnimateLinkage crankSliderMechanism 012 0 5 91 gt 27 MaxIterations 50 72 LinkageDesigner User Manual 0 721 Second Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D 2 6 Records of the time dependent linkage If the velocity or acceleration of the links must be calculated LinkageDesigner uses the data stored in the STimeDependentVariables and SDrivingVelocities records These records are appended by the ToTimeDependentLinkage function ToTimeDependent Linkage linkage t NToTimeDependent Linkage linkage t Calculates the first derivatives of the time dependent variables in closed form with respect to t Calcu
19. The joint marker is a cartesian coordinate system that is rigidly attached to its owner link The joint markers are defined with homogenous transformation matrixes mxi and mxj which represent the displacements of the corresponding LLRFs To illustrate the kinematic pair definition let s define a simple linkage having only a rotational joint Since it is easier to visualize a link if the bounding geometry is assigned we start the linkage definition with defining the geometries for link and link2 links Load the LinkageDesigner package lt lt LinkageDesigner 1 Principles of linkage definition 41 Define geometry for link In 33 link1Geometry Graphics3D Plot3D 5 Exp Sqrt x 2 y 2 x 3 3 y 3 3 BoxRatios gt 1 1 1 Out 33 Graphics3D Define the geometry for link2 In 34 Graphics Polyhedra In 35 link2Geometry Show Graphics3D GreatStellatedDodecahedron Axes gt True 2 Out 35 Graphics3D The LLRF of the links can be chosen freely but the geometric representation should be specified relative to the LLRF For simplicity we choose the LLRFs of ink and link2 to be coincide with the reference coordinate system of their geometric representation 42 LinkageDesigner User Manual The rotational joint restrict the relative motion of the links in such manner that the origin of the two joint markers are superpositioned and they are allowed to rotate onl
20. X 0 0 0 0 0 ib Define the rotational joint between basePlatform and driveArm links In 70 DefineKinematicPairTo deltaRobot Rotational ql basePlatform mx1 driveArml1 mx2 JointPose gt p1 Out 70 LinkageData 6 The remaining two rotational joints that connects driveArm2 and driveArm3 links to basePlatform can be defined in a similar manner The only difference is that the joint marker of the basePlatform link should be rotated with 120 and 240 around the z axis respectively Define the placement transformation of the 120 rotation In 71 MatrixForm rotMx MakeHomogenousMatrix RotationMatrix 0 0 1 120 Out 71 MatrixForm i X3 0 0 2 43 1 a c3 00 0 0 1 0 0 0 0 1 Define rotational joint between basePlatform and remaining two arm driveArm2 and driveArm3 links In 72 DefineKinematicPairTo deltaRobot Rotational q2 basePlatform rotMx mx1 driveArm2 mx2 JointPose gt p2 Out 73 LinkageData 6 5 Advanced Linkage Definition 117 In 73 DefineKinematicPairTo deltaRobot Rotational q3 basePlatform rotMx rotMx mx1 driveArm3 mx2 JointPose gt p3 Out 73 LinkageData 6 Assign the geometric representation of the links This way you can check the placement of the joint markers before you use them in the kinematic pair definition m Create and assign the geometric representation of basePlatform link In 74 gr
21. a4 d1 03 01 Cos ql 02 Sin g1 y a2 01 Cos q1 02 Sin ql 4 a4 d1 03 01 Cos q1 02 Sin g1 a2 da d1 03 801 Cos q1 02 Sin g1 1 q3 gt ArcTan y a2 01 Cos ql 02 Sin ql 4 a4 d1 03 01 Cos q1 02 Sin q1 a2 d4 d1 03 01 Cos q1 509357 a2 d4 01 Cos q1 02 Sin g1 a2 d4 d1 03 01 Cos q1 02 Sin q1 a2 d4 ql gt ArcTan d2 d3 02 01 V d2 3 01 022 d2 d3 01 02 V d2 d3 01 025 62 lt lt 1 gt The length of FinalSolution is equal to the number of solution branches Length FinalSolution 8 164 Ch 06 TemplateBasedSolver nb Fourth Iteration In this iteration only q5 and q6 variables left unknown From the structure of the robot it is known that these variable does not depend on the O1 02 03 target variables since these variables specify the position of the ink s LLRF Therefore the equations containing these target variables can be excluded from the search Also you can exclude the equations containing y1 y2 y3 since they are not indepedndent target variables BaseTemplateEquations s Return the s base template equation Get the base template equations You might want to use only a limited set of template equations which will speed up the calculation This can be done by
22. gl t 0 l gt lt lt 15 gt gt 065 49870 Cos 62 Sin O3 Sin O4 Sin 5 Cos w2 Sin 61 Cos 1 Cos 2 wl1 Sin w2 lt lt l gt gt Cos 1 Cos wW2 Cos 2 y1 Sin 1 Sin w2 1 0 1 0 190 LinkageDesigner User Manual m 7 2 2 Calculate the velocity of the motion GetLinkageDerivative linkage s pos n Returns the n th translational and rotational derivative vector of s link The reference point is defined by the pos vector where pos is defined w r t the LLRF of link s GetLinkageDerivative linkage s mx n Returns the n th translational and rotational derivative vector of s link The reference point is defined by the origin of the frame specified by mx homogenous matrix vector mx is defined w r t the LLRF of link s GetLinkageDerivative linkage s Returns the velocity and angular velocity vector of the origin of the LLRF of link s Function for calculating derivative functions So far we have calculated the first derivative of the time dependent variables Most of the time the time dependent variables are the joint variables of the kinematic pairs In order to get the translational and rotational velocity or higher order derivative of a given link these joint velocities has to be transformed into the so called cartesian velocity of the link GetLinkageDerivative does this mapping using the LinkJa
23. leglA mx2 Out 82 LinkageData 6 Define the spherical joint between driveArm and leg B links In 83 DefineKinematicPairTo deltaRobot Spherical O1B 1B y1B driveArm1 mx1B leg1B mx2 Out 83 LinkageData 6 Define spherical joint between the remaining drive arms and the corresponding legs In 84 DefineKinematicPairTo deltaRobot Spherical 02A 2A w2A driveArm2 mx1A leg2A mx2 Out 84J LinkageData 6 In 85 DefineKinematicPairTo deltaRobot Spherical 02B 2B W2B driveArm2 mx1B leg2B mx2 Out 85 LinkageData 6 5 Advanced Linkage Detinition 121 In 86 DefineKinematicPairTo deltaRobot Spherical 03A 3A W3A driveArm3 mx1A leg3A mx2 Out 86J LinkageData 6 In 87 DefineKinematicPairTo deltaRobot Spherical 03B 3B 3B driveArm3 mx1B leg3B mx2 Out 87J LinkageData 6 m Create and assign the geometric representation of the legs In 88 gr PlaceShape Graphics3D RGBColor 0 0 1 LinkShape legLength 1 5 1 5 5 PolygonNumber gt None Jj MakeHomogenousMatrix RotationMatrix 0 1 0 90 0 0 2 legLength Out 88 Graphics3D In 89 deltaRobot LDLinkGeometry leg3B deltaRobot LDLinkGeometry leg3A deltaRobot LDLinkGeometry leg2B deltaRobot LDLinkGeometry leg2A deltaRobot LDLinkGeometry leg1B deltaRobot LDLi
24. q4 q5 x2 Sin q1 2 x2 Cos q1 q4 x2Cos q1 q2 q 1 q4 q5 x1 Cos q1 q2 q3 q4 q5 2 x1 Cos q1 q4 q5 ql q4 q5 2 x3 Sin q2 q3 q4 q5 2 x2 Sin q1 q2 q3 q5 q2 q3 q5 2 x2 Sin q1 q2 q3 q5 ql q4 q5 x2 Sin ql q2 q3 q4 q5 q2 q3 q4 q5 q2 q3 q4 q5 q2 q3 q4 q5 q4 q2 q3 q4 q4 x1 x1 Sin q1 q2 q3 q4 x1 Sin q1 q2 q3 q4 m Simplify the FinalSoultion FinalSolution Simplify FinalSolution x1 Cos q1 q2 q3 q4 q5 qil q2 q3 q5 1 q4 q5 x1 Cos q1 q2 q3 q4 q5 2 x1 Cos x1 Cos q1 q2 q3 q4 q5 q2 q3 q5 qi q4 q5 2 x3 Sin q2 q3 q4 q5 2 x2 Sin q1 q4 q5 dr 3 q4 2 x3 Cos q2 q3 q4 q2 q3 q4 2 x1 Sin q1 q4 168 Ch 06 TemplateBasedSolver nb 6 3 Define the inverse linkages This conclude the solution of the inverse kinematic problem of the PUMA 560 robot The eight solution branch are collected in the FinalSolution Using this solution you can define linkages which is driven by the target variables In order to do this you have to replace the driving variables of puma560 linkage with the target variables and append the solution of the inverse kinematic problem as explicitly derivied parameters to the SDerivedparametersA record ReplaceDri
25. 01 Cos q1 02 in q11 01Cos q1 02 Sin ql a2 d1 03 a2 d4 d1 03 01Cos q1 02 Sin g1 y a2 01 Cos q1 02 Sin ql 4 a4 d1 03 01 Cos q1 02 Sin g1 a2 d4 d1 03 01 Cos q1 02 Sin qt q3 gt ArcTan a2 01 Cos a1 02 Sin q1 4 d4 d1 03 01 Cos q1 02 Sin q1 a2 a4 dl 03 01 Cos q1 02 in a11 2 a2 d4 01 Cos ql 02 Sin q1 a2 g4 d1 503 01 cos q1 sce Sin ql m a2 gt ArcTan a2 01 Cos ql 02 Sin q1 a2 d4 d1 03 01 Cos q1 02 Sin q1 a1 03 y a2 01 Cos q1 02 Sin q1 4 d4 d1 503 01 Cos q1 02 Sin q1 a2 d4 d1 03 01 Cos q1 02 in q1 01Cos q1 02 Sin ql a2 d1 03 a2 d4 dl 03 01 Cos q1 02 Sin q1 y a2 01 Cos q1 02 Sin ql 4 d4 d1 03 01 Cos ql 02 Sin g1 a2 a4 dl 03 01 Cos ql 1 gt gt 4 a4 xl xl q3 gt ArcTan a2 d4 lt 1l gt a2d4 160 Ch 06 TemplateBasedSolver nb One template matching is found from which q2 an q3 variables can be expressed as the function of the target variables and the known q1 variable Similarly to the solution of q1 this solution has two branch Combining the
26. 2 t NonConstants o ql 62 03 04 65j gt 62 49870 D q D 6 D 63 t NonConstants gt ql 62 63 94 865 gt 63 49870 D 6 D e 4 t NonConstants o ql 62 63 04 65 2 04 49870 5 t NonConstants o ql 62 03 04 95 gt 05 49870 The difference between cardanShaftT1 and cardanShaftT3 lays in the velocity functions of the time dependent variables In case of cardanShaftT3 each velocity functions are represented with a unique variable These variables are appended to the SDerivedParametersB record together with the equations that determines these values The record identifier of this subrecord is TimedependentVariables The equations in SDerivedParametersB are solved simultaneously using the FindRoot functions when functions like SetDrivingVariables GetLinkageRules etc are called 7 Kinematics of linkages 189 m List the TimeDependentVariables of DerivedParametersB record Short cardanShaftT3 LDDerivedParametersB TimeDependentVariables 15 92 49870 gt 0 577229 63549870 gt 0 04 498705 0 65 4987025 0 577067 Cos 1 1202 49870 Cos 63 Sin 62 12 63 49870 Cos 02 Sin 63 11 65 49870 Cos 5 Sin 62 62549870 Cos 03 Cos 04 Cos 95 Sin 02 03 49870 Cos 02 Cos 04 Cos 05 Sin 03 04 49870 Cos 802 Cos 04 Cos 65 Sin 03 63 49870 Cos 62 Cos 093 Cos 65 Sin 04 64 49870 Cos 02 Cos 63 Cos 5 Sin e4 02 49870 Cos 5 Sin 62 Sin 0O3
27. 6 30285 eS 6 2869 xp 6 27081 oe 6 25551 6 24201 E 6 23111 6 22346 abs 6 21952 a 6 21952 lo 6 22346 is 6 23111 a 6 24201 a 6 25551 Re 6 27081 co 6 2869 s 6 30285 ee 6 3176 oss 6 33022 I 6 33988 6 6 34595 E 6 34802 6 34595 es 6 33988 t 6 33022 F 6 3176 y 6 30285 I 6 2869 32 6 27081 35 6 25551 e 6 24201 aoe 6 23111 oi 6 22346 a 6 21952 eo 6 21952 oe 6 22346 Sy 6 23111 es 6 24201 oe 6 25551 6 27081 6 2869 ig 6 30285 6 3176 2 6 33022 des 6 33988 Er 6 34595 1 6 34802 m Interpolate the angular velocity of link3 f1 Interpolation angVelocity InterpolatingFunction 0 1 lt gt 196 LinkageDesigner User Manual Interpolate the angular acceleration of link3 f2 Derivative 1 f1 InterpolatingFunction 0 1 lt gt Plot the angular velocity of link3 plot Plot fl1 t t 0 1 PlotStyle gt Hue 0 6 34 6 32 28 26 24 22 oO WO VD gi Graphics Plot the angular acceleration of link3 plot Plot f2 t t 0 1 PlotStyle gt Hue 6 0 75 0 5 0 275 0 25 0 5 0 75 Graphics 7 Kinematics of linkages 197 Display the velocity and acceleration in the same coordinate system Show plot plot e N U A WO Ov Graphics Since the velocity does not change too much you might want to display the vel
28. Cos 03 1 s 1 a Sin 92 Cos 02 Sin 3 Cos 01 Cos 062 Cos 03 Cos 1 Cos 03 Sin O2 Cos 2 Sin 3 Sin O1 Cos 62 Cos 03 Sir Er den Sin 92 Cos 02 Sin 63 Sin O1 Cos 92 Cos 03 Si 10 11Cos 61 12 Cos O1 Cos 02 Sin O1 Sin 2 13 Cos 63 Cos O1 11 Sin 1 12 Cos O2 Sin O1 Cos 1 Sin 62 13 Cos 3 Cos 62 Sin 13 12 Cos 93 11 Cos 62 Cos 03 11 Sin 02 Sin 3 10 Sin e1 Cos O 11Cos 63 Sin 62 12 Sin O3 11 Cos 02 Sin 3 10 Cos 01 Cos 03 Linkage Designer Getting Started 23 m Search for pattern solution for the variables 62 03 Timing sol PatternSolve eqlist 02 63 2 113 Second T7 2 gt ArcTan 10 Sin 01 11 10 Cos 1 ArcTan 13 1 i 4 127 137 12 13 11 10 Cos 01 10 Sin e1 212 12 13 11 10 Cos 01 10 Sin e1 21213 I 12 13 11 10 Cos 01 10 Sin 01 F2 12 4 03 gt ArcTan qi 12 13 11 10 Cos 01 10 sin 61 1 4127137 e2 gt ArcTan 10 Sin O1 11 10 Cos 91 ArcTan 13 J 2 1 4 12 13 12 13 11 10 Cos 01 10 sin 01 2 12 12 13 11 10 Cos 01 10 Sin 01 21213 12 13 11 10 Cos 01 10 sin 01 vl A n on 12 13 11 10 Cos 01 10 Sin 01 2 12 4 03 gt ArcTan 24 Linkage Designer Getting Started
29. Graphics3D SurfaceColor RGBColor 0 574228 0 574228 0 996109 Polygon RotationMatrix 0 0 1 0 basePlatformRadius 0j amp e 0 120 240 360 Out 74 Graphics3D In 75 deltaRobot LDLinkGeometry basePlatform gr Create and assign the geometric representation of driveArm1 driveArm2 driveArm3 links In 76 gr Graphics3D Thickness 0 02 SurfaceColor RGBColor 1 1 0 Line armWidth 2 0 0 armWidth 2 0 0 Line armWidth 2 armLength 0 armWidth 2 armLength 0 Polygon armWidth 4 0 0 armWidth 4 armLength 0 armWidth 4 armLength 0 armWidth 4 0 0 Out 76 Graphics3D In 77 deltaRobot LDLinkGeometry driveArm3 deltaRobot LDLinkGeometry driveArm2 deltaRobot LDLinkGeometry driveArm1 gr 118 LinkageDesigner User Manual m Set the driving variables and render the linkage In 78 Show Linkage3D SetDrivingVariables deltaRobot ql gt 30 q2 gt 30 LinkMarkers gt All Axes gt True Out 78J Graphics3D m 5 1 2 Define the spherical joints Spherical joints between driveArm1 leg1A and leg1B links 5 Advanced Linkage Detinition 119 m mx1A specifies the joint marker relative to the LLRF of the driveArm link In 79 MatrixForm mx1A MakeHomogenousMatrix armWidth 2 0 0 Out 79 MatrixForm 100 Bonnet 0 1 0 0 Qc O GE 0 0 0 0 1 m mx1B specifies the j
30. Linkage Linkage animations similarly to linkage display can be rendered in different viewers The animations are generated by changing the driving variables of the linkage The driving variables as its name suggest it independent variables of the linkage which drives the mechanism from one pose to another LinkageDesigner provides three function that generate linkage animation for three rendering devices i Mathematica notebook ii Dynamical Visualizer and iii VRML97 viewer 3 Render linkages 89 AnimateLinkage linkage qI x 42 gt y Animate linkage in the notebook by interpolating the specified driving variable values Returns a list of Graphics3D object DVAnimateLinkage linkage q1 x 42 gt y Animate linkage in Dynamic Visualizer by interpolating the specified driving variable values Returns a list of transformation matrixes of the links WriteVRMLAnimation linkage gql gt x q2 gt y Export linkage animation to the default WRL file The animation is generated by interpolating the specified driving variable values Returns the exported file s name WriteVRMLAnimation linkage file q1 gt x q2 gt y Export linkage animation to file The animation is generated by interpolating the specified driving variable values Returns the exported file s name Functions of linkage animation option name default value LinkGeometry Automati
31. Place the piston in the upright position by rotating 90 around the y axis In 58 PlaceLinkageTo piston MakeHomogenousMatrix RotationMatrix 0 1 0 x 2 Out 58 LinkageData 8 Display the displaced piston linkage In 59 Show Linkage3D piston Axes gt True 40 OS 20055 2862 150 100 50 0 Out 59 Graphics3D We will introduce a further placement of the piston where the inclination angle 4 of the piston axis is introduced Since is an independent variable but does not influence the degree of freedom of the piston therefore it is appended to the SimpleParameters record of the LinkageData 4 Join linkages 105 Inclination angle of the piston in the v engine Append the parameter to the SimpleParameters record In 60 AppendTo piston LDSimpleParameters 2 45 Out 60 pl120 11245 1225 100 1025 15 loffs gt 0 025 45 m Place the piston relative to the current pose by rotating around the x axis with In 61 PlaceLinkageTo piston MakeHomogenousMatrix RotationMatrix 1 0 0 AbsolutePlacement gt False Out 61 LinkageData 8 106 LinkageDesigner User Manual Display the piston linkage In 62 Show Linkage3D piston Axes gt True ViewPoint gt 5 0 0 0 50 100 150 150 100 50 Out 62 Graphics3D The four pistons of the V engine is copied from the base piston The base piston is
32. SetOptions Object3D Puma56001link3 TransformationMatrix gt 1 0 0 0 0 00902 pe 1 5 70 Y 420045 175 500 5 Lee yy DV SetOptions Object3D Puma5600link4 TransformationMatrix gt 1 0 0 0 0 0 1 0 0 400 175 825 1 DV SetOptions Object3D Puma560 link5 TransformationMatrix gt 1 0 0 0 0 102570 p 15 0 1 L400 86 115 8259 AY DV SetOptions Object3D Puma560 link6 TransformationMatrix gt 1 0 0 0 0 037 0 Lor Oty 200 175252 8925 5 lY DV SetOptions Object 3D Puma560 link6 LLRF 0 TransformationMatrix gt 1 0 0 0 0 0500 p diag OF 400 175 825 5 1 4 lt l gt gt 6 gt DV SetOptions Object3D Puma560 link6 LLRF 0 In 15 grls 0 O 7 r ter 0 9 0 Ja Lbs Ja c Ja Ls Ja TransformationMatrix o 1 lt lt 2 gt gt 430 902 2 gt 1 0 0j 1311 3 Render linkages 95 option name default value VRMLCycleTime 10 Time frame of the animation VRMLTraceName Automatic PROTO name of the trace VRMLViewPoints Automatic Specifies the ViewPoint list of the VRML World VRMLPROTOLibFile None Specify the PROTO library file name VRMLTransparency Automatic Defines the transparency of the links in the VRML World Automatic set opaque every link VRMLTexture None Defines the texture node of the graphics in the VRML
33. center marker is given with jcm homogenous matrixes llrfi llrfi jem markers are given relative to the reference coordinate frame The list of joint variable s of the kinematic pair is defined with q q2 Define kinematic pair for the In Place scenario If the linkage is pre assembled the geometries of the links are placed in their constrained position If you know the LLRF of the links and the joint marker relative to a common reference frame you can use the In Place kinematic pair definition This scenario might be useful if the mechanism is assembled in a CAD system and you want to import to Mathematica To illustrate the kinematic pair definition let s use the same example as in Section 1 4 1 Load the LinkageDesigner package lt lt LinkageDesigner 46 LinkageDesigner User Manual Define geometry for link In 55 link1Geometry Graphics3D Plot3D 5 Exp Sqrt x 2 y 2 x 3 3 y 3 3 BoxRatios gt 1 1 1 Out 55 Graphics3D Define the geometry for link2 In 3 lt lt Graphics Polyhedra In 56 link2Geometry Show Graphics3D GreatStellatedDodecahedron Axes gt True 2 Out 56 Graphics3D 1 Principles of linkage definition 47 The geometries of the two links can be pre assembled by placing them in their constrained position The geometry of link2 is placed upside down on the top the geometry of linkI To place the geometries you can use the
34. d Out 72 LinkageData 8 4 3 Finalize the V Engine definition vEngine linkage is a parametrized engine mechanism By changing the simple parameters of the LinkageData object you can customize the linkage to your particular need List the SimpleParameters record of the vEngine linkage In 73 vEngine LDSimpleParameters Out 73 ad gt 70 10315 11345 12 gt 100 loffs gt 0 p1 gt 0 p1 120 p1 22 0 p1 320 0612545 02245 03245 042545 m Setthe pose and the inclination offset for the four pistons to have 45 inclination v engine In 74 SetSimpleParametersTo vEngine 12 45 022 45 32 45 4 45 p12 0 p1 12 90 p1 2 gt 90 p1 32 0 Out 74 LinkageData 8 110 LinkageDesigner User Manual Display vEngine linkage In 75 gr Show Linkage3D vEngine Boxed gt False Out 75 Graphics3D 4 Join linkages 111 Display the kinematic graph of the vEngine linkage In 76 ShowLinkageGraph vEngine Out 76 Graphics Generate animation of vEngine Setting RasterFunctionoIdentity stops AnimateLinkage from rendering the graphics it produces In 79 AnimateLinkage vEngine 91 gt 0 91 gt 310 Resolution gt 5 5 Advanced Linkage Definition 113 Advanced linkage definition In Chapter 4 we have defined a multi loop mechanism starting from a simple mechanism having only one loop This was possible because the loops of t
35. explicit expression of the unknown variables Linkage Designer Getting Started 21 m Solve the loop closure constraint equation Let s assume that the fourth rotational joint does not exist because the mechanism is cut at point D on Figure 1 The four bar mechanism then become a RRR manipulator Let s define the tool center point TCP of this manipulator with the 15 0 0 vector from the LLRF of link3 Similarly define the base point BP with 150 0 0 vector from the LLRF of linkO The inverse kinematic problem can be formulated as follows Given the distance vector of TCP from BP specify the corresponding joint values The fourth rotational joint than can be than defined by restricting the TCP to be coincide with BP Since the RRR manipulator redundant therefore only two joint variable can be expressed out of the inverse kinematic problem The first joint variable 01 assumed to be known in the solution procedure The Template Based technique is an iterative solution method It can be applied on a set of redundant or non redundant equations The solution contains four main steps 1 Generate the equations of the inverse kinematic problem 2 Convert to normal form the equation with respect to the list of unknown variables 3 Search for matching equations 4 Select and store the solution for the matched variable After step 4 the matched variable is removed from the list of unknown variables and the algorithm continues at step
36. geometric representation of Workbench link Show crankSliderMechanism LinkGeometry Workbench Graphics3D Display the whole crank slider linkage In 57 Show Linkage3D crankSliderMechanisn Out 57 Graphics3D During the simulation of the linkage the position of every LLRF should be calculated relative to the global reference frame These transformation matrixes are calculated using the kinematic graph of the linkage If you want to animate your linkage you might find useful to 70 LinkageDesigner User Manual generate the link ground transformation in advance to spare the time of calculations before each animation steps The LinkGroundTransformation record is calculated and appended if the PlaceLinkage function is called All animation function recognize the presence of SLinkGroundTransformation record and use it if it is defined The presence of the LinkGroundTransformation record speeds up the animation in only if there are not too many parameters in the LinkageData 20 In case of numerous parameter the LinkGroundTransformation might contains so long expressions that the evaluation of these expressions might take more time than generate the transformation based on the kinematic graph PlaceLinkage linkage mx change the Workbench Ground transformation of linkage to mx and return the resulted linkage PlaceLinkage linkage mx change the Workbench Ground transformation of link
37. geometric representation of the links you can simply simply re assign a Graphics3D object to the linkname sub part of the SLinkGeometry record Re set the geometry of link1 link to a red line fourBarMechanism LinkGeometry link1 Graphics3D RGBColor 1 0 0 Line 0 0 0 5 0 0 Graphics3D You can display the linkage in its current pose using the Linkage3D function that returns a Graphics3D object of the whole linkage Linkage 3D linkage returns the geometric representation of the linkage as Graphics 3D object Linkage3D function Linkage Designer Getting Started 11 option name default value LinkMarkers None specifies the list of link name of which the LLRF to be displayed LinkGeometry All specifies the list of link name of which the LinkGeometry to be displayed MarkerSize 1 Display size of the marker MarkerLabels fp Wr zi Axes labels of the marker Selected options of Linkage3D function If you display fourBarLinkage you can see that the LLRF of linkI is rotated 45 with respect to the LLRF of linkO around the common z axis a Display fourBarMechanism Show Linkage3D fourBarMechanism LinkMarkers gt All MarkerSize gt 1 Graphics3D Define the second rotational joint between link and link2 at point B in the Figure 1 This joint is placed at the end of link1 The distance between point A and point B is 11
38. joint marker on the Workbench link is a little bit more complicated to obtain The cardan shaft mechanism so far is basically a serial manipulator having 5 DOF Setting any of its driving variables the end effector of the manipulator link3 can be placed into different position and orientation In order to calculate the corresponding joint marker on the Workbench JointMarker2 the JointMarkerl specified in the LLRF of ink3 should be transformed in to the LLRF of the Workbench Naturally the two joint marker are coincide in every pose of the cardan shaft Since we would like to parametrize the deflection angles between the shaft we can change the joint variables of the 178 LinkageDesigner User Manual two universal joint with the simple parameters 02201 O03oJ1 04292 05242 Also the remaining driving variable should be substituted with a numerical value q10 since the joint marker can not depend on driving variables and this driving variable represent a rotation that is not necessary to parametrize With this construction method we have obtained a parametrized joint marker on the Workbench link that can be placed in different position and orientation depending on the values of the simple parameters Since this two joint marker define a loop closing kinematic pair if the simple parameter values changing the loop closing constraint equations have to be simple re evaluated in order to place the joint marker in their new constrained pl
39. list of link names linkNameList Table link lt gt ToString i i 0 6 linkO linkl link2 link3 link4 link5 link6 m Specifies the list of D H parameters DHParameters 0 d1 zx 2 q1 a2 d2 0 q2 0 d3 2 q3 0 d4 x 2 q4 0 0 7 2 q5 0 0 0 q6 List the D H parameters in a table TableForm DHParameters TableHeadings gt Automatic StyleForm FontColor gt Hue 0 amp a d a O a d a e 1 0 di 2 ql 2 a2 d2 0 q2 3 0 d3 q3 4 0 d4 2 q4 5 0 F g5 6 0 0 q6 m Create a LinkageData object and add the a and d parameters to the SimpleParameters record puma560 CreateLinkage Puma560 WorkbenchName gt linkO SimpleParameters gt d1 gt 500 d2 gt 200 a2 gt 400 d3 gt 25 d4 gt 325 LinkageData 6 Define the kinematic pairs specified by the D H parameters Table DefineKinematicPairTo puma560 Rotational linkNameList i linkNameList i 1 DHParameters i i 1 6 LinkageData 6 LinkageData 6 LinkageData 6 LinkageData 6 LinkageData 6 LinkageData 6 146 Ch 06 TemplateBasedSolver nb The DefineKinematicPairTo function assigns a default geometry for every new link The geometry contains the text primitive with the short name of the link If you display the linkage with the LinkMarkers All options you can see all the LLRF of the linkage as they are defined by the D H variables Di
40. name default value LinkMarkers None specifies which link markers to display LinkGeometry All specifies which link geometry to display Basic options of VisualizeLinkage Generate a list of homogenous matrixes mxlist MakeHomogenousMatrix 2 4 0 2 4 0 6 4 0 6 4 0 1 0 0 2 0 1 0 4 0 0 1 0 0 0 0 1 1 0 0 2 0 1 0 4 0 0 1 0 0 0 0 1 111 0 0 61 0 1 0 4 0 Oy 1 04 10 0 Up Eh 1 0 0 oO 0 1 0 4 0 0 1 0 LO 0 O LFF 82 LinkageDesigner User Manual m Visualize the crankSliderMe the Slider link chanism together with the mxlist frames attached to VisualizeLinkage SetDrivingVariables crankSliderMechanism 01 gt 40 LinkMarkers gt Slider Sequence mxlist MarkerSize gt 3 CrankSlider Workbench CrankSlider Crank CrankSlider ConnectingRod CrankSlider Slider CrankSlider Slider LLRF 2 4 0 CrankSlider Slider LLRF 2 4 0 CrankSlider Slider LLRF 6 4 0 CrankSlider Slider LLRF 6 4 0 Mairi Connected ya p Crank Slider mechanism with modified Slider color To profit the capabilities of the real time three dimesional object manipulation of Dynamic Visualizer you can change the geometric representation of the links with more detailed CAD geometries You can import CAD geometries into Graphics3D object using the in build Import function 3 Ren
41. of the LinkageData object However if the dependent variable y is defined implicitly with an equation it is stored in the SDerivedParametersB record 2 LinkageData A new datatype 63 y f xi Xo2 yis an explicitly defined variable g V Xi X2 0 yisanimplicitly defined variable Different type of dependent variables Implicitly defined variables are generated automatically in case of loop closing kinematic pair definition DefineKinematicPair function detects whether the new kinematic pair is a loop closing or an open one In the first case it calculates the relative mobility of the upper link of the kinematic pair relative to the lower one Then it calculates the set of non redundant constraint equations Finally it removes as many driving variables from the DrivingVariables record as many constraint equations were generated and append these variables together with the constraint equations to the SDerivedParametersB record If the constraint equations can be solved in closed form the solution can be used to replace the implicitly defined variables to explicitly defined ones In this case the derived parameters should be added to the S DerivedParametersA record and delete from the SDerivedParametersB record manually You can add naturally other dependent parameters to the LinkageData object if you wish m 2 4 1 Implicitly defined dependent variables To investigate the structure of
42. ql t 65 Sin ql Sin 2 Sin 3 Sin 04 Sin 1 Sin 2 y1 11 Cos 62 Sin g1 Sin 5 Sin 1 Sin 2 w1 a1 t 62 Cos 3 Cos o2 y1 Sin ql i 7 Kinematics of linkages 185 11 Cos 62 Cos 63 Cos 04 Cos 5 Cos 2 w1 Sin ql 11 Cos 62 Cos 05 Cos 2 y1 Sin ql Sin 3 Sin 94 11 Cos 2 41 Sin ql Sin 0O2 Sin 5 12 Cos 03 Cos 1 Sin 62 Sin 2 y1 11 Cos 03 Cos 04 Cos 65 Cos 1 Sin 2 Sin 2 wW1 11Cos 05 Cos 61 Sin 62 Sin 63 Sin 64 Sin 2 y1 11 Cos 62 Cos 1 Sin 05 Sin 2 y1 12 Cos ql Cos 02 Cos 03 Sin 1 Sin 2 wW1 11 Cos ql Cos 02 Cos 03 Cos 04 Cos 5 Sin 1 Sin 2 y1 11 Cos q1 Cos 62 Cos 5 Sin 3 Sin O04 Sin 1 Sin 2 wW1 11 Cos ql Sin 62 Sin 65 Sin 1 Sin 2 w1 lt 1 gt xl 1 lt l gt gt lt 1 gt 1 gt SG Pees P lt l gt 12Cos q1 Cos 93 Cos 2 V1 11 Cos q1 Cos 93 Cos 94 Cos 95 Cos 92 y1 12 Cos 2 41 Sin ql Sin 02 Sin 03 19 11Cos 05 Sin q1 Sin 63 Sin 64 Sin 1 Sin Q2 J1 1 1 19 gt 1 1 16 1 l gt l i 1 l 1 12 Cos 02 Cos 3 Cos 2 y1 Sin ql 11 Cos 62 Cos 03 Cos 04 Cos 5 Cos 02 y1 Sin ql 13 11Cos q1 Sin 2 Sin 65 Sin 1 Sin
43. the in build FindRoot function SetDrivingVariables and SetDrivingVariablesTo functions therefore accept all options of FindRoot function Set 01 driving variable of fourBarMechanism to 45 SetDrivingVariablesTo fourBarMechanism 01 gt 45 MaxIterations gt 50 LinkageData 8 Display fourBarMechanism Show Linkage3D fourBarMechanism LinkMarkers gt All Axes gt True Graphics3D Since the fourBarMechanism defined parametrically changing the parameter values new four bar mechanism can be obtained without redefining the whole linkage Linkage Designer Getting Started 19 SetSimpleParameters linkage newparam reset the simple parameters of linkage to newparam and returns the new LinkageDate object SetSimpleParametersTo linkage newparam reset the simple parameters of linkage to newparam and reset the resulted LinkageDate object to linkage Caption describing the definition box m Set parameter value to 30 SetSimpleParametersTo fourBarMechanism gt 30 LinkageData 8 m Re display fourBarMechanism Show Linkage3D fourBarMechanism LinkMarkers gt All PlotRange gt All Axes gt True Graphics3D 20 Linkage Designer Getting Started Template based solver The kinematic graph of fourBarMechanism contains one loop A loop in the graph structure is defined with list of loop closure equation that is stored in the SDerivedPara
44. you can define the kinematic pairs of the mechanism m Define the open kinematic pairs To define the rotational joint between linkO and linkl use the DefineKinematicPairTo function DefineKinematicPair inkage Rotational q link mx ink mx Create a rotational joint between ink and link and appends the definition to the linkage LinkageData object The function returns the updated LinkageData object DefineKinematicPairTo linkage Rotational q link mx link mx Create a rotational joint between link and link and appends the definition to the linkage LinkageData object and reset the reulted LinkageData object to linkage linkage isa LinkageData object tq joint variable of the rotational joint link name of the lower link mx joint frame of the lower link defined in the LLRF of link link name of the upper link MX joint frame of the upper link defined in the LLRF of link Rotational joint definition Linkage Designer Getting Started m This will create a rotational joint definition and append it to fourBarMechanism DefineKinematicPairTo fourBarMechanism Rotational 91 link0 IdentityMatrix 4 link1 IdentityMatrix 4 LinkageData 6 fourBarMechanism linkage has now one real kinematic pair defined between linkO and link The mobility of the linkage is one since link has only one rotational degree of freedom relative to
45. 0 91 gt 360 Resolution gt 20 LinkMarkers gt link2 MarkerSize 5 TracePoints gt link2 0 5 0 Axes gt True PlotRange gt 10 17 15 15 1 4 6 89 Second Null Linkage Designer Getting Started 29 Xx Netscape c x File Edit View Go Communicator Help 4 42 amp 2 ww SIN Back Forward Reload Home Search Netscape Print Mmal ie Document Done EE GEUESSERECSE m This display the resulted VRML file in Internet explorer this command works in Windows In 11 Run start explorer lt gt ToFileName LinkageExamplesDirectory fourBarAnimation wrl 1 Principles of linkage definition 31 Principles of linkage definition This chapter introduces the basic notations for building linkages with LinkageDesigner Linkages are multi body system built from rigid bodies and constraints This guide introduce the basic definition of multi body systems however by no means substitute to a standard text book of multi body kinematics 1 1 Rigid body representation The rigid body is an undistortable body that preserves the distance between two arbitrarily chosen points This implies that to keep track of the motion of a rigid body it is enough to know the position of one point and the rotation of the body around this point In LinkageDesigner this information of the rigid body placement is captured by keeping track the placement of a body atta
46. 2 Sin 1 Sin V2 23 11 Cos 95 Sin ql Sin 03 Sin 64 Sin 1 Sin 92 y1 1 gt 1 19 11wCos 62 Sin ql Sin 5 Sin 1 Sin 62 y1 1 l gt lt l gt gt lt l gt l gt 1 This record contains the velocity functions of the 5 time dependent variables of cardanShaft Finally convert the cardan shaft to a time dependent linkage with NToTimeDependent Linkage function m Create cardanShaftT3 time dependent linkage Timing cardanShaftT3 NToTimeDependentLinkage cardanShaft t 0 43 Second LinkageData 10 188 LinkageDesigner User Manual List the record identifier of cardanShaft T3 linkage cardanShaftT3 1 All 1 MechanismID DrivingVariables SimpleParameters Structure LowOrderJoint LinkGeometry SDerivedParametersB LinkGroundTransformation SDrivingVelocities TimeDependentVariables There are two new record appended to cardanShaft linkage the SDerivedParametersA and STimeDependentVariables like in case of cardanShaftTl However in this case the TimeDependentVariables record is different m List the SDrivingVelocities record cardanShaftT3 LDDrivingVelocities qi t gt 1 m List the STimeDependentVariables record of cardanShaftT3 linkage cardanShaftT3 LDTimeDependentVariables 1 t NonConstants gt ql 62 63 94 65 gt ql t
47. 2 The iteration continues until all unknown variables are expressed For detailed discussion of the template based solution techique refer the Chapter 6 ofthis manual 22 Linkage Designer Getting Started Generate the starting equations of the inverse kinematic problem Timing eqlist GenerateInvKinEquations fourBarMechanism link3 MakeHomogenousMatrix 13 0 0 link0O MakeHomogenousMatrix 10 0 0 TargetMarker gt IdentityMatrix 4 ColumnForm eqlist 0 15 Second Null Cos 01 Cos 02 Cos 63 Sin O1 Sin 02 0 12 11 Cos 62 13 Cos 3 10 Cos 01 Cos 2 Sin 1 Sin O2 0 Cos 62 Sin O1 Cos 01 Sin 2 Sin 63 0 Cos 2 Sin O1 Cos O1 Sin 2 Sin 3 0 11 Sin 2 10 Cos 02 Sin 1 Cos 01 Sin 62 13 Sin 63 0 Sin 01 Cos 63 Sin 2 Cos 02 Sin 3 0 Sin 1 Cos 3 Sin 62 Cos 2 Sin 93 0 Cos 1 Cos 2 Cos 03 Sin O2 Sin 63 0 1 Cos 63 Cos O01 Cos 02 Sin O1 Sin 92 Cos 2 Sin O1 Cos O1 1 Cos 93 Cos O01 Cos 02 Sin 1 Sin 92 Cos 62 Sin 0O1 Cos 0O1 Cos 03 Cos 02 Sin 01 Cos 01 Mais 2 ns A Cos 92 Sin 91 Sin Cos 03 Cos 2 Sin 91 Cos 61 Sin O2 Cos Cos 02 Sin O1 Sin 10 Sin 1 12 Sin 2 13 Cos 63 e Co E Sin 63 0 11 10Cos 01 12 Cos 92 13 Cos 62 Cos 03 Sin 62 Sin O3 0 1 Sin 91 Cos 03 Sin O2 Cos 92 Sin 93 Cos O01 Cos 62
48. 2 Cos ql q2 q3 2 x3 Cos q2 q3 x2 Cos ql q2 q3 x1 Sin ql q2 q3 x1 Sin q1 q2 q3 Csc q5 lt lt 1l gt gt T5 q6 gt ArcTan lt lt 1 gt gt 4 T5 q6 gt ArcTan lt lt 1 gt gt 6 Template based solver 167 Append the 4th template solution to FinalSolution Short AppendTemplateSolutionTo FinalSolution solutionSet 4 15 q6 gt ArcTan L 2 x1 Cos q1 q2 q3 q5 2 x1 Cos q1 q2 q3 q5 8 1 4 4m ql gt ArcTan d2 d3 02 01 V d2 d3 01 02 d2 d3 01 02 X d2 d3 01 02 lt lt 6 gt gt lt lt 1 gt gt 2 x1 Cos x1 Cos ql x1lCos q1l 2 x1 Co 2 x1 Co x1 Cos 2 x2 Si 2 x28Si x2 Sin x2 Sin x2 Sin 4 x3 Sin 2 x2 Sin 2 x3 Sin 2 x2 Sin 2 x3 Sin x2 Cos q1 q2 q3 q4 2 x2 Cos q1 x2 Cos ql q2 q3 q4 2 x3 Cos x2 Cos q1 q2 q3 q4 2 x1 Sin q1 Sin ql q2 q3 q4 x1 Sin q1 q q q2 q3 q4 q5 q2 q3 q4 q5 ql q2 q3 q5 q2 q3 q4 q5 1 q2 q3 q4 q5 S S x1lCos q1l q n n ql q2 q3 q5 q1 q2 q3 q5 ql q2 q3 q4 q5 ql q2 q3 q4 q5 x2 Sin ql q q2 q3 q4 q5 1 q2 q3 q4 q5 2 x1Cos 4 x3 Sin 2 x2 Sin q2 q3 q4 q5 x2 Sin q1 q1 q4 q5 x2 Sin q1 q2 q3
49. 3 ee b Condition b 0 152 Ch 06 TemplateBasedSolver nb PatternSolve eqns vars tempeqns PatternSolve eqns vars attemps to solve an equation or set of equations for the variables vars using the base set of template equations attempts to solve an equation or set of equations for the variables vars using the list of additional template equations defined in patteqns PatternSolve function option name default value UseBaseTemplates ExcludedParameters None List of symbols that filters the resulted solutions The tempalate solutions containing any of these symbols will be dropped True Specify whether the base template equations should be included in the template equations used for pattern matching Options of PatternSolve function The template equations are used by the PatternSolve function to select the equation matching one of the specified template equations m Solve a linear equation with the PatternSolve function using the MyTemplateEq template equation PatternSolve Tan c 2 Sin a Y Cos s bSin t Cos c a xu Sin x Cos x u t1 UseBaseTemplates gt False MyTemplatel 1 Eq u 4 Sec at c 4 Cos x Sec 2 c Sin 2 2a c Sec 2 c Sin 2 2a c 4X Cos s b Sin t 4 Sin x 2Tan 2 c Cos a c 0 6 Template based solver 153 m 6 2 2 Generate starting equation The list of starting equations is
50. 34 LinkageData 8 The four bar mechanism has one driving variable which specifies the angular pose of the link1 link The animation base point should be defined as points in IR Please notify that the animation base points should be specified as list of Rules where the left hand side is the driving variable the right hand side is the value of that driving variable Animate the four bar mechanism by driving the link1 crank from 0 to 27 In 35 grls AnimateLinkage fourBarMechanism2 012 0 91 gt 2717 Boxed gt False 3 Render linkages 91 m This is the number of frames generated by the animation function Length grls 11 AnimateLinkage took the specified base point for 01 driving variable and divided the 0 27 intervall into 10 segments The generated frames of the animation represent the linkage in the pose of the interpolated points which includes the two base points too 27 E Base points FAI 37 pm 2 Jt m Internal points 2 Ve 2 4 6 8 10 Internal point generation for Resolution 210 You can go from point 0 to point 27 along one line or a polyline This latter one can be used if you one to simulate a non constant velocity movements The following animation generate the same number of frames than the previous but there are only 3 frame generated for the 01 0 7 intervall and 8 frame generated for the 01e 7 27 intervall 92 LinkageDesigner User Manual
51. 92 J1 2 D 05 t NonConstants gt ql 62 063 04 95 gt xl xl j The cardanShaftT1 linkage has 5 time dependent variables namely all the five joint variables of the open mechanism The first derivative of all these time dependent variables are enumerated in the TimeDependentVariables record and the corresponding velocity function is also calculated For q1 variable which is the driving variable of the linkage the velocity function is defined as q1 t The numerical value of this function is defined in the DrivingVelocities record All other velocity functions are defined as a closed form expression You might noticed that these closed form expressions are containing implicitly derived variables 02 03 04 05 whose values are determined numerically Now convert the cardan shaft to a time dependent linkage after the driving variable is replaced with time 186 LinkageDesigner User Manual m Create cardanShaftT2 time dependent linkage Timing cardanShaftT2 ToTimeDependentLinkage ReplaceDrivingVariables cardanShaft t gt 0 ql gt wt SimpleParameters gt w 1 t 5 538 Second LinkageData 10 List the record identifier of cardanShaftT2 linkage cardanShaftT2 1 All 1 MechanismID DrivingVariables SimpleParameters Structure LowOrderJoint LinkGeometry SDerivedParametersB LinkGroundTransformation SDerivedParametersA TimeDependentVariables
52. A gt 0 O2B5 0 Q02B5 0 J2B5 0 3A2 0 O3B5O 3B gt 0 3B 5 0 O1C gt 0 00121527 1C 5 0 0000113797 Out 110 LinkageData 7 5 Advanced Linkage Detinition 137 Define the spherical joint between eg2B and movingPlatform In 111 DefineKinematicPairTo deltaRobot Spherical 02D 2D w2D leg2B mx1 movingPlatform rotMx mx2 CandidateLoopVariables 02B 2B 01Cj This is a loop closing kinematic pair Placing links into constrained position is finished in 11 046 sec Candidate loop variables ql q2 w1lA 92B 2B O1C W1C Non redundant constraint equations 3 Selected loop variables 02B 2B O1C The updated list of driving variables ql gt 0 362607 q2 gt 0 361729 q3 gt 0 355589 y1A gt 0 00047878 Y1B gt 0 Y2A gt 0 Y2B gt 0 Y3A gt 0 0382 0 3B gt 0 Y3B gt 0 Y1C 5 0 00396614 Out 111 J LinkageData 7 138 LinkageDesigner User Manual Define the spherical joint between eg3B and movingPlatform In 112 DefineKinematicPairTo deltaRobot Spherical 03D 3D w3D leg3B mx1 movingPlatform rotMx rotMx mx2 CandidateLoopVariables 03B 3B w1C This is a loop closing kinematic pair Placing links into constrained position is finished in 10 906 sec Candidate loop variables ql q3 W1A O3B 3B w1C Non redundant constraint equations 3 Selected loop variables 03B 3B w1C The updated list of driving variables
53. DefineKinematicPairTo testl Rotational ql linkl mx1 link2 mx2 Out 46 LinkageData 6 DefineKinematicPairTo function adds a default geometric representation to every new link of the linkage The geometries are defined as Graphics3D object and stored in the LinkageData To get the graphics representation of ther link use the overloaded Part function To set new geometric representation to a link use the Set function Re assign the geometric representation of the links In 47 testl LDLinkGeometry link1 linklGeometry Out 47 Graphics3D In 48 testl LDLinkGeometry link2 link2Geometry Out 48 Graphics3D The rotational joint is defined with q1 joint variable Changing the substitutional value of the joint variable rotates Jink2 link Animate the linkage In 54 AnimateLinkage testl q1 gt 0 ql gt 65 PlotRange gt 3 3 3 3 0 9 Boxed gt False 1 Principles of linkage definition 45 m 1 4 2 In Place kinematic pair definition DefineKinematicPair linkage type q1 q2 linki lirfi linkj llrfj jem function appends a kinematic pair definition to linkage and returns the resulted linkage The kinematic pair is defined between linki and linkj links type string specifies the type of the kinematic pair to be defined The LLRFs of linki and linkj are given with rfi and lirfj homogenous matrixes The joint
54. Get the DrivingVelocity of crankSliderMechanismT In 7 testT1 DrivingVelocities Out 7 O1l t gt 1 The DrivingVelocities record stores the first time derivative of the driving variables The driving velocities are set by default to 1 You can override the default value with the TimeFunctions options of ToTimeDependentLinkage function If the linkage has 74 LinkageDesigner User Manual only one driving variables and this variable represent the time the DrivingVelocities record is not generated since the first derivative of the driving variable is 1 Convert crank slider mechanism to time dependent linkage using the 01 as time variable In 8 testT2 ToTimeDependentLinkage crankSliderMechanism 01 Out 8 LinkageData 8 Get the TimeDependentVariables of the resulted LinkageData object In 9 testT2 TimeDependentVariables Out 9 pte2 O1 NonConstants gt 02 93 gt 12 11 Cos 02 63 Sec 03 12 1 D O3 O1 NonConstants gt 02 63 gt i3 11 Cos 2 03 Sec 63 In 10 testTl testT1 3 Render linkages 75 Render linkages If your LinkageData object contains geometric representation of the links you can render or animate your linkage LinkageDesigner support various ways to display and animate linkages Render in Mathematica notebook Render in Dynamic Visualizer Render in VRML97 viewer Also you can use rendering devices capable to disp
55. Grids gt 0 0 1 1 3 Kinematic graph Every kinematic structure can be described in terms of its joints and links Joints constrain the motion of two links This constrained two links constitute a kinematic pair In LinkageDesigner kinematic structures linkages mechanisms are represented by graphs where the links represent the vertices of the graph and the joints represent the edges This graph is called the kinematic graph of the linkage The links represented kinematically with LLRFs and geometrically in terms of their associated shape representation The kinematical and geometrical representation of the crank slider mechanism is shown below 6 Cra 4 0 Ground Slider i Kinematic graph of the crank slider mechanism 36 LinkageDesigner User Manual LinkageDesigner represent kinematic graph as non oriented graph The kinematic graph is represented in LinkageDesigner by a list of kinematic pairs stored in the S8t ructure record of the LinkageData object We will discuss in detail the records of the LinkageData data type in Chapter 2 For the time being it is enough to now that LinkageData wraps all informations of the linkage As you are building your linkage your main task is to build the kinematic graph by enumerating the kinematic pairs of the linkage You can display the graph representation of a linkage using the MakeLinkageGraph funtion This function returns a Graph object that can be ma
56. LinkageData to linkage SetSimpleParameters linkage new Set the simple parameters of linkage to new SetSimpleParametersTo linkage new Set the simple parameters of linkage to new resets the resulted LinkageData to linkage Functions for setting the independent variables of LinkageData 62 LinkageDesigner User Manual m Set the driving variables of testReturn SetDrivingVariablesTo testReturn ql gt 15 LinkageData 6 testReturn DrivingVariables q1 gt 15 m Set the simple parameters of testReturn SetSimpleParametersTo testReturn 11 gt 5 LinkageData 6 testReturn SimpleParameters 1125 In case of linkages with simple kinematic graph serial chain or tree setting the independent variable is nothing else than replacing the second argument of the Rule function However for more complicated linkages setting the independent variables includes the solution of the constraint equations for the new set of independent variables Therefore it is advised to never change the value of the independent variables by other means than the SetDrivingVariables and SetSimpleParameters functions 2 4 Dependent variables of the linkage LinkageDesigner distinguishes two kind of dependent variables based on the way they are defined If the dependent variable y can be expressed as the explicit function of the independent variables xj xo it is stored in the DerivedParametersA record
57. Path constants of LinkageDesigner package Load LinkageDesigner package lt lt LinkageDesigner Load the crank slider mechanism lt lt crankSliderMechanism txt Show the crank slider mechanism in the 01 40 rotated pose In 29 Show Linkage3D SetDrivingVariables crankSliderMechanism 91 gt 40 LinkMarkers gt All MarkerSize gt 4 Axes gt True FaceGrids gt 0 0 1 Out 29 Graphics3D Export the crank slider mechanism in the 01 40 rotated pose to VRML97 world In 30 WriteVRMLLinkage SetDrivingVariables crankSliderMechanism 01 gt 40 LinkMarkers gt All MarkerSize gt 4 Axes gt True FaceGrids gt 0 0 1 Out 30 C Documents and Settings erdos Application Data Mathematica Applications LinkageDesigner Examples VRMLOutput wrl 88 LinkageDesigner User Manual The way you visualize the VRML97 world might depend on both the operating system and the configuration of the viewer Please refer to the reference manual of your VRML97 viewer If your VRML97 viewer is installed on your system as the plug in of your browser you can simply open the generated file with your browser m Start netscape explorer with the generated VRML97 file In order to see the VRML world you must have installed a plug in on your system In 33 Run start explorer lt gt LinkageVRMLFile Out 33 0 Crank slider mechanism rendered in VRML97 viewer 3 4 Animate
58. PlaceShape function of LinkageDesigner PlaceShape shape mx s places shape Graphics3D primitives with mx homogenous transformation matrix and scale it with s PlaceShape shape mx places shape Graphics3D primitives with mx homogenous transformation matrix Place Graphics3D with homogenous transformation m Place link2Geometry to its constrained place In 57 link2GeometryConstrained PlaceShape link2Geometry MakeHomogenousMatrix 0 0 6 2 0 0 1 Out 57 Graphics3D Show the geometries of link and link2 in their constrained place In 63 Show linklGeometry link2GeometryConstrained PlotRange gt 3 3 3 3 0 9 Out 63 Graphics3D 48 LinkageDesigner User Manual Create a test linkage with link as the Workbench In 64 test2 CreateLinkage test2 WorkbenchName gt link1 Out 64J LinkageData 6 Append the rotational joint definition between link and link2 to test linkage In 65 test2 DefineKinematicPair test2 Rotational ql link1 IdentityMatrix 4 link2 IdentityMatrix 4 IdentityMatrix 4 Out 65 LinkageData 6 You might noticed that test 2 linkage uses different LLRF and joint markers than test 1 linkage specified in Section 1 4 1 In case of test2 both LLRF of the links are identical with the reference frame well this is true only if q1 is equal to 0 This follows from the fact that you can arbitrarily choose t
59. Quick Tour the inverse kinematic problem can be used to resolve loop closing constraints in closed form too LinkageDesigner implemented an algorithm of 144 Ch 06 TemplateBasedSolver nb the template solver that basically the same as Paul s one for further references see 4 In this chapter we will define the PUMA 560 robot and solve its inverse kinematic problem using the template based solver PUMA 560 industrial robot with the tool frame 6 1 Define the PUMA 560 robot It is quite common in the robotics literature to define the open kinematic chain of the manipulators with the Denavith Hartenberg parameters For the definition of these parameters you can refer any standard text book on robotics In LinkageDesigner you can define kinematic pairs using Denavith Hartenberg DH parameters see Section 1 4 3 DefineKinematicPair linkage type linki linkj a d 7 function appends a kinematic pair definition to linkage and returns the resulted linkage The kinematic pair is defined between linki and linkj links type string specifies the type of the kinematic pair to be defined The four D H parameters specifies the transformation between the LLRFs of the two links Only Rotational and Translational joint definition is allowed Define kinematic pair with Denavith Hartenberg parameters 6 Template based solver 145 Load LinkageDesigner package lt lt LinkageDesigner Create a
60. Simplify the solution sol FullSimplify sol 1 2 e2 gt arctan 2 iii S10 11 12 13 2 10 11 Cos 01 4 12 13 10 411 12 13 21011 Cos O1 12 ArcTan 10 Sin O1 11 10 Cos 01 102 11 12 137 21011Cos 1 1213 03 gt ArcTan fh 10 11 12 13 2 10 11 Cos 01 1 4 12 13 d 10 11 12 13 2 10 11 Cos 01 412 13 10 117 127 137 21011Cos 1 12 ArcTan 10 Sin O1 11 10 Cos 01 10 11 12 13 21011Cos 1 1213 02 gt ArcTan 2 13 rE B 63 gt ArcTan a 10 11 12 13 2 10 11 Cos 01 I 412 13 m Define two resolved linkage The PatternSolve function found two solution of the inverse kinematic problem The solution express the derived parameters 02 03 as the explicit function of the independendent variables driving variables and simple parameters The closed form solution of the inverse kinematic problem can be added as SDerivedParametersA record of the LinkageData object Since 62 63 are defined explicitly the implicit definition specified in the DerivedParametersB record is redundant and can be deleted This way you can define two resolved linkage that has its loop closure equations solved in closed form Linkage Designer Getting Started 25 m Append the first solution branch of the inverse kinematic problem to the SDerivedParametersA record and re
61. Sin e4 02849870 Cos 02 Sin 5 65 49870 Cos 02 Cos 03 Cos 04 Sin 5 65 49870 Cos 62 Sin 3 Sin 4 Sin 65 Sin o2 y1 Cos 2 y1 12 63549870 Cos ql Cos 03 62549870 Cos 62 Cos 63 Sin ql 63 49870 Sin ql Sin 62 Sin 63 Cos q1 Cos 3 Sin 2 q1 t Sin ql Sin 03 gl t 11 65 49870 Cos 2 Cos 65 Sin ql 11 Cos 05 Sin 04 03 49870 Cos 63 Sin ql Sin 2 63 49870 Cos ql Sin 03 62 49870 Cos 62 Sin ql Sin 63 Cos 03 Sin ql ql t Cos ql Sin 2 Sin 63 gl t Sin 1 Sin 2 wl1 12 62 49870 Cos qa1 Cos 02 Cos 03 63 49870 Cos 03 Sin ql 63 49870 Cos ql Sin 2 Sin O3 Cos 03 Sin ql Sin 2 q1 t Cos ql Sin 63 gl t 11 05 49870 Cos q1 Cos 62 Cos 05 64849870 Cos E64 Cos 5 Cos 03 Sin ql Cos ql Sin 62 Sin 63 64549870 Cos 5 Cos ql Cos 3 Sin O2 Sin ql Sin 63 Sin 04 062 49870 Cos q1 Sin 92 Sin 05 65 49870 Cos 4 Cos q1 Cos 3 Sin O2 Sin qg1 Sin 3 Sin 95 65 49870 Cos 03 Sin ql Cos qd1 Sin 62 Sin O3 Sin 04 Sin 65 Cos 2 Sin ql Sin 5 ql t Cos 04 Cos 5 62 49870 Cos ql Cos 02 Cos 03 63 49870 Cos 03 Sin ql 63 49870 Cos ql Sin 62 Sin 93 Cos 03 Sin ql Sin 2 ql t Cos ql Sin O3 ql t Cos 05 Sin 04 03 49870 Cos q1 Cos 03 Sin 02 62 49870 Cos q1 Cos 62 Sin 03 63 49870 Sin ql Sin O3 Cos q1 Cos 903 ql t Sin ql Sin 2 Sin 63
62. T3 ql gt 30 0 551 Second 0 000170513 1 49553x10 0 000295339 2 1 96883x 107 0 0000113448 m 7 2 3 Plot velocity and acceleration diagrams Most of the time when you do kinematics analysis on a linkage you want to plot the velocity and or acceleration diagrams In LinkageDesigner you can easily create plots using the in build plotting function of Mathematica Here we will plot the angular velocity and acceleration diagrams of the driven shaft link3 In order to illustrate the benefits of the parametric design the deflection angle will be changed to model the effect of the small angular error of the assembly We will introduce 1 of misalignment between the driving and driven shaft Also in order the speed up the calculation we use NToTimeDependentLinkage to convert the linkage into time dependent linkage 194 LinkageDesigner User Manual Convert to time dependent linkage the cardanShaft Timing cardanShaftT4 NToTimeDependentLinkage ReplaceDrivingVariables cardanShaft t gt 0 q1 gt wt SimpleParameters gt w gt 27 t 1 021 Second LinkageData 10 Introduce 1 of error in the deflection angles SetSimpleParametersTo cardanShaftT4 2 gt 30 wl gt 31 MaxIterations gt 120 LinkageData 10 Calculate the translational and rotational velocity of link3 at q130 Timing v4 GetLinkageDerivative cardanShaftT4 link3 0 5 Second Null Get the list of subs
63. There are two new record appeared to cardanShaft linkage the SDerivedParametersA and STimeDependentVariables m List the SDerivedParametersaA record of cardanShaftT2 linkage cardanShaftT2 LDDerivedParametersA ql gt tw This record contains the explicit time dependencies of the old driving variable q1 7 Kinematics of linkages 187 m List the STimeDependentVariables record of cardanShaftT2 linkage Short cardanShaftT2 LDTimeDependentVariables 15 D ql t NonConstants gt ql 92 O3 04 95 gt w lt 3 gt gt D 95 t NonConstants gt ql 62 063 04 95 gt Ere 1 12 Cos 62 Cos 63 Cos 2 y1 Sin ql 11 Cos 62 Cos 03 Cos 04 Cos 5 Cos 2 y1 Sin ql 11 Cos 62 Cos 05 Cos 2 y1 Sin ql Sin 3 Sin e4 11 Cos 2 w1 Sin ql Sin 62 Sin 5 12 Cos 63 Cos 1 Sin O2 Sin 2 y1 11 Cos 63 Cos 04 Cos 05 Cos 61 Sin 2 Sin 92 y1 11 Cos 5 Cos 1 Sin 62 Sin 63 Sin 64 Sin 2 y1 11 Cos 62 Cos 1 Sin 05 Sin 2 y1 12 Cos q1 Cos 2 Cos 63 Sin 1 Sin 2 y1 11 Cos q1 Cos 2 Cos 03 Cos 64 Cos 5 Sin 1 Sin 2 y1 11 Cos q1 Cos 62 Cos 5 Sin 03 Sin O04 Sin 1 Sin 2 y1 11 Cos ql Sin 62 Sin 5 Sin 1 Sin 2 w1 13 Cos 5 3 gt 1 Cos 02 Cos 04 Cos 5 Sin 3 Cos 61 Cos 92 y1 Cos w2 Sin 1 Sin w2 Cos 2 Cos 3 Cos 5 Sin O4 Cos 1 Cos 92 y1 Cos w
64. acement Create the joint marker of Workbench JointMarker2 Simplify GetLLRFMatrix cardanShaft link3 ReferenceFrame gt Workbench JointMarkerl q1 gt 0 025 1 035 y1 045 2 05 gt y2 Cos o1 Sin 2 W1 Cos wW2 Sin 1 Cos 61 Cos 2 y1 Sin U2 Cos o1 Cos 2 y1 Cos w2 Sin 1 Sin y2 Cos o1 Cos W1 12 11 Cos 62 Cos w2 11 Cos w2 Sin 2 Sin w1 11 1 Sin 1 Sin w2 Sin 1 Sin 62 1 Cos 1 Cos w2 Cos 2 y1 Sin 1 Sin 2 Cos 2 Cos U1 Cos U2 Sin 1 Cos W2 Sin 1 Sin 2 Sin y1 Cos 1 Sin w2 Cos w1 12 11 Cos 2 Cos w2 Sin 1 11 Cos W2 Sin 1 Sin 2 Sin W1 Cos 1 Sin W2 Cos 2 y1 Sin 2 wW1 Sin w2 Cos w2 Sin 2 41 12 Sin W1 11 Cos w2 Sin 2 W1 0 0 0 1 7 Kinematics of linkages 179 Display cardanShaft with the two loop closing joint marker Show Linkage3D cardanShaft LinkMarkers gt link3 JointMarkerl Workbench JointMarker2 MarkerSize gt 70 Graphics3D Define the loop closing kinematic pair between link3 and Workbench DefineKinematicPairTo cardanShaft Rotational 96 link3 JointMarker1 Workbench JointMarker2 Verbose gt True This is a loop closing kinematic pair FindMinimum fmgz Encountered a vanishing gradient The result returned may not be a minimum it may be a maximum or a saddle point Placi
65. age to mx and reset the resulted linkage to linkage Change the Ground Workbench transformation option name default value AppendLinkGround True Specifies whether to calculate and append Transformation the SLinkGroundTransformation record to the linkage Option of PlaceLinkage Animate the linkage In 58 Timing AnimateLinkage crankSliderMechanism 012 0 5 012 27 MaxIterations 50 2 LinkageData A new datatype 71 Out 58 1 071 Second Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D m Place the linkage to append the LinkGroundTrans formation record PlaceLinkageTo crankSliderMechanism LinkageData 8 m Get the LinkGroundTransformation record crankSliderMechanism LinkGroundTransformation CrankSlider ConnectingRod Cos p1 01 Cos 62 Sin p1 91 Sin 92 Cos 02 Sin p1 61 Cos p1 61 Sin 2 0 11 Cos p1 01 Cos 92 Sin p1 91 Cos p1 901 Sin O2 Cos p1 61 Cos 2 Sin p1l 61 Sin 2 0 11 Sin pl 061 0 0 1 0 0 0 0 1 CrankSlider Crank Cos p1 91 Sin p1 O1 0 0 Sin p1 91 Cos p1 01 0 0 0 0 1 0 0 0 0 1 CrankSlider Ground 1 0 0 0 0 1 0 O 0 0 1 0 0 0 0 1 CrankSlider Slider Cos 03 Cos pl1 61 Cos 2 Sin p1 901 Sin 2 Cos 02 Sin pl 61
66. ageDesigner User Manual CreateLinkage function appends a sub record to the Structure record beside the SMechanismID record The St ructure record stores the informations of the kinematic pairs m Get the St ructure record of test LinkageData test S Structure test Base 0 test Ground test Workbench trl 0 0 0Y 0 L 0 0 T0 0 Ly OF 0 0 0 LE test Workbench test Ground 17 07 070 045 05 1 0 Ot 10 OF Ly Ok f0 0 05 11 T1 The Structure record stores three information of the kinematic pair 1 String identifier of the kinematic pair test Base 0 2 String identifier of the two links test Ground test Workbench 3 Homogenous transformations of the LLRF of the upper link to the lower one and vice versa 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 The default settings of CreateLinkage can be changed by using one or more options of this function m Create a linkage with the name test1 by overriding the default settings In 2 testl CreateLinkage test1 WorkbenchName gt MyWorkbench GroundName gt MyGroundName WorkbenchPlacement gt MakeHomogenousMatrix 10 0 10 PlacementName gt FirstKinematicPair Out 2 LinkageData 6 m Get the MechanismID and the Structure records of test LinkageData test1 SMechanismID testl test1 MyGroundName test1 MyWorkbench 2 LinkageData A new datatype 59 test1 Structure test1 FirstKi
67. ample of a simple spatial mechanism the cardan shaft and convert it into time dependent linkage in both way The kinematic analysis of the linkage including the angular velocity and acceleration plot of the driven shaft will be also presented 7 1 Define the cardan shaft linkage The cardan shaft mechanism is used to transmit rotation and torque between two non coaxial shaft If the driving and driven axis is connected with one universal joint the angular velocity of the driven shaft would oscillate even if the angular velocity of the driving shaft is constant These variations in velocity give rise to inertia forces torques noise and vibration By using a double joint the variation of angular motion can be avoided provided that m The two forks of the intermediate shaft ink2 lies in the same plane The angle between the first shaft ink and the intermediate shaft Jink2 must exactly be the same with that between the intermediate shaft ink2 and the last shaft link3 In order to model the different configuration of the cardan shaft linkage the deflection angles of the shafts will be defined as simple parameters Load LinkageDesigner package lt lt LinkageDesigner Off General spell Off General spel11 m Create linkage with link length and deflection angle parameters cardanShaft CreateLinkage cardanShaft SimpleParameters 112 150 122 310 12 0 y1 gt 0 022 0 y22 0 LinkageData 6
68. ations for the four pistons In 64 mxList MakeHomogenousMatrix 0 0 amp e 0 d 2d 3d Out 64 1 0 0 0 0 1 0 0j 0 0 1 0 0 0 0 1 1015 0 05 diy 105 1 04 037 05 0 5 1 Qi Q0 07 0 lh 1 0 0 2d 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 3d 0 1 0 0 0 0 1 0 0 0 0 1 Place piston linkage with the placement matrixes of mxList In 65 pistonList PlaceLinkage piston AbsolutePlacement gt False amp mxList Out 65 LinkageData 8 LinkageData 8 LinkageData 8 LinkageData 8 108 LinkageDesigner User Manual Rename resulted four LinkageData object to pistonl piston2 piston3 piston4 In 66 pistonList Table RenameLinkage pistonList i piston ToString i i 1 Length pistonList Out 66J LinkageData 8 LinkageData 8 LinkageData 8 LinkageData 8 List the SimpleParameters record of the four piston In 67 LDSimpleParameters amp pistonList Out 67J pl 70 11345 125100 105 15 1offs50 0545 d gt 70 p1 gt 0 11 gt 45 125100 1025 15 1loffs50 06545 a2 70 p1 gt 0 11 gt 45 125100 1025 15 1offs50 0545 22 70 p1 gt 0 11 gt 45 125100 10 gt 15 1offs50 0545 d gt 70 There are only two parameters of the pistons that will hold different values for the four pistons when they are attached the p1 and parameters The first is the j
69. ative to the LLRF If for some reason the geometry is defined in a different coordinate system you should apply the PlaceShape function on the Graphics3D object to transform it into its correct placement before it is assigned to the LinkageData m Assign the Graphics3D objects to the links of puma560 robot MapThread puma560 LDLinkGeometry 1 2 amp Table link lt gt ToString i i 0 6 geometryList Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D 148 Ch 06 TemplateBasedSolver nb Display the puma560 robot Show Linkage3D puma560 LinkMarkers gt All MarkerSize gt 200 Axes gt True PlotRange gt A11 400 9g 200 200 Graphics3D 6 2 Solve the inverse kinematics problem The Template Based technique is an iterative solution method It can be applied on a set of redundant or non redundant equations The solution contains four main steps 1 Generate the equations of the inverse kinematic problem 2 Convert to normal form the equation with respect to the list of unknown variables 3 Search for matching equations 4 Select and store the solution for the matched variable After step 4 the matched variable is removed from the list of unknown variables and the algorithm continues at step 2 The iteration continues until all unknown variables are expressed The iterative algorithm of the Template Based technique is not en
70. ay that the only driving variable is the time This can be done for example by defining the explicit dependencies of the old driving variables on the time ReplaceDrivingVariables function can be used to exchange the old driving variables with the time If the only one driving variable of the linkage is the time ToTimeDependentLinkage and NToTimeDependentLinkage functions will append only the TimeDependentVariables record to the LinkageData object Otherwise they will create a new record the DrivingVelocities record and add the velocity values of the driving variables to it The driving velocities are also independent variables if the kinematics of the linkage is investigated The default values of the driving velocities are 1 but these values can be overridden either by the TimeFunctions options of the ToTimeDependentLinkage function or by the SetDrivingVelocities To functions First convert the cardan shaft to a time dependent linkage using ToTimeDependentLinkage function m List the record identifier of cardanShaft linkage cardanShaft 1 All 1 SMechanismID DrivingVariables SimpleParameters Structure LowOrderJoint LinkGeometry SDerivedParametersB SLinkGroundTransformation 184 LinkageDesigner User Manual You might noticed that there are two new record appeared DrivingVelocities and m Create cardanShaftT1 time dependent linkage Timing cardanShaftT1 ToTimeDependentLinkage cardanShaft t
71. bench link GroundName Ground Defines the name of the Ground link WorkbenchPlacement Automatic Homogenous transformation matrix specifying the placement of the Workbench link w rt the reference PlacementName Automatic Name of the kinematic pair defining the Workbench placement SimpleParameters Q List of simple parameters to add to the SimpleParameters record Options of CreateLinkage m Create a linkage with the name test and assign the resulted linkage to test symbol test CreateLinkage test LinkageData 6 CreateLinkage returns a LinkageData object containing 6 records To investigate the contents of the records list the first part of the LinkageData object m Display the records of the LinkageData object in ColumnForm ColumnForm test 1 SMechanismID test test Ground test Workbench SDrivingVariables SSimpleParameters SStructure test Base 0 test Ground test Workbench 1 0 0 0 SLowOrderJoint SLinkGeometry The first data stored in SMechanismI D record is the name of the linkage fest LinkageDesigner use a composite naming strategy to identify the links and kinematic pairs The name of the linkage is used to create the full name of entity names Every link and kinematic pair is identified by an EntityName string The FullName of this identifier 2 LinkageData A new datatype 57 strings is composed by concatenating the LinkageName s
72. c list of link to be displayed LinkMarkers Automatic list of link markers to be displayed Resolution 10 number of interpolated points between the driving variable values TracePoints None link attached points that draws trace during the animation TraceStyle Automatic graphics directives that specify how to render the trace curves Common options of linkage animation functions 90 LinkageDesigner User Manual Like other animation in Mathematica notebook AnimateLinkage generates a list of frames which can be displayed in quick succession to produce an animated movie DVAnimateLinkage and WriteVRMLAnimation generates only the list of transformation matrixes of the links corresponding to the frames of the movie Load LinkageDesigner package In 1 lt lt LinkageDesigner If the number of driving variables of a linkage is n than the list of driving variable values can be considered as a point in IR In the second argument of the linkage animation function a series of such point is specified These point are base point of the linear interpolation Every two consecutive base points defines a linear segment The animation function generate a series of internal point on these segments to arrive to the final list of driving variable value vectors The number of internal point to be generated is defined by the Resolution options which is by default 10 Load the fourbar mechanism In 34 fourbarMechanism txt Out
73. capsulated into 6 Template based solver 149 one function but kept in a component level This might requires more user interactions but also gives the freedom to alter the solution steps The main design concept was to provide a set of tool that additional to the existing functions like Solve can help to solve the inverse kinematic problem The success of the Template Based solution technique depends heavily on the template equations For this very reason it is possible to define your own set of template equations and use them with the same functions but changing the set of base template equations to your own set Name Pattern rd Sel Suas Sic_ 102 Coe Sing Se l So moa em d T3 Se cos sm Se Slo tse Sia Sia Sr l 0 Cos sie aa Se eese S9 TSC Q Sel sSa Sana Sul Is Susum Sw2 T5 Se Ser Sapa Sin Su O Cosik n MESS NM EE LS GLEN e Cos Sic_ So Se Sa Simli l Cos St Sa Seok Sig Sauna Se C T7 Cos E Sedi Sa Cos Sail 5 2 Slo Se 0 Sol Sa Siva Stil leso Stn Sel 9 2 T8 Cos Sei Sa cessi S 2 So Se Sol Se Sila Stil S9 Sain Sicil_ Sie2 0 T9 Cos Sti sa See ssbecsin stiecst2 0 Ceos Sul 962 Slo sel xe Sisal Sci_j 75112 So pha E Base template equations In the base template equations the a b c d e symbols stands for the expressions containing no variables while the t t1 t2 are the placeholder
74. ched Cartesian coordinate frame This frame is called as Local Link Reference Frame LLRF while the rigid bodies are referred later in this text as links During the motion of a link we keep track of the position and orientation of the LLRF relative to a reference frame The position and orientation of the LLRF relative to a reference frame is represented in LinkageDesigner with a 4x4 homogenous matrix 32 LinkageDesigner User Manual X1 Yi Z1 Oi X2 Y2 Z2 O2 X3 Y3 Z3 O3 0 0 0 1 eference Local Link Reference Frame T homogenous matrix can be interpreted as coordinate transformation between x yz and xyz coordinate systems or as an displacement operation that place xyz frame into x y z frame It is important to understand the differences between the two interpretation because LinkageDesigner use both of them If T matrix is interpreted as coordinate transformation than it maps the coordinates of a point in x yz to the coordinates in the xyz coordinate systems Given a point P on the link specified by the p vector relative to x yz coordinate system The coordinates of this point relative to the xyz coordinate system is specified by the p vector The connection between the two vector is defined by equation 1 Hoare m If T is interpreted as displacement operation it moves a frame from an original placement to its present placement This interpretation can be used to determine the elements of T matrix The 3 tuple of every co
75. cobiMatrix function and returns a list of two vector The first is the translational velocity while the second one is the angular velocity vector Naturally if higher order derivative is requested the returned list correspond to the translational rotational derivative of the order specified There are two important restrictions for the usage of Get LinkageDerivative function The linkage should be converted to time dependent linkage before this function is called If the linkage was converted with NToTimeDependentLinkage function GetLinkageDerivative calculates only the first derivatives 7 Kinematics of linkages 191 This second restriction is not so severe since based on the first derivative functions any higher order derivative can be approximated using some in build interpolation function as we will see later in this chapter Get the first derivatives of link3 s motion in cardanShaftT1 linkage Timing v1 GetLinkageDerivative cardanShaftT1 link3 5 218 Second Null The resulted expressions are quite long to display It is better to substitute the parameter values before show it If you want to know the velocity of link3 at the driving variable q1 gt 30 pose at ql t 1 rad s driving velocity set the driving variables than get the substitution rules of the resulted linkage and substitute it into v1 Calculate the translational and rotational velocity of link3 at q130 Timing v1 GetLinkageRules Se
76. d DrivingVelocities records of linkage NToTimeDependent Linkage linkage t Generates the equations of the first derivatives of the time dependent variables with respect to t The generated equations are appended to the DerivedParametersB record Convert linkages into time dependent ones In order to calculate the derivatives of the motion the linkage has to be converted into a time dependent linkage This can be done by the ToTimeDependentLinkage and the NToTimeDependentLinkage functions The primary task of these functions is to calculate the first derivatives of all time dependent variables and store them in the STimeDependentVariables record Even if in theory the first derivative of the time dependent variables can always be solved in closed form sometimes the expressions are so big that the solution would require considerable time and memory resources To overcome this problem LinkageDesigner introduced the NToTimeDependentLinkage function which only generates the set of linear equations but not solve them The equations determining the first derivatives are appended to the DerivedParametersB record and solved simultaneously with the other constraint equations The equations of this record are solved numerically with the FindRoot function which is usually much more faster than the closed form solution 7 Kinematics of linkages 183 m 7 2 1 Create time dependent linkage You can define a linkage in such a w
77. d 183 7 2 2 Calculate the velocity of the motion ipio er ra tp S PS Sp Pe ER DHL as 190 7 2 3 Plot velocity and acceleration diagrams eese 193 Introduction LinkageDesigner is an application package for virtual prototyping linkages It is designed to analyse synthesize and simulate linkages with serial chain tree and graph structure Using the symbolic calculation capabilities of Mathematica LinkageDesigner support fully parametrized linkage definition and analysis too Linkages are described in LinkageDesigner as a set of kinematic pairs Kinematic pair definitions are stored in LinkageData object which is the base data model of the package Kinematic pairs are defined with DefineKinematicPair function Principally there are two different types of kinematic pairs handeld by this function i kinematic pair that does not create loop in the kinematic graph of the linkage open kinematic pair ii loop creating kinematic pair loop closing kinematic pair In the first case the mobility of the linkages is increased by the number of joint variables of the open kinematic pair In the second case the mobility of the linkages is decreased by the number of non redundant constraint equations imposed 2 Linkage Designer Getting Started RotationalJoint allows relative rotation of the two links of the kinematic pair around a common axis TranslationalJoi allows relative translation of the two links of the k
78. der linkages 83 Dimension of the piston parts The 3D graphics of the piston s part shown above is stored in the head stl crank stl ConRod stl files located in the STL subdirectory of the SLinkageExamplesDirectory Copy the crank slider mechanism into a new variable In 17 piston crankSliderMechanism Load the stl files of the piston s parts In 22 geomList Import ToFileName LinkageExamplesDirectory STL amp e crank stl ConRod stl head stl Out 22 Graphics3D Graphics3D Graphics3D All link geometry should be defined relative to the LLRF of the link Since the LLRF of the link might not known at the time the link s geometry is created you might need to displace the geometry before assign it to the link You can place and or scale the exported geometry into its correct reference frame by using the PlaceShape function 84 LinkageDesigner User Manual PlaceShape graphics mx Transform the graphics with mx homogen ous transformation PlaceShape graphics mx s Transform the graphics with mx homoge nous transformation and scale it Place a Graphics3D object Set the geometries of the Crank link In 23 piston LinkGeometry Crank geomList 1 Set the geometry of the ConnectingRod link after translating with 0 0 10 vector In 24 piston LinkGeometry ConnectingRod PlaceShape geomList 2 MakeHomogenousMatrix 0 0 10
79. e sec angular acceleration rad sec angular velocity rad sec SymbolShape gt None PlotJoined gt True GridLines gt Automatic PlotStyle gt Thickness 0 01 RGBColor 1 0 0 Thickness 0 01 RGBColor 0 0 1 b oO U 7 oO o 0 75 6 3 ue 4 O v 5 6 34 G O 0 25 6 3 5 is 5 p A 0 6 30 4 O 9 J H 20 25 6 30 m gt 0 5 6 24 t i 4 0 75 6 25 00 Oo 3 0 0 2 0 4 0 6 0 8 1 E 2 Time sec to 0 raphics Index Linkage3D LinkGeometry option 78 LinkMarkers option 78 AnimateLinkage 27 89 Resolution 91 TracePoints 89 TraceStyle 89 AppendTemplateSolution 157 AttacheLinkage 106 BaseLink option 107 CommonParameters option 107 AttacheLinkageTo 106 BaseTemplateEquations 164 ConstantExprQ 150 ConvertToNormalForm 155 CreateLinkage 6 GroundName 7 PlacementName 7 SimpleParameters 7 WorkbenchName 7 WorkbenchPlacement 7 CreateTemplateEquation 150 DefineKinematicPair 8 CandidateLoopVariables 14 CandidateLoopVariables option 125 132 CheckRedundantEquations option 125 ConstraintEpsilon option 125 ConstraintWorkingPrecision option 125 Denavith Hartenberg 49 144 EnforceDOF option 125 In Place 45 JointLimits 13 JointName 13 JointPose 13 LockingEnabled 14 LockingEnabled option 125 Ou Of Place 40 Parameters 13 Verbose option 125 DefineKi
80. e links are superpositioned One can imagine that the linkage is built on a workbench which can be placed anywhere in the world by changing the placement transformation between the Workbench and the Ground links Every links should have a unique name in the LinkageData database The string identifiers therefore stored in their full name A full name is made up of the name of the linkage this is the surname and the entity name this the given name For example the name of the linkage is fourBar and the entity name of the link is IlinkO then the full name of this link will be fourBarQ linkO CreateLinkage defines automatically a name to the two base links To change the default name assigned to the Ground and Workbench links the GroundName and WorkbenchName options of CreateLinkage function should be used On Figure 1 linkO notifies the local ground of the linkage therefore specify the WorkbenchName options to linkO Also add the angle 4 of the linkO link and the reference x axis to the LinkageData record as a simple parameter Linkage Designer Getting Started 7 m This create a LinkageData object fourBarMechanism CreateLinkage FourBar WorkbenchName gt link0 SimpleParameters gt gt 0 LinkageData 6 option name default value WorkbenchName Workbench defines the name of the Workbench link GroundName Ground defines the name of the Ground link WorkbenchPlacement Automatic Homogenous transfo
81. e the elements of the target matrix By default GenerateInvKinEquations use the target variables as it is indicated in 1 If you want to specify other symbols as the target variables you can specify it with the TargetMarker option In case of the PUMA 560 robot the target matrix specifies the position and orientation of Jink6 s LLRF relative to linko Generate the starting set of equations eqlist GenerateInvKinEquations puma560 link6 link0 6 Template based solver 155 Short eqlist 10 d2 d3 02 Cos q1 01 Sin q1 0 d1 Cos q2 03 Cos q2 d4 Cos q3 01 Cos q1 Sin q2 02 Sin ql Sin q2 0 lt lt 65 gt gt z3 Sin q2 Cos q6 Sin q3 Sin q5 Cos q3 Cos q4 Cos q5 Cos q6 Sin q4 Sin q6 Cos q2 Cos q3 Cos q6 Sin q5 Sin q3 Cos q4 Cos q5 Cos q6 Sin q4 Sin q6 z1 Sin ql Cos q5 Cos q6 Sin q4 Cos q4 Sin q6 Cos ql Cos q2 Cos q6 Sin q3 Sin q5 Cos q3 Cos q4 Cos q5 Cos q6 Sin q4 Sin q6 Sin q2 Cos q3 Cos q6 Sin q5 Sin q3 Cos q4 Cos q5 Cos q6 Sin q4 Sin q6 z2 Cos q1 Cos q5 Cos q6 Sin q4 Cos q4 Sin q6 Sin ql Cos q2 Cos q6 Sin q3 Sin q5 Cos q3 Cos q4 Cos q5 Cos q6 Sin q4 Sin q6 Sin q2 Cos q3 Cos q6 Sin q5 Sin q3 Cos q4 Cos q5 Cos q6 Sin q4 Sin q6 0 m 6 2 3 Search for matching equations After the starting equations were defined the pat
82. ed originally as an empty list Define an empty list that will hold the solution of the inverse kinematic problem FinalSolution m Append the first template solution to the FinalSolution AppendTemplateSolutionTo FinalSolution solutionSet 1 iai 2 ArcTan d2 d3 02 01 V d2 d3 01 027 d2 d3 01 02 V d2 d3 01 027 ql ArcTan d2 d3 02 01 V d2 d3 01 02 d2 d3 01 02 V d2 d3 01 027 158 Ch 06 TemplateBasedSolver nb Second Iteration During the first iteration q1 variable is solved for the target variables In this iteration step therefore it is considered as known variable and the PatternSolve function is called with the q2 q3 q4 q5 q6 unknown variables This will result different normal form of the same equations which might match some template equation m Search for template solution on q2 q3 q4 q5 q6 junknown variables Timing solutionSet PatternSolve eqlist q2 q3 q4 q5 q6 1 703 Second Null 6 Template based solver 159 Display the solutions FormattedTemplateSolutions solutionSet 14 No Name Solution Conditic 1 T9 a2 5 ArcTan a2 01 Cos ql 02 Sin g1 a2 a4 dl 03 01 Cos q1 02 Sin g1 a1 03 4 a2 01 Cos q1 02 Sin ql 4 a4 d1 03 01 Cos q1 02 Sin q1 a2 d4 d1 03
83. edParametersA record of crankSliderMechanisml crankSliderMechanisml DerivedParametersA e2 2 pl O1 ArcTan V 1 loffs 11Sin p1 01 127 loffs 11Sin p1 01 12 63 gt ArcTan V 1 loffs 11Sin p1 61 127 1 ig loffs 11Sin p1 61 J 2 LinkageData A new datatype 67 Set the 01 driving variable to 70 of crankSliderMechanisml and display the linkage Show Linkage3D SetDrivingVariables crankSliderMechanisml 91 gt 70 Boxed gt False Workbench Graphics3D 2 5 Auxiliary records LinkageData contains some auxiliary records which are used in the visualization or the simulation of the linkage LinkGeometry Stores the geometric representation of the links LowOrderJoint Stores data of the low order joints LinkGroundTransfo Stores the transformation of every LLRF to the rmation Global Reference Frame Auxiliary records In order to visualize a linkage the geometric representation of the links should be stored The LinkGeometry record stores the geometric representations of the links The geometric representation of a link is a Graphics3D object DefineKinematicPair appends a geometric representation for every new links The default geometric representation can be overridden by the AppendLinkGeometry options 68 LinkageDesigner User Manual AppendLinkGeometry gt Automatic the geometric representation contains only a text primitive w
84. es selection 1 oou eee eres o ieet reae eese su Robe o neue REE EE 130 5 2 3 Finalizing the linkage definition eeseeeeee 138 Template based solver Locher pr teretpe dere x reU FORME CI a Ud cerae ERR Rr FERM CEDE Se TUE 143 6 1 Define the PUMA 560 TODOL etai ici ean t to heec dU d Ae ab e uides 144 6 L1 Add geomelty 2e Eo be OH UI EA dieu easels 146 6 2 Solve the inverse kinematics problem rerit ete tatto entren nuns 148 6 2 1 TemplateEguation data EVDO eedeeee un hi rrA DO IEEE Dn t EIER PAR HER PAR REO PRESE 150 6 2 2 Generate starting equation 22 siancsscnadesvacassnntesaashiecsanceseieddearesaaccessancenesss 153 6 2 3 Search for matching equations ss seessesseeeseseeeesresesererserserersresrerssrssreese 155 First Iteration MEN PR E eee ae ENR 156 Second Iteration T 158 ben 160 PU Iteration RTT 164 Fath eration rcr 166 6 3 Define the inverse linkages y lt ssersazscssasacenscannseann Rp ipa ao PR RUEU AM S EAR FRU audi secre ras 168 References MIL 172 Kinematics of linkages c e 173 7 1 Define the cardan shaft linkage sseeeeeeseeeeeseesersesessressrrssressresrressrersersressrerseese 174 7 2 Kinematics of th cardan shaft ycisiccsssnssevancosszensuseragn seansasesverdsatenntuguonvenddvesvenoatens 182 7 2 1 Create time dependent linkage uai e etai Sese abeat n etienne t
85. etersB record stores parameters that are defined implicitly as a set of equation of parameters and or driving variables of the linkage e g 01 Sin 1 Cos x Parameters in LinkageData Linkage Designer Getting Started Feature List Rot ui Kinematic graph based modeling Unified handling of 2D and 3D linkages with serial chain tree and graph structure Support for parametrized linkage definition Constraint equations are generated only in case of loop closing kinematic pair definition Only non redundant constraint equation are generated Exact mobility of the linkage calculation even for parametrically defined linkages Support for solving inverse kinematic problem of linkages using pattern equation based solver Calculation of translational velocity and angular velocity and higher order derivatives of any links in the linkage in closed form Exchange linkage models with other users Visualize and animate linkage in Mathematica notebook or in Dynamic Visualizer 10 Export linkage or animation of the linkage into VRML97 world Abdank Abakanowicz integrator 5 axis milling machine Linkage Designer Getting Started 5 Quick Tour The first step in getting started with LinkageDesigner is to load the package Load LinkageDesigner package In 1 lt lt LinkageDesigner In this quick tour you will build one of the simplest closed loop linkage the four bar mechanism The schematic
86. figure of this linkage is shown below You will define the parametrized model of this linkage using the parameters of Figure 1 Figure 1 Fourbar mechanism The linkage definition in LinkageDesigner is nothing else but filling up a LinkageData object LinkageData is new datatype introduced by LinkageDesigner that wraps all relevant information of linkages Besides other informations LinkageData stores the kinematic graph of the linkage The edges of this graph represent the kinematic pairs while the vertexes correspond to the rigid bodies or as we will further refer to the links of the linkage From kinematic point of view the links are specified with body attached frames called Local Link Reference Frames LLRF The kinematic pairs on the other hand are 6 Linkage Designer Getting Started represented with the homogenous transformation of the LLRFs The first step in defining the four bar mechanism is to create a LinkageData object with the help of the CreateLinkage function Define linkage CreateLinkage name returns the LinkageData object of an empty linkage The name of the linkage is name Create an empty LinKageData object in LinkageDesigner CreateLinkage automatically adds two rigid body to the linkage the Ground and the Workbench link The LLRF of Ground link represent the global reference of the linkage The Workbench link is the base link or the local ground of the linkage By default the LLRF of thes
87. generated by equating the target transformation matrix with the placement transformation matrix of the end effector obtained from the direct kinematic problem 1 This result 12 equations but out of the 12 equation only 6 is independent Sxl Syl z1 01 x2 Sy2 z2 02 Viggo PRS ip Aes 0 1 2 n 2 n 1 x3 y3 z3 03 D 0 0 0 1 Following Paul s method the 1 is premultiplied with the inverse of the T matrices to generate the starting set of equations which may be resolved with respect to the joint variables 2 Sxl Syl Szi 01 1 x2 y2 Sz2 02 x3 Sy3 Sz3 03 0 0 0 1 Sxl Syl z1 01 1 x2 Sy2 22 02 3 n 1 n T 2 1 T2 Tg Tg Q1 TT To 523 1893 523 03 Q 0 0 0 1 Sxl Syl z1 01 mesan en NA i de ee x3 y3 Sz3 03 0 0 0 1 154 Ch 06 TemplateBasedSolver nb GenerateInvKinEquations linkage endlink startlinkj Generates a list of starting equations of the inverse kinematic problem The target transformation matrix is equated with the placement transformation of the endlink s LLRF to the startlink s one GenerateInvKinEquations linkage endlink endmarker startlink startmarker Generates a list of starting equations of the inverse kinematic problem The target transformation matrix is equated with the placement transformation of the endmarker to the startmarker Function to generate the starting equations of the inverse kinematic problem The target variables ar
88. he LLRF of the links However once you have selected the LLRF of the links you have to define the geometric representation of the links relative to the LLRF Add the geometric representation of the links to the linkage In 66 test2 LDLinkGeometry link1 linklGeometry Out 66J Graphics3D In 67 test2 LDLinkGeometry link2 link2GeometryConstrained Out 67 Graphics3D Animate the linkage In 68 AnimateLinkage test2 q1 gt 0 ql gt 65 PlotRange gt 3 3 3 3 0 9 Boxed gt False 1 Principles of linkage definition 49 m 1 4 3 Kinematic pair definition with Denavith Hartenberg variables DefineKinematicPair linkage type linki linkj a d 0 function appends a kinematic pair definition to linkage and returns the resulted linkage The kinematic pair is defined between linki and linkj links type string specifies the type of the kinematic pair to be defined The four D H parameters specifies the transformation between the LLRFs of the two links Only Rotational and Translational joint definition is allowed in this way Define kinematic pair with Denavith Hartenberg parameters The Denavith Hartenberg notation is widely used in robotics to describe mechanism with open kinematic chain LinkageDesigner also support kinematic pair definition with D H parameters The D H parameters defines the homogenous transformations betwen the LLRF of
89. he LinkageData of cardanShaft linkage Assign geometry to the links SetColor gr Graphics3D col gr Graphics3D a gt Graphics3D SurfaceColor col EdgeForm a cardanShaft LinkGeometry link1 SetColor Import ToFileName LinkageExamplesDirectory STL CardanShaft_link1 STL Hue 0 Graphics3D cardanShaft LinkGeometry link2 SetColor Import ToFileName LinkageExamplesDirectory STL CardanShaft_link2 STL Hue 0 33 Graphics3D cardanShaft LinkGeometry link3 SetColor Import ToFileName LinkageExamplesDirectory STL CardanShaft link3 STL Hue 0 66 Graphics3D 7 Kinematics of linkages 177 Set the driving variables to arbitrary values and display the cardanShaft linkage Show Linkage3D SetDrivingVariables cardanShaft ql gt 30 02 gt 30 0042 10 LinkMarkers gt All MarkerSize gt 70 Axes gt True Graphics3D Before the loop closing kinematic pair is defined between ink3 and Workbench the joint markers are defined The joint marker on ink3 can be easily defined since the axis of rotation is defined by the y axis of the LLRF The origin of the link marker is placed at the end of the link specified by the 0 11 0 vector Create the joint marker of link3 JointMarkerl1 MakeHomogenousMatrix 0 11 0 0 1 0 l 0 0 0 0 0 1 11 0 1 0 0 0 0 0 LL The corresponding
90. he sub linkages were independent from each other In case of a more complex multi looped mechanism like the parallel manipulators it is not possible to divide the multi loops into simpler mechanism because the loops in the kinematic graph are not independent from the other I this section we will define a parallel manipulator having multiple loops to illustrate the advanced features of DefineKinematicPair function Delta parallel manipulator The Delta parallel manipulator has 11 rigid body connected by rotational and spherical joints The kinematic graph of this manipulator has 5 loops The linkage definition process for this mechanism is divided into two phases First th eopen kinematic pairs of the linkage are defined then the loop closing ones This way first the spanning tree of the kinematic graph is created 114 LinkageDesigner User Manual 5 1 Open kinematic pair definitions Load LinkageDesigner package In 63 lt lt LinkageDesigner Set the default display option for Marker3D In 64 SetOptions Marker3D MarkerLabelStyle gt FontWeight gt Bold FontSize gt 12 MarkerSize gt 3 In 65 Off General spell Off General spelll If you want to define a parametrized linkage you can introduce the parameters either when you create the linkage with the CreateLinkage function or when you define the kinematic pairs with the DefineKinematicPair function DefineKinematicPair functio
91. inematic pair nt along a common axis but no relative rotation of the links UniversalJoint allows relative rotation of the two links of the kinematic pair around two perpendicular axis PlanarJoint allows relative translation of the two links of the kinematic pair in a common plane and relative rotation around an axis perpendicular to the plane CylindricalJoint allows relative translation and rotation of the two links of the kinematic pair along a common axis SphericalJoint allows relative rotation of the two links of the kinematic pair around a common point FixedJoint connects the two links of the kinematic pair rigidly Possible kinematic pair definition with DefineKinematicPair function The mobility of the linkage is the Degree Of Freedom DOF of the linkage In LinkageDesigner the mobility of the linkage is always equal to the number of driving variables stored in the SDrivingVariables record of the LinkageData object Unique feature of DefineKinematicPair function that it calculates the non redundant constraint equations in case of loop closing kinematic pair definition It removes as as many driving variables from the DrivingVariables record as the number of non redundant constraint equations This feature has two important implications It is possible to detect the lock up having 0 mobility and not feasible mechanism having negative mobility definition at the time the closing kinematic pair i
92. inition 51 Define geometry for link In 75 link1Geometry Graphics3D Plot3D 5 Exp Sqrt x 2 y 2 x 3 3 y 3 3 BoxRatios gt 1 1 1 Out 75J Graphics3D Define the geometry for link2 In 9 lt lt Graphics Polyhedra In 76 link2Geometry Show Graphics3D GreatStellatedDodecahedron Axes gt True 2 Out 76 Graphics3D 52 LinkageDesigner User Manual Add the geometric representation of the links to the linkage In 77 test3 LDLinkGeometry link1 linklGeometry Out 77 Graphics3D e In 78 test3 LDLinkGeometry link2 link2Geometry Out 78 Graphics3D Animate the linkage In 79 AnimateLinkage test3 q1 gt 0 ql gt 65 PlotRange gt 3 3 3 3 0 9 Boxed gt False 2 LinkageData A new datatype 53 LinkageData A new datatype In order to simulate or synthesize linkages one has to store the relevant data of the linkage in a database The data model of this database should contain all the information required by the processing functions and also flexible enough to enable the extension LinkageDesigner introduce a new datatype called LinkageData that conforms these requirements LinkageData data object wraps all information of a linkage It wraps basically a List whose elements have to conform to a simple pattern The element of this list should match the String List pattern The elements
93. inkMarkers gt link6 MarkerSize gt 150 TracePoints gt link6 150 0 0 You can render the linkage animation in Dynamic Visualizer The rendering is usually much more faster than in Mathematica notebook This is the result that not the whole scene has to be regenerated for every frame but the transformations of the links DVAnimateLinkage generates the geometries of the links only at the beginning of the animation The link geometries are staying in the Dynamic Visualizer until they are not explicitly deleted Render the puma560 robot animation in Dynamic Visualizer In 39 grls DVAnimateLinkage puma560 q1 gt 0 37 q2 gt 70 q3 160 q1 gt 130 q4 5 60 q6 gt 90 Resolution gt 5 LinkMarkers gt link6 MarkerSize gt 150 TracePoints gt link6 150 0 0 puma560 animation in Dynamic Visualizer 94 LinkageDesigner User Manual m List the returned list of transformations In 14 Short grls 25 Out 14 Short DV SetOptions Object3D Puma560 linkO TransformationMatrixo 1 0 0 0 LO dej 024 051 1050 T2 0r t0z 9 DV SetOptions Object3D Puma5600link1l TransformationMatrix gt 1 0 0 0 0 COs dop02 20 5 10 ap O s 500 5 1 331 DV SetOptions Object3D Puma560 link2 TransformationMatrix gt 1 0 0 0 0 0 5 Ear Oey OF 14007 20025 500 1 pls DV
94. inkage eee ttti te nin nine n 62 2 4 1 Implicitly defined dependent variables sese 63 2 4 2 Explicitly defined dependent variables sss 65 2 9 Weiden TT 67 2 6 Records of the time dependent IHnkage iiie eme oe remind rl RE emnes ens 12 Render UN ARES PME 75 3 1 Render linkage in Mathematica notebook essere 75 3 2 Render linkage in Dynamic Visualizer 1 eroe n eiue tad ERE ERN n 80 3 3 Render linkage in VRMLO97 viewer 1 eicere teni t tent Sa Deae t n exi Mesa E pa Re pacn 85 3 4 A mat Linka g NR IU 88 J in linkages ee TET 97 NES TCI Tm 98 4 2 Assembly the pistons C 103 4 3 Finalize the V Engine definition 4 csgaesexsndasesedeaseqaadeescuasecsvaneedeasaesieneadnatecatasenceaaee 109 Advanced linkage definition 1 eerie orent treo etn Ee en ra Penh ti Rena denn 113 5 1 Open kinematic pair definitlOns ineptos e prn NEEy ERE Y Vea FUP onn VY PE Rae P PE RR e e Fo Ed pa duy 114 5 1 1 Define the rotational joints iicet tatnen tiae rosa cu puro eco p esa ba e d d nre t15 5 1 2 Define the spherical joints sisse eite Eae prar tu i tS ean ib no mq d deseds 118 5 2 Loop closing kinematic pair definitions eee 125 5 2 1 Automatic loop variables selection 5 uote ema rota sao se nboxs 127 5 2 2 Manual loop variabl
95. int equations are generated From the list of candidate loop variables the 3 last driving variables of the DrivingVariables record were selected 5 Advanced Linkage Detinition 129 Define the spherical joint between eg3A and movingPlatform links In 102 DefineKinematicPairTo deltaRobotTest Spherical 03C 3C y3C leg3A mx1 movingPlatform rotMx rotMx mx2 This is a loop closing kinematic pair FindRoot cvnwt Newton s method failed to converge to the prescribed accuracy after 200 iterations SetDrivingVariables fdrootfail There might be no solution for the linkage at q1 gt 0 372231 q2 gt 0 359292 17 gt 3B 5 0 3B 5 0 driving variable values Check the simpl parameters or change the FindRoot options Placing links into constrained position is finished in 9 123 sec Candidate loop variables dl q3 91A 1A W1A O3A 3A Non redundant constraint equations 3 Selected loop variables 603A O3A W1A The updated list of driving variables ql gt 0 3623775294252710 q2 gt 0 3592919567957640 q32 0 3490658503988659 01A gt 0 002381303178132191 01A gt 0 006627844125654803 61B gt 0 1B gt 0 Y1B gt 0 62A gt 0 0001264444043871131 2A gt 0 01475083698013977 2A gt 0 02B gt 0 2B gt 0 J2B gt 0 3A gt 0 6385 0 3B5 0 Y3B gt 0 FindRoot jsing Encountered a singular Jacobian at the point O1C 1C WIC WIA 803A 3A 0 00224508 0 35161
96. iththe name of the AppendLinkGeometry gt None the geometric representation is an empty Graphics3D object AppendLinkGeometry gt gr both link will use the same Graphics3D object gr AppendLinkGeometry gt the geometric representation of the lower link grLower grUpper is grLower while the upper link is gr Upper Settings for the AppendLinkGeometry options of the DefineKinematicPair function m Get the LinkGeomet ry record of the crank slider mechanism crankSliderMechanism LinkGeometry CrankSlider Workbench Graphics3D CrankSlider Crank Graphics3D CrankSlider ConnectingRod Graphics3D CrankSlider Slider Graphics3D j Display the geometric representation of Workbench link Show crankSliderMechanism LinkGeometry Workbench Graphics3D The Part function is extended in LinkageDesigner therefore it is possible to use string as an index Also the Set function was extended to allow the assignment to the records of the LinkageData If a link of the linkage have a geometric representation in the 2 LinkageData A new datatype 69 SLinkGeometry record it can be easily replaced by simply re assigning a new Graphics3D object with the Set function Exchange the geometric representation of the Workbench link crankSliderMechanism LinkGeometry Workbench Graphics3D PointSize 0 06 RGBColor 1 0 0 Point 0 0 0 Graphics3D Display the
97. late equation based solver to arrive the result The inverse kinematic problem is basically equivalent to solving a set of trigonometric polinom equations The standard solution technique to solve these equations is to convert them into polynomial equation using the Tan 5 substitution or the unit circle substitution rule The polynomialial equations can be solved then by a Groebner based solver like the in build Solve function of Mathematica The resulted polynomial can be solved in closed form if it has a degree less or equal to 4 Unfortunately the resulted polynomials usually containing many parameters and they could be quite long therefore even if in theory they are solvable in practice not because of time and memory constraints The template equation based solution technique is originated by Pieper and Paul who found that the solution of the inverse kinematic equation of typical industrial robots leads to the solution of trigonometric polynomial conforming some simple pattern The solution of these simple template equation sometimes they are called in the literature as prototype equations is known therefore if one can identify an equation matching the template only the parameters should be extracted and the solution can be generated symbolically The template equations can be considered as knowledge representation which speeds up the solution of the inverse kinematic problem in case of certain special linkages As we have seen in the
98. lates the derivatives of the time equations of first dependent variables with respect to t Convert the linkage to time dependent linkage option name default value TimeFunctions Automatic Velocity functions of the driving variables The default value is 1 Specifying the driving velocities 2 LinkageData A new datatype 73 Load LinkageDesigner package lt lt LinkageDesigner Load the pre defined crankSlider mechanism In 3 lt lt crankSliderMechanism txt Convert crank slider mechanism to time dependent linkage In 4 testT1 ToTimeDependentLinkage crankSliderMechanism t General spelll Possible spelling error new symbol name testT1 is similar to existing symbol test1 More Out 4 LinkageData 9 Get the TimeDependentVariables of the resulted LinkageData object In 6 testT1 TimeDependentVariables O1 t NonConstants gt 01 O2 63 gt e1 t O2 t NonConstants gt 91 62 03 gt 1201 t 11 Cos 02 63 Sec 03 O1 t 12 Out 6 DI D D O3 t NonConstants gt O01 62 03 gt iz 11 Cos 2 03 Sec 03 61 t The STimeDependentVariables stores the first derivative of the non constant independent or dependent variables The record data contains the first time derivative as explicit defined variables They are depend on the independent dependent variables of the linkage and the driving velocities
99. lay Graphics3D object from Mathematica notebook LiveGraphics3D OpenGL viewer etc Each rendering devices has advantages and disadvantages comparing to the others speed of rendering quality user interface etc You might use the one that fits most to your needs 3 1 Render linkage in Mathematica notebook Section 2 5 discussed how to add geometric representation to the LinkageData object If the links of the linkages have geometry assigned they can be rendered in the pose of its driving variables Linkage3D function transform every link s geometries in their constrained placement and assembles them into a Graphics3D object Both the placement transformation and the geometric representation of the links can contain dependent and independent variables of the linkage Linkage3D substitute all variables and parameters of the linkage into the generated Graphics3D object Linkage3D linkage returns the Graphics3D object of the linkage Rendering linkage in Mathematica notebook 76 LinkageDesigner User Manual Load LinkageDesigner package lt lt LinkageDesigner Load the predefined crank slider mechanism In 12 lt lt crankSliderMechanism txt Display the linkage In 13 Show Linkage3D crankSliderMechanisn Out 13 Graphics3D The geometric representations of the links in crankSliderMechanism defined parametrically using the simple parameters of the linkage If you try to render for exa
100. ll specifies which link geometry to display Basic options of Linkage3D m Display the crankSliderMechanism together with its LLRFs In 14 Show Linkage3D SetDrivingVariables crankSliderMechanism 91 gt 40 LinkMarkers gt All MarkerSize gt 4 Out 14 Graphics3D 3 Render linkages 79 You can specify other link attached coordinate frame to be displayed with the LinkMarkers option Using the LinkGeometry option you can select the links to be displayed LinkMarkers gt All draws all LLRF of the linkage LinkMarkers linkl link2 draws the LLRF of the specified links LinkMarkers linki mxl mx2 draws the markers defined with homo genous matrixes mx1 mx2 relative to the LLRF of linki Possible values of LinkMarkers option m Display the crankSliderMechanism with the mxlist markers relative to the LLRF of Slider link mxlist MakeHomogenousMatrix 2 4 0 2 4 0 6 4 0 6 4 0 4 1y gt 0 0 2 0 1 0 4 0 O Ly 0 0 0 0 1 1 0 0 2 0 1 0 4 0 0 1 0 0 0 0 1 111 0 0 6 0 1 0 4 0 0 1 OF 10 0 0 1 tA 07 0 6 0 1 0 4 0 0 1 0 0 0 Or LFF Show Linkage3D SetDrivingVariables crankSliderMechanism 01 gt 40 LinkMarkers gt Slider Sequence mxlist MarkerSize gt 3 Axes gt True Graphics3D 80 LinkageDesigner User Manual 3 2 Render linkage in D
101. lling to license the Product is a provision that the author Dr G bor Erd s Bit Pli 2003 BT and Wolfram Research Inc and distribution licensees distributors and dealers shall in no event be liable for any indirect incidental or consequential damages and that liability for direct damages shall be limited to the amount of the purchase price paid for the Product In addition to the foregoing users should recognize that all complex software systems and their documentation contain errors and omissions The author Dr Gabor Erd s Bit Pli 2003 BT and Wolfram Research Inc shall not be responsible under any circumstances for providing information on or corrections to errors and omissions discovered at any time in this document or the package software it describes whether or not they are aware of the errors or omissions The author Dr G bor Erd s Bit Pli 2003 BT and Wolfram Research Inc do not recommend the use of the software described in this document for applications in which errors or omissions could threaten life injury or significant loss Linkage Designer Bit 21 5 2003 BT Table of Contents liiseienroi i Mer H 1 Feat re We MD DH 4 rv diii geEUHTCTC M 2 BIOS c ME eeeceee ecu tees 6 Define the open kinematic pairs one eden tap to ette dne be dera bu bb dee nn 8 Define the loop closing kinematic pair
102. lumn in T matrix represent a vector xj Xo x3 y1 Y2 y3 Z1 Z2 z3 vectors are the unit axis direction vectors of x y and z axis relative to xyz coordinate system 01 02 03 vector represents the position vector of the origin of x y z coordinate system relative to xyz In the linkage definition we will use extensively homogenous matrix as a displacement operation that specifies the joint markers with respect to the LLRF of the link Before we go further let s get a little bit familiar with the homogenous matrix 1 Principles of linkage definition 1 2 Homogenous matrixes You can use the standard list operation of Mathematica to create a homogenous matrix but LinkageDesigner introduce the MakeHomogenousMatrix function to simplify the task of homogenous matrix definition om om om om oge oge oge oge nousMatrix nousMatrix nousMatrix nousMatrix m v im v t ang v MakeHomogenousMatrix o z Assembly a homogenous matrix out of a 3x3 rotational matrix m and 3x1 vector v Assembly a homogenous matrix out of a 3x3 rotational matrix m and 0 0 0 vector Assembly a homogenous matrix out of a 3x3 identity matrix and v vector Assembly a homogenous matrix out rotational matrix calculated as a rotation with ang angle around the vector t and 3x1 vector v Assembly a homogenous matrix having that origin is o and the z axis direction i
103. metersB record Get the DerivedParametersB record of fourBarMechanism fourBarMechanisn DerivedParametersB FourBar RotationalJoint 4 92 gt 0 40727 035 2 21875 13 12Cos 03 11 Cos 02 Cos 03 11 Sin 62 Sin O63 10 Sin 61 Cos 3 Sin 0O2 Cos 62 Sin 93 Cos 1 Cos 2 Cos 03 Sin 2 Sin 03 0 11 Cos 63 Sin 2 12 Sin 63 11 Cos 62 Sin 63 10 Cos O1 Cos 03 Sin 62 Cos 62 Sin 63 Sin 1 Cos 62 Cos 03 Sin 62 Sin 3 0 The loop closure equations defines the 61 62 derived parameters If any independednt variables of the system is changing the loop closure equation has to be solved To solve the loop closure in closed form one has to express 01 and 62 variables as the function of the driving variables 01 and simple parameters 10 11 l2 13 6 To arrive the closed form solution you can use the in builded Solve function In case of numerous parameters the Solve function might required exceesive time and memory resources to arrive to the solution The loop closure equations in case of four bar mechanism can be specified as inverse kinematic problem of the 3R manipulator The inverse kinematic problem of linkages very often result in equations that matches certain pattern LinkageDesigner introduced a new function called PatternSolve to support the solution of inverse kinematic problem of linkages PatternSolve function uses template equations to search for posible
104. move DerivedParametersB record fourBarMechanisml Append fourBarMechanism DerivedParametersA sol 1 LinkageData 9 fourBarMechanisml Delete fourBarMechanisml DerivedParametersB LinkageData 8 Append the second solution branch of the inverse kinematic problem to the SDerivedParametersA record and remove DerivedParametersB record fourBarMechanism2 Append fourBarMechanism DerivedParametersA sol 2 LinkageData 9 fourBarMechanism2 Delete fourBarMechanism2 DerivedParametersB LinkageData 8 sol eqlist Save linkage You can save the LinkageData object of the four bar mechanism to a text file This way you can share your mechanism with other LinkageDesigner users or use it later without redefining the kinematic pairs and geometries of the linkage m This saves the definition of fourBarMechanism in the file fourBarMechanism txt Save ToFileName LinkageExamplesDirectory fourBarMechanism txt fourBarMechanism fourBarMechanisml fourBarMechanism2 26 Linkage Designer Getting Started The defined linkages can be saved in binary format using the DumpSave command DumpSave in binary format the three four bar mechanism LinkageData DumpSave ToFileName LinkageExamplesDirectory fourBarMechanism mx fourBarMechanism fourBarMechanisml fourBarMechanism2 LinkageData 8 LinkageData 8 LinkageData 8 m This reload the LinkageData defini
105. mple the geometry of the Crank link Mathematica returns an error because the Graphics3D object is not defined with numbers 3 Render linkages 77 Show the geometry of the Crank link Show crankSliderMechanism LDLinkGeometry Crank Graphics3D nlist3 11 0 0 is not a list of three numbers Graphics3D nlist3 11 0 0 is not a list of three numbers Graphics3D nlist3 UR 0 0 5 is not a list of three numbers General stop Further output of Graphics3D nlist3 will be suppressed during this calculation Graphics3D List the complete graphics object with InputForm InputForm Out 5 InputForm Graphics3D RGBColor 0 0 500008 0 250004 Thickness 0 0071 Line 0 0 0 11 0 O PointSize 0 03 Point 0 0 0 Point ll 0 0 Text Crank 11 2 0 0 5 1 0 In order to render correctly the geometry the parameters should be substituted with their actual value This can be done using the Get LinkageRules function 78 LinkageDesigner User Manual Show the geometry of the Crank link Show crankSliderMechanism LDLinkGeometry Crank GetLinkageRules crankSliderMechanism Axes gt True Graphics3D The geometry of the links are defined relative to the LLRF You can display the LLRF of the linkage together with the geometry of the links option name default value LinkMarkers None specifies which link markers to display LinkGeometry A
106. n however allows to introduce only those simple parameters that were used in that kinematic pair definition m Create the LinkageData object with the simple parameters of the Delta manipulator In 67 deltaRobot CreateLinkage DeltaRobot WorkbenchName gt basePlatform SimpleParameters gt legLength gt 20 armLength gt 5 armWidth gt 3 basePlatformRadius gt 10 movingPlatformRadius gt 5 movingPlatformChamfer gt 3 p1 gt 0 p2 gt 0 p3 gt 0 Out 67J LinkageData 6 5 Advanced Linkage Definition 115 m 5 1 1 Define the rotational joints Rotational joint between the basePlatform and driveArm1 link In order to define the rotational joint between the basePlatform and driveArml links the joint frame has to be defined relative to the LLRF of the two links In the figure above the joint frame displayed in red while the LLRF of the links are black m mx1 specifies the joint marker relative to the LLRF of the basePlatform link In 68 MatrixForm mx1 MakeHomogenousMatrix RotationMatrix 1 1 1 120 0 basePlatformRadius 2 0 Out 68 MatrixForm 0 0 1 0 b Platf Radi 1 0 0 basePia lU adius 0 1 0 0 0 0 0 1 116 LinkageDesigner User Manual m mx2 specifies the joint marker relative to the LLRF of the driveArm1 link In 69 MatrixForm mx2 MakeHomogenousMatrix RotationMatrix 1 1 1 120 0 armLength 0 Out 69 MatrixForm 0 0 1 0 1 0 0 armLength 0
107. nematicPair testl MyGroundName test1 MyWorkbench 1 0 0 10 0 1 0 0 0 0 1 103 0 0 0 1 testl MyWorkbench test1 MyGroundName 1 0 0 10 0 1 0 0 0 0 1 10 0 0 0 1 2 3 Independent variables of the linkage After you have defined your LinkageData object you can build your database gradually by adding kinematic pairs to it DefineKinematicPair and DefineKinematicPairTo functions append an entry to the St ructure record of the LinkageData object each time they are called Define a kinematic pair to test linkage and store the resulted linkage in testResult testReturn DefineKinematicPair test Rotational ql Workbench MakeHomogenousMatrix 0 0 0 11 link1 MakeHomogenousMatrix 0 0 52 4 ie Parameters gt 11 gt 10 LinkageData 6 m Get the Structure record of test Return test Structure test Base 0 test Ground test Workbench 1 305 05 035 105 1 05 0 105105 1 0X 0 0 0 ErlT test Workbench test Ground 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 60 LinkageDesigner User Manual testReturn Structure testeBase 0 test Ground test Workbench f1 0 0 03 0 1 0 03 0 O0 1 031 0 0 Os LFE Yy test Workbench test Ground 1 0 0 O 0 1 0 0 10 0 Lg 03 07050 BEEE ky testeRotationalJoint 1 test Workbench test linkl Cos ql Sin ql 0 0 Shy qo 13h
108. nematicPairTo 8 DVAnimateLinkage 26 89 GenerateInvKinEquations 154 GetLinkageDerivative 190 Joint Cylindrical 39 Fixed 39 Planar 39 Rotational 39 Spherical 39 Translational 39 Universal 39 Linkage3D 10 75 LinkGeometry 11 LinkMarkers 11 MarkerLabels 11 MarkerSize 11 LinkShape 17 LLRF 31 MakeHomogenousMatrix 12 33 MakeLinkageGraph 36 Marker3D 34 NToTimeDependentLinkage 182 PatternSolve 152 ExcludedParameters option 152 UseBaseTemplates option 152 PlaceLinkage 16 103 AbsolutePlacement option 103 AppendLinkGroundTansformation option 103 PlaceLinkageTo 16 103 PlaceShape 47 84 RenameLinkage 98 ReplaceDrivingVariables 168 Save Linkage 25 SetDrivingVariables 9 SetDrivingVariablesTo 9 SetDrivingVelocities 192 SetSimpleParameters 19 SetSimpleParametersTo 19 ShowLinkageGraph 36 template equation 149 Template equation 143 ToTimeDependentLinkage 182 TwoAxisListPlot 198 VisualizeLinkage 80 WriteVRMLAnimation 28 89 VRMLCycleTime 95 VRMLInterpolation 95 VRMLPROTOLibFile 95 VRMLTraceName 95 VRMLViewPoints 95 WriteVRMLLinkage 86 LinkGeometry option 86 LinkMarkers option 86 VRMLFontScale option 86 VRMLFontSize option 86 VRMLTextureTransform option 86 VRMLViewPoints option 86 LinkageExamplesDirectory 87 LinkageVRMLFile 87
109. ng links into constrained position is finished in 1 953 sec Candidate loop variables ql 62 93 94 95 Non redundant constraint equations 4 Selected loop variables 05 04 O3 92 The updated list of driving variables q1 gt 0 LinkageData 7 180 LinkageDesigner User Manual Set the deflection angle of cardanShaft SetSimpleParametersTo cardanShaft 012 0 622 30 y1 gt 30 225 0 MaxIterations gt 120 LinkageData 7 Append the LinkGroundTransformation record to the LinkageData object PlaceLinkageTo cardanShaft LinkageData 8 Display the linkage Show Linkage3D cardanShaft LinkMarkers gt All MarkerSize gt 70 Axes gt True Graphics3D Animate the cardan shaft Setting RasterFunctionoIdentity stops AnimateLinkage from rendering the graphics it produces AnimateLinkage cardanShaft q1 gt 0 ql gt N 360 LinkMarkers gt All MarkerSize gt 70 Resolution gt 5 RasterFunction gt Identity 7 Kinematics of linkages 181 m Partition the graphics into four rows and show the resulting array of images Show GraphicsArray Partition 2 DisplayFunction gt DisplayFunction GraphicsArray 182 LinkageDesigner User Manual 7 2 Kinematics of the cardan shaft ToTimeDependentLinkage linkage t Calculates the first derivatives of the time dependent variables with respect to t and fill up the TimeDependentVariables an
110. ng precision Precision for the constraint equations generation LockingEnabled False allows kinematic pair definition that locks up the mechanism by having mobility equal to 0 Verbose False Switch on or off the diagnostic printing EnforceDOF None defines the number of rotational and translational DOF used in the constraint equation selection Selected options of DefineKinematicPair function The remaining 5 spherical joints that connect the legs to the movingPlatform are loop closing kinematic pairs The loop closing kinematic pairs decrease the mobility of the linkage This change in the DOF is reflected in the LinkageData object of the linkage because as many driving variables are moved to the DerivedParametersB as many independents constraint equations are generated DefineKinematicPair function defines the loop closing kinematic pairs in three main steps 1 Moves the links into constrained position and orientation 126 LinkageDesigner User Manual 2 Calculates the set of non redundant constraint equations based on the relative DOF of the two links 3 Delete the loop variables from the DrivingVariables record and move it to the SDerivedParametersB record together with the generated constraint equations The first step is done by calculating the constrained positions and orientation of the two links using the FindMinimum built in function You can influence this calculation by specifying one or mo
111. ng step 5 matching equation is found Out of the 5 candidate solution you have to decide which one to take It is possible to select more than one because there are solution for q4 and q5 It is difficult to give a criteria how to choose from multiple template solutions because they are not necessarily equivalent one The condition might give a hint because they constraint the domain of validity of the solution In our solution we choose the 5th template solution that express q4 variable m Append the 5th template solution for q4 to FinalSolution Short AppendTemplateSolutionTo FinalSolution solutionSet 5 15 6 Template based solver 163 a4 ArcTan 7 z1 Cos ql q2 q3 z1 Cos q1 q2 q3 z2 Sin ql q2 q3 2 z3 Sin q2 q3 z2 Sin ql q2 q3 J 822 Cos q1 z1 Sin ql i z1 Cos ql q2 q3 z1 Cos ql q2 q3 z2 Sin ql q2 q3 2 z3 Sin q2 q3 22 Sin ql q2 q3 z2 Cos ql z1 Sin qg1 af 822 Cos ql z1Sin ql 1 ES z1 Cos ql q2 q3 z1 Cos ql q2 q3 z2 Sin ql q2 q3 2 23 Sin q2 q3 22 Sin q1 q2 q3 q2 2 ArcTan a2 01 Cos q1 02 Sin q1 a2 d4 d1 03 01 Cos q1 02 Sin g1 1 01Cos q1 02 Sin q1 a1 03 y a2 01 Cos q1 02 Sin q1 4 d4 dl 03 01 Cos q1 02 Sin g1 a2 d4 d1 03 01 Cos ql 02 Sin ql a2 d1 03 a2
112. nge the Workbench Ground transformation of linkage to mx and return the resulted linkage PlaceLinkageTo linkage mx change the Workbench Ground transformation of linkage to mx and reset the resulted linkage to linkage Change the Ground Workbench transformation You can place the linkage into an arbitrary position and orientation if you change the transformation matrix between the Ground and Workbench links PlaceLinkageTo function replace this transformation matrix with the one specified in its argument The placement transformation can contains parameters provided that you have added these parameters to the LinkageData object Since the symbol has been already added to the simple parameters of the linkage at the time the LinkageData is created you can use it to define the placement matrix Define the placement matrix MatrixForm mx MakeHomogenousMatrix RotationMatrix 0 0 1 Cos Sin 0 0 Sin Cos 0 0 0 0 1 0 0 0 0 1 Place the linkage PlaceLinkageTo fourBarMechanism mx LinkageData 8 Linkage Designer Getting Started 17 m Define the geometry If you want to render your linkage you might want to add geometric representations to the links that are more detailed than the default ones If the LinkGeometry record has an entry for a link it can be simple over defined using the set function Otherwise you have to append a whole sub record to the LinkGeometry record
113. ngine having four piston V engine with four piston 98 LinkageDesigner User Manual 4 1 Create one piston The first step of the V engine definition is to define one piston For this we will use the pre defined crank slider mechanism which will be copied and customized Since all information of a specific linkage is stored in the LinkageData object you can easily copy it by assigning the LinkageData to another variable Also you can rename the linkage by changing its mechanism name RenameLinkage linkage newName Change the the name of linkage to newName Rename linkage Load LinkageDesigner package In 174 lt lt LinkageDesigner Off General spell Off General spel11 Load the predefined crank slider mechanism In 42 lt lt crankSliderMechanism txt Out 42J LinkageData 7 Rename the crank slider mechanism and assign the resulted LinkageData to piston variable In 43 piston RenameLinkage crankSliderMechanisml Piston Out 43J LinkageData 7 4 Join linkages 99 The geometric representation of the piston s parts are designed in a CAD system and stored in STL files 3D Systems Stereophotography Rapid Prototyping CAD format This graphics exchange file can be imported into Mathematica by the Import function The dimensional values of the part s geometries together with their reference coordinate frames show in the figure below Dimension of the pi
114. nipulated with the functions of the standard DiscreteMath Combinatorica package MakeLinkageGraph linkage f returns the non oriented graph object of linkage LinkageData and fills up the f link name mapping function ShowLinkageGraph linkage display the kinematic graph of linkage Generate and display the kinematic graph of linkages Load LinkageDesigner and the predefined crank slider mechanism In 26 lt lt LinkageDesigner lt lt crankSliderMechanism txt m Create the kinematic graph of the crank slider mechanism In 28 gr MakeLinkageGraph crankSliderMechanism nameMap Out 28J Graph 5 5 Undirected 1 Principles of linkage definition 37 Display the graph In 29 ww 3 Out 29 ShowLabeledGraph gr idi Graphics Display the nameMap definition In 30 nameMap Global nameMap Attributes nameMap Listable name name name name name name name name name name ap ap ap ap ap ap ap ap ap ap 1 CrankSliderGConnectingRod CrankSliderGConnectingRod 1 2 CrankSliderGCrank CrankSliderGCrank 2 3 CrankSlider Ground CrankSlider Ground 3 4 CrankSliderGSlider CrankSlider Slider 4 5 CrankSliderGWorkbench CrankSliderGWorkbench 5 38 LinkageDesigner User Manual Show the graph In 31 ShowLabeledGraph gr GetStrippedName Array nameMap 5
115. nkGeometry leglA gr Out 89J Graphics3D 122 LinkageDesigner User Manual m Set the driving variables and render the linkage In 90 Show Linkage3D SetDrivingVariables deltaRobot 1A gt 30 2B gt 10 LinkMarkers gt All Axes gt True 10 Out 90 Graphics3D There is only one open kinematic pair left to define This kinematic pair is spherical joint between the movingPlatform and leg A links The geometry of the movingPlatform link with its LLRF and joint center marker is shown in the figure below Spherical joint between the movingPlatform and leg1A links 5 Advanced Linkage Detinition 123 m mx1 specifies the joint marker relative to the LLRF of the eg A link 1 In 91 MatrixForm mx1 MakeHomogenousMat rix o 0 legLength Out 91 MatrixForm 1 0 0 0 0 1 0 0 0 0 Las 0 0 0 1 m mx2 specifies the joint marker relative to the LLRF of the movingPlatform link 1 In 92 MatrixForm mx2 MakeHomogenousMat rix z movingPlatformChamfer movingPlatformRadius 3 movingPlatformChamfer 2 o Out 92 MatrixForm movingPlatformChamfer 315 207 59 5 010 Es movingPlatformRadius 0 0 1 0 0 00 1 Define the spherical joint between eg A and movingPlatform links DefineKinematicPairTo deltaRobot Spherical In 93 91C 1C y1C leglA mx1 movingPlatform mx2 Out 93 LinkageData 6 m Crea
116. nt with universal joints In this way we have arrived to the conclusion that it is sufficient to define universal joint between the arms and legs instead of spherical joints You can try to re define the delta robot with universal joints between its arm and legs Freeze the unused driving variables In 114 sub Drop deltaRobot LDDrivingVariables 3 Out 114 W1A gt 0 001672221892288313 J1B 0 W2A30 W2B30 3A gt 0 y3B gt 0 In 115 deltaRobot deltaRobot sub Out 115 J LinkageData 7 Re assigned the driving variables In 116 deltaRobot LDDrivingVariables Drop deltaRobot LDDrivingVariables 6 Out 116 J ql gt 0 3732088493293637 q2 gt 0 3617288840018200 q3 gt 0 3572004446495979 m Set The driving variables to 0 In 117 SetDrivingVariablesTo deltaRobot q1 gt 0 q2 gt 0 q3 gt 0 MaxIterations gt 500 Out 117 LinkageData 7 140 LinkageDesigner User Manual Change the simple parameters to customize the robot geometry In 118 deltaRobot LDSimpleParameters Out 118 legLength gt 20 armLength gt 5 armWidth gt 3 basePlatformRadius gt 10 movingPlatformRadius gt 5 movingPlatformChamfero 3 p1 gt 0 p2 gt 0 p3 gt 0 In 119 SetSimpleParametersTo deltaRobot legLength gt 40 armLength gt 10 armWidth 3 Out 119 LinkageData 7 In case of linkages having many links the pre calculation of the
117. nual WriteVRMLLinkage linkage WriteVRMLLinkage linkage file export the geometric representation of linkage into a VRML97 file export the geometric representation of linkage into the default a VRML97 file Export linkage to VRML97 world option default value description LinkMarkers None which LLRF markers to display LinkGeometry All which link geometry to display VRMLFontSize Automatic Defines the fontsize explicitly in VRML units VRMLFontScale 250 Define the scaling between the Graphics3D and VRML fontsize VRMLViewPoints Automatic Specifies the ViewPoint list of the VRML World VRMLTransparency Automatic Defines the transparency of the links in the VRML World Automatic set opaque every link VRMLTexture None Defines the texture node of the graphics in the VRML world VRMLTextureTransform None Defines the textureTransform node of the graphics in the VRML world Options of WriteVRMLLinkage WriteVRMLLinkage function can take any Graphics3D options to modify the visualization LinkageDesigner introduced the SLinkageVRMLFile constant to store the default path of the exported WRL file If no file path is defined the WriteVRMLLinkage use this path 3 Render linkages 87 X LinkageVRMLFile Contains the default filename for VRML97 worl export functions LinkageExamplesDirectory Points to the directory of the pre defined linkages
118. ocity and acceleration curve in a two axis plot The definition of the TwoAxisPlot function is described in the Wolfram research Techniqual FAQ http support wolfram com mathematica graphics decorations twoaxisgraph html Here I copied the function definition lt lt Graphics MultipleListPlot 198 LinkageDesigner User Manual TwoAxisListPlot f List g List opts OptionQ Block old new scale invscale gmax gmin fmax fmin newg a b plrange gmax Max Transpose g 2 gmin Min Transpose g 2 fmax Max Transpose f 2 fmin Min Transpose f 2 a fmax fmin gmax gmin b fnin axgmin scale x axx b x b invscale x J a invscale x String x old plrange FullOptions ListPlot f Frame gt True DisplayFunction gt Identity FilterOptions ListPlot opts FrameTicks PlotRange new MapAt SetPrecision invscale 2 amp 2 amp old 2 newg MapAt scale 2 amp g MultipleListPlot f newg Frame True FrameTicks gt Automatic Automatic None new PlotRange gt plrange SymbolStyle gt RGBColor 1 0 0 RGBColor 0 0 1 FrameStyle gt RGBColor 1 0 0 RGBColor 0 0 1 opts 7 Kinematics of linkages 199 Plot the angular acceleration and angular velocity in a two axis plot TwoAxisListPlot Table t 2 t t 0 1 02 Table t f1 t t 0 1 02 FrameLabel gt Tim
119. of the linkage LinkageDesigner provide a simple Graphics3D primitive called LinkShape that can be used to define the geometric representation of the links LinkShape lJ rl r2 w is a Graphics3D primitive that draws link shape with length r and r2 radius and w width LinkShape primitive Add parametrized link geometries to the three moving links fourBarMechanism LinkGeometry linkl Graphics3D SurfaceColor RGBColor 1 1 0 LinkShape 11 1 1 1 fourBarMechanism LinkGeometry link2 PlaceShape Graphics3D SurfaceColor RGBColor 0 5 0 5 1 LinkShape 12 1 1 1 MakeHomogenousMatrix 0 0 0 2 fourBarMechanism LinkGeometry link3 Graphics3D SurfaceColor RGBColor 5 0 0 9 LinkShape 13 1 1 1 Add parametrized link geometries to the fixed link fourBarMechanism LinkGeometry link0O PlaceShape Graphics3D SurfaceColor GrayLevel 0 75 LinkShape 10 0 5 5 2 MakeHomogenousMatrix 0 0 0 3 You can change the posture of the mechanism by setting its driving variable 01 to a different substitutional value using the SetDrivingVariables or SetDrivingVariablesTo functions If the LinkageData object specified as the argument of SetDrivingVariables or SetDrivingVariablesTo functions has DerivedParametersB record the 18 Linkage Designer Getting Started constraint equations specified in this record are solved with
120. of the main list in the LinkageData wrapper are called records The first part of the record String is the record identifier while the last part _List is the record data Load LinkageDesigner package In 1 lt lt LinkageDesigner Create a simple LinkageData object with only one record LinkageData MyID 1 2 3 LinkageData 1 LinkageData object is formatted as LinkageData n where n stands for the number of records of the object 54 LinkageDesigner User Manual 2 1 Predefined records The format of the data records in LinkageData is not strictly defined In order to find the information required by the functions of LinkageDesigner certain number of predefined record are introduced The record identifier and the record data of these predefined records are specified rigorously but you might extend the LinkageData object by using your own record identifier and record data Record Identifier Description MechanismID Defines the name of the linkage and other linkage instance specific informations WorkBench name etc DrivingVariables Contains the driving variables of the linkage together with their substitutional values SimpleParameters Contains the simple parameters of the linkage together with their substitutional values Structure Contains the kinematic pair definitions DerivedParmetersA Contains the explicitly defined parameters of the linkage DerivedParametersB Con
121. oint marker relative to the LLRF of the driveArm link In 80 MatrixForm mx1B MakeHomogenousMatrix armWidth 2 0 0 Out 80 MatrixForm armWidth 1 0 0 a 0 1 0 0 0 Q 1 0 0 49 50 1 m mx2 specifies the joint marker relative to the LLRF of the eg A and leg B links In 81 MatrixForm mx2 MakeHomogenousMatrix 0 0 legLength 2 Out 81 MatrixForm 1 0 0 0 0 1 0 0 0 0 1 ee 0 0 0 I When you define a low order joint with the DefineKinematicPair function you have to specify a list of symbols called joint variables that controls the non constrained DOF of the two links In case of open kinematic pair definition the joint variables are appended to the DrivingVariables record of the linkage since the mobility of the linkage is raised by the non constrained DOF of the kinematic pair Each joint variables controls a specific relative movement of the kinematic pair 120 LinkageDesigner User Manual 9 9 4 joint variables of the spherical joints controls the relativ rotation of the links 0 rotate the upper link around the z axis of the joint center marker rotate the upper link around the x axis of the joint center marker y rotate the upper link around the z axis of the joint center marker Joint variables of the spherical joint Define the spherical joint between driveArm and leg1A links In 82 DefineKinematicPairTo deltaRobot Spherical 01A 1A w1A driveArm1 mx1A
122. oint pose of the rotational joint between the Workbench and the Crank links The joint pose is used to set the separate offset angles of the four pistons in the V Engine therefore it is a non common parameter parameter stands for the inclination angle of the pistons This parameter should be kept non common since the pistons on the left side and right side have the opposite inclination angle m Create the bas linkage of the join operation In 68 vEngine CreateLinkage V Engine Out 68J LinkageData 6 The non common parameters are renamed automatically for every linkage If you want to use different names than the automatically assigned ones replace the parameters before calling the AttacheLinkage function pi fol plSi jolS2 Non common parameter renaming in AttacheLinkage 4 Join linkages 109 Replace the parameters with unique symbols in the four piston In 70 pistonList MapThread 1 4 2 amp pistonList 1 2 3 64 In 71 LDSimpleParameters amp pistonList out 71 J pl 730 11245 123100 102 15 loffs2 0 12 45 d gt 70 pl 30 11345 122 100 10315 loffs gt 0 62345 d gt 70 pl 30 11345 122 100 102 15 loffs2 0 63345 d gt 70 pl 30 11345 122 100 10315 loffs gt 0 425 45 d gt 70 Attache the four piston to the base linkage In 72 AttacheLinkageTo vEngine pistonList CommonParameters gt 10 11 12 loffs 61
123. oticed that there are two solution of the constraint equations the 27 periodicity is not important from this point of view since it does not result a different pose of the linkage This means that you can define different linkage using the first or second solution branch of the constraint equations 66 LinkageDesigner User Manual m Set the solution of the constraint equation equal to sol sol 02 gt p1 61 ArcTan V 1 1offs 11Sin p1 s01 12 1offs 11 Sin p1 01 12 03 gt ArcTan V 1 loffs 11 Sin p1 01 12 loffs 11 Sin p1 01 12 02 gt p1 01 ArcTan Y 1 1offs 11 Sin p1 01 12 loffs 11 Sin p1 01 12 03 gt ArcTan Y 1 1offs 11 Sin p1 01 12 loffs 11 Sin p1 01 12 m Append to DerivedParametersA record the first solution crankSliderMechanisml Append crankSliderMechanism DerivedParametersA sol 1 LinkageData 8 m Delete the 5DerivedParametersB record from the resulted crankSliderMechanisml crankSliderMechanisml Delete crankSliderMechanisml DerivedParametersB LinkageData 7 The explicitly defined dependent variables are wrapped into a Rule function where the first argument is the variable the second is its value You have to make sure that the second argument is evaluated to a number if the independent variables and the remaining dependent variables are substituted Get the Deriv
124. ould be specified with the Parameters option of DefineKinematicPair function The parameters introduced with this option are appended to the SSimpleParameters record of the LinkageData object Linkage Designer Getting Started 13 option name default value JointName Automatic name of the low order joint JointLimits Automatic validity range of joint variable s JointPose Automatic offset values of the joint variables Parameters list of parameters with their initial substitution number used in the definition of the kinematic pair LinkageData manipulating options m This define the second rotational joint between link1 and link2 DefineKinematicPairTo fourBarMechanism Rotational 92 link1 MakeHomogenousMatrix 11 0 0 link2 IdentityMatrix 4 Parameters gt 11 gt 5 LinkageData 6 Similarily to the this kinematic pair definition you can define the rotational joint between link2 and link3 links m This define the third rotational joint between link2 and link3 DefineKinematicPairTo fourBarMechanism Rotational 93 link2 MakeHomogenousMatrix 12 0 0 link3 MakeHomogenousMatrix 0 0 0 Parameters gt 12 gt 10 LinkageData 6 Now the mobility of the fourBarMechanism linkage is 3 which is reflected in the SDrivingVariables record 14 Linkage Designer Getting Started fourBarMechanism DrivingVariables 161345
125. ql q2 O1A 1A W1A O2A 2A O1C Q1C W1C Non redundant constraint equations 3 Selected loop variables 02A 2A o1A The updated list of driving variables ql gt 0 362378 q2 gt 0 359292 q3 gt 0 349066 01A gt 0 0023813 wlA gt 0 00224508 81B5 0 Q1B5 O Y1B gt 0 w2A gt 0 62B gt 0 2B gt 0 w2B gt 0 63A 0 03A 0 3A 0 6385 0 3B gt 0 W3B30 61C gt 0 00224508 1C gt 0 35161 1C gt 0 0041245 Out 105 J LinkageData 7 5 Advanced Linkage Detinition 133 Show the link markers of the spherical joint between eg3A and movingPlatform links In 106 Show Linkage3D deltaRobot LinkMarkers gt leg3A mx1 movingPlatform rotMx rotMx mx2 MarkerSize gt 8 Axes gt True Out 106 Graphics3D 134 LinkageDesigner User Manual Define the spherical joint between eg3A and movingPlatform links In 107 DefineKinematicPairTo deltaRobot Spherical 03C 3C y3C leg3A mx1 movingPlatform rotMx rotMx mx2 CandidateLoopVariables 03A 3A 1C This is a loop closing kinematic pair Placing links into constrained position is finished in 13 129 sec Candidate loop variables ql q3 91A W1A 93A 3A O1C 1C W1C Non redundant constraint equations 3 Selected loop variables 03A 3A 1C The updated list of driving variables ql gt 0 365532 q2 gt 0 359292 q3 gt 0 355589 01A gt 0 000026266 y1A gt 0 0000397087 61B30
126. re Out Of Place In this scenario the joint markers has to be specified on both link separately Joint markers has to be defined relative to the LLRFs of the corresponding links The kinematic pair definition will assembly the links into their constrained placement 2 The links of the kinematic pairs are In Place or pre assembled In this scenario the LLRF of the two links and the joint marker has to be specified relative to a common reference frame This scenario can be used for example to import linkage definition from a CAD system 40 LinkageDesigner User Manual 3 The kinematic pair is defined with Denavith Hartenberg variables This scenario can be used to define rotational or translational joint using the 4 Denavith Hartenberg variables m 1 4 1 Out Of Place kinematic pair definition DefineKinematicPair linkage type q1 32 linki mxi linkj mxj function appends a kinematic pair definition to inkage and returns the resulted linkage The kinematic pair is defined between linki and linkj links type string specifies the type of the kinematic pair to be defined The joint markers of linki and linkj links are specified with mxi and mxj homogenous matrixes The list of joint variable s of the kinematic pair is defined with q q2 Define kinematic pair for the Out Of Place scenario In this scenario kinematic pairs are defined with the constrained movement of the joint markers
127. re options of FindMinimum function in the options of DefineKinematicPair Since FindMinimum use a numerical procedure to arrive to the result it is advisable to move the linkage pair as close to its constrained position as possible In the second phase of the kinematic pair definition the non redundant constraint equations are calculated Every kinematic pair restricts the relative position and orientation of its link pair This restriction can be expressed in constraint equations For example the rotational joint restricts 5 DOF of the linkage which can be expressed by 5 independent constraint equations However it might happen that not all the 5 DOF was free before the kinematic pair was defined This is the case for example in the four bar mechanism Before defining the loop closing rotational joint between the third link and the workbench link they have only 3 relative DOF In this case not all the 5 constraint equations of the rotational joint are independent since the rotational joint bind only 2 DOF DefineKinematicPair function generates the constraint equations corresponding to the type of the kinematic pair and select the non redundant ones The redundant equations should be satisfied automatically The redundant equation is checked also by the DefineKinematicPair function If you don t want to have this check use the CheckRedundantEquationsoFalse In some particular case you might want to override the calculated relative DOF of
128. rectory STL PistonPin stl Graphics3D a Graphics3D SurfaceColor RGBColor 1 1 0 EdgeForm aJ Display the piston linkage In 57 Show Linkage3D piston Axes gt True Out 57 Graphics3D 4 Join linkages 103 4 2 Assembly the pistons Before the pistons are assembled they have to placed into their correct position This can be done by changing the Ground Workbench transformation Since the Workbench is the base link of the linkage and the Ground contains the Global Reference Frame by changing the Ground Workbench transformation the whole linkage is placed with respect to the Global Reference Frame This placement can be introduced with the PlaceLinkage or the PlaceLinkageTo functions PlaceLinkage linkage mx change the Workbench Ground transformation of linkage to mx and return the resulted linkage PlaceLinkageTo linkage mx change the Workbench Ground transformation of linkage to mx and reset the resulted linkage to linkage Change the Ground Workbench transformation option name default value AppendLinkGroundT True Specifies whether the SLinkGround ansformation Transformation record should be filled up or deleted AbsolutePlacement True In case of True the placement transformation replaces the old Ground Workbench transformation In case of False they are multiplied Options of PlaceLinkage 104 LinkageDesigner User Manual
129. riables be selected to become loop variable LockingEnabled False allows kinematic pair definition that locks up the mechanism by having mobility equal to 0 DefineKinematicPair options influencing the loop closing kinematic pair definition Linkage Designer Getting Started 15 This define a rotational joint between link3 and linkO DefineKinematicPairTo fourBarMechanism Rotational 04 link0 MakeHomogenousMatrix 10 0 0 link3 MakeHomogenousMatrix 13 0 0 Parameters gt 132 15 10 gt 15 LinkageData 7 fourBarMechanism is now fully defined The mobility of the linkage is 1 The remained driving variable is 01 that determine the posture of the linkage 02 and 63 are become loop variable and moved to DerivedParametersB record Get the DrivingVariables record fourBarMechanism DrivingVariables 012 1 73367 m Get the SDerivedParametersB record fourBarMechanisn DerivedParametersB FourBar RotationalJoint 4 022 0 932994 63 gt 1 74053 13 12Cos 03 11 Cos 62 Cos 03 11 Sin 62 Sin O63 10 Sin 61 Cos 3 Sin 2 Cos 62 Sin 3 Cos 1 Cos 2 Cos 03 Sin 2 Sin 03 0 11 Cos 63 Sin 2 12 Sin 63 11 Cos 02 Sin 63 10 Cos 1 Cos 03 Sin 2 Cos 02 Sin 3 Sin 1 Cos 62 Cos 03 Sin 62 Sin 3 0 16 Linkage Designer Getting Started m Place the linkage PlaceLinkage linkage mx cha
130. rmation matrix specifying the placement of the Workbench link w r t the reference coordinate system PlacementName Automatic Name of the kinematic pair defining the Workbech placement SimpleParameters List of simple parameters Options of the CreateLinkage CreateLinkage also create a kinematic pair between Ground and Workbench link with the default name Base 0 This kinematic pair defines the homogenous transformation of the LLRF of the Workbench w r t LLRF of the Ground and vice versa By default this transformation matrix is an identical transformation which implies that the two LLRFs are superpositioned By setting the transformation between Workbench and Ground link one can place the whole linkage in an arbitrary position and orientation The name and the value of this transformation matrix can be set by the PlacementName and WorkbenchPlacement options The kinematic pair definitions are stored in the Structure record of LinkageData object You can get a record of the LinkageData object by using the Part function Instead of an integer index hovewer type the record identifier string fourBarMechanism Structure FourBarGBase 0 FourBar Ground FourBarGlink0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 FourBar linkO FourBar Ground lr 04 OF 0 0 1 0 OF7 0 OF Le Op 0 07 Of 13 3 8 Linkage Designer Getting Started Now that you have created the fourBarMechanism LinkageData object
131. s defined LinkageDesigner can calculate the velocity angular velocity acceleration angular acceleration or even higher order derivatives of any links in closed form This feature is valid for any type serial tree graph structure linkages Even if every transformation matrix constraint equations or any other informations stored in LinkageData is accessible to the user most often animations or visualizations of the linkages give more information than the expressions LinkageDesigner package has an extensive support for visualizing and animating linkages Linkages can be displayed or animated in Linkage Designer Getting Started 3 Mathematica notebook in Dynamic Visualizer or can be exported to a VRM97 world LinkageDesigner supports parameterized linkage definition This way different dimensions of the links e g length of a link can be represented by a parameter and the kinematic pair definitions are generated with parameters If the user would like to change the numerical value of the parameters it can be done by simply re setting it without redefining the whole linkage LinkageData currently supports three type of parameter definitions SSimpleParameters record stores parameters together with their substitution values e g toolLength gt 10 SDerivedParametersA record stores parameters that are expressed as the explicit functions of simple parameters and or driving variables e g 01 ArcTan x y SDerivedParam
132. s for the variables Before we solve the inverse kinematic problem of the PUMA 560 robot let s take a look how LinkageDesigner represent the template equations 150 Ch 06 TemplateBasedSolver nb m 6 2 1 TemplateEquation data type Similarly to LinkageData data type the informations of a template equation are also wrapped into a new data object called TemplateEquation TemplateEquation data object wraps all information of a template equation It wraps basically a List which elements have to conform a simple form The element of the list should match the _String List pattern The elements of the main list in the TemplateEquation wrapper are called records The first part of the record String is the record identifier while the last part List is the record data TemplateEquation object is formatted as TemplateEquation n where n stands for the number of records of the object CreateTemplateEquation name eq Creates a TemplateEquation object from eq pattern equation identified with name ConstantExprO expr varlist Returns True if expr is free from any variables of varlist Functions to create template equation When you define the template equation the parameters known expression should be distinguished from the variables unknowns In CreateTemplateEquation function you have to specify the variables as Pattern while the parameters as PatternTest objects The Solution and
133. s ql q2 q3 2 23 Cos q2 q3 z2 Cos ql q2 q3 z1 Sin ql q2 q3 z1 Sin q1 q2 q3 4 1 4 z2Cos q1 q2 q3 2 z3 Cos q2 q3 z2 Cos q1 q2 q3 z1 Sin ql q2 q3 z1 Sin q1 q2 q3 q5 gt ArcTan i z2 Cos ql q2 q3 2 z3 Cos q2 q3 z2 Cos ql q2 q3 z1 Sin q1 q2 q3 z1 Sin q1 q2 q3 X 1 z2 Cos ql q2 q3 lt lt 5 gt gt 4 z1 Sin ql q2 q3 1 a4 2 ArcTan 01 Cos ql q2 q3 2 a2 Cos q3 01 Cos q1 q2 q3 02 Sin q1 q2 q3 2 d1 Sin q2 q3 2 03 Sin q2 q3 02 Sin q1 q2 q3 4 da2 d3 02 Cos q1 01 Sin g1 01 Cos q1 q2 q3 2 a2 Cos q3 01 Cos q1 q2 q3 02 Sin q1 q2 q3 2 d1 Sin q2 q3 2 03 Sin q2 q3 02 Sin ql q2 q3 d2 d3 02 Cos q1 01 Sin q1 4 da2 d3 02 Cos q1 01 Sin ql 01 Cos ql q2 q3 2 2 lt lt 5 gt gt 02 Sin ql q2 q3 a4 gt ArcTan 1 J Ci 2 8 gt l gt 4 1 q4 gt z2 Sin ql q2 q3 2 z3 Sin q2 q3 z2 Sin ql q2 q3 IIb 650 AS FAM 6S1 Cin T1132 a5 2 ArcTan z2 Cos ql q2 q3 2 z3Cos q2 q3 ArcTan i z1 Cos q1 q2 q3 z1 Cos q1 q2 q3 i Abs i Abs d2 d d2 d z2C 162 Ch 06 TemplateBasedSolver nb In this template matchi
134. s z Different ways to create homogenous matrix Load LinkageDesigner package lt lt LinkageDesigner m This create a homogenous transformation that displace the reference marker by 2 units along x axis MatrixForm T MakeHomogenousMatrix 2 0 03 OO qQ ge OoOOrR oco Co Io POON 34 LinkageDesigner User Manual You can display the coordinate frame sometimes called marker represented by a homogenous matrix Marker3D function returns a Graphics3D primitive of cartesian coordinate frame corresponding to the homogenous matrix in its argument Marker3D mx Create a Graphics3D primitive of coordinate frame corresponding to mx homogenous matrix Three dimensional graphics primitive of a marker Display the reference frame in green and the T marker in red Show Graphics3D Hue 4 Marker3D IdentityMatrix 4 Hue 1 Marker3D T Axes gt True Lighting gt False Graphics3D m This create a homogenous matrix that displace the reference marker by 2 units along x axis and rotate it in such way that the z axis is unidirectional with 1 1 0 vector MatrixForm T MakeHomogenousMatrix 2 0 0 1 1 0 1 T 1 Ji ye 9 wp L O0 1 0 0 O0 0 O0 1 1 Principles of linkage definition 35 Display the reference frame in green and the T marker in red Show Graphics3D Hue 4 Marker3D IdentityMatrix 4 Hue 1 Marker3D T Axes gt True Lighting gt False Face
135. signing SurfaceColor to the part s geometries and disabling the edge drawing 4 Join linkages 101 In 51 piston LinkGeometry Crank piston LinkGeometry Crank Graphics3D a __ gt Graphics3D SurfaceColor RGBColor 0 332036 0 664073 0 664073 EdgeForm a In 52 piston LinkGeometry ConnectingRod piston LinkGeometry ConnectingRod Graphics3D a Graphics3D SurfaceColor RGBColor 0 5 0 5 1 EdgeForm aj In 53 piston LinkGeometry Slider piston LinkGeometry Slider Graphics3D a gt Graphics3D SurfaceColor RGBColor 0 472663 0 0 EdgeForm a Display the piston linkage In 54 Show Linkage3D piston Axes gt True Out 54 Graphics3D You can add new links to the linkage any time you want using the DefineKinematicPair function Here we define a Fixed join between the Slider and new Pin linkage The Fixed joint attaches rigidly the links It is used here as a placeholder for the assembly feature that connects the piston s head to the connecting rod 102 LinkageDesigner User Manual Extend the linkage by adding a new link that is rigidly attached to the Slider In 55 DefineKinematicPairTo piston Fixed Slider MakeHomogenousMatrix 0 0 0 Pin MakeHomogenousMatrix 0 0 0 Out 55 LinkageData 7 In 56 piston LinkGeometry Pin Import ToFileName LinkageExamplesDi
136. solutionSet PatternSolve eqlist ql q2 q3 q4 q5 q6 Display the solutions FormattedTemplateSolutions solutionSet 10 No Name Solution Conditi 1 T3 ql ArcTan d2 a3 02 01 V d2 d3 01 02 012 d2 d3 01 02 V d2 d3 017 027 ql gt ArcTan d2 d3 02 01 V d2 d3 017 027 d2 d3 01 02 V d2 d3 01 02 The pattern solve function found one matching equation from that q1 variable can be expressed 6 Template based solver 157 AppendTemplateSolution old new i Appends the i part of new template solution to old which is the final solution list new is the return value of PatternSolve The function returns the updated solution list AppendTemplateSolutionTo old new i Appends the i part of new template solution to old which is the final solution list new is the return value of PatternSolve The function reset the updated solution list to old Collect the final solution There are two solution for q1 variable which represent two solution branch In case of multiple solution for the other variables the different solution branches can be obtained if the multiple solutions are combined AppendTemplateSolution function take care of combining the multiple solutions to arrive all possible solution branches The final solution will be collected in the FinalSolution list which is to be defin
137. specifying explicitly the list of template equations to be used in the third argument of the PatternSolve function Also you have to switch off the base template equations by setting the UseBaseTemplates option to False m Search for template solution on q5 q6 unknown variables using only T5 template equation Timing solutionSet PatternSolve eqlist q5 q6 BaseTemplateEquations T5 UseBaseTemplates gt False ExcludedParameters gt O1 02 03 y1 y2 y3 6 799 Second Null 6 Template based solver 165 Display the solutions FormattedTemplateSolutions solutionSet 3 No Name Solution Conditi 1 t5 Kas gt O ArcTan 4 z2 Cos ql q2 q3 2 z3 Cos q2 q3 z2 Cos q1 q2 q3 z1 Sin q1 q2 q3 z1 Sin q1l q2 q3 lt lt 21 gt gt 2 z3 Sin q2 q3 q4 z2 Sin ql q2 q3 q4 2 T5 q5 gt ArcTan Csc q4 z2Cos q1 q2 q3 2 23 Cos q2 q3 z2 Cos ql q2 q3 zl1Sin ql q2 q3 z1 Sin q1 q2 q3 z2 Cos q1 z1 Sin q1 3 T5 q5 gt ArcTan Sec q4 z2 Cos ql q2 q3 2 z3 Cos q2 q3 z2Cos ql q2 q3 z1 Sin ql q2 q3 z1 Sin ql q2 q3 z1 Cos q1 q2 q3 z1 Cos q1 q2 q3 z2 Sin ql q2 q3 2 z3 Sin q2 q3 z2 Sin q1 q2 q3 4 T5 q5 gt ArcTan i z2 Cos ql q2 q3 2 23 Cos q2 q3 z2 Cos ql q2 q3 z1Sin ql
138. splay the puma560 robot Show Linkage3D puma560 LinkMarkers gt All MarkerSize gt 150 PlotRange gt All Axes gt True 750 500 250 Graphics3D m 6 1 1 Add geometry You might want to add geometric representation to the links of the robot more detailed than the one containing only an Text primitive This you can do by re assigning the geometric representation of the links We have designed the geometry of the links in a CAD system and saved in STL format These geometries are imported into mathematica using the in build Import function 6 Template based solver 147 m Create the list of filenames of the link geometries nameList Table ToFileName LinkageExamplesDirectory STL Puma560 link lt gt ToString i stl i 0 6 Import the 3D geometries from the STL files geometryList Import nameList Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D m Append a SurfaceColor attribute to each Graphics3D object ChangeColor gr Graphics3D col gr Graphics3D a gt Graphics3D SurfaceColor col EdgeForm a geometryList MapThread ChangeColor geometryList Table Hue i i 0 1 1 6 Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D Graphics3D j Keep in mind that the geometric representation of the links should be specified rel
139. ston parts Change the simple parameters of piston to match the dimension values of the geometries In 44 piston SimpleParameters Out 44 pl70 11735 12 10 102 15 loffs gt 0 In 45 SetSimpleParametersTo piston 11 gt 45 12 gt 100 Out 45 LinkageData 7 The geometries of the linkage are found in the STL subdirectory of SLinkageExamplesDirectory After you have loaded the stl files set to the SLinkGeomet ry record of piston 100 LinkageDesigner User Manual You can reassign the geometry of those link that has had geometry already assigned in the LinkGeometry record Otherwise you should use the Append function to add the geometry to the link Import the geometries from the STL files In 46 piston LinkGeometry Crank Import ToFileName LinkageExamplesDirectory STL PistonCrank stl1l In 47 piston LinkGeometry ConnectingRod Import ToFileName SLinkageExamplesDirectory STL PistonConnectingRod st1 In 48 piston LinkGeometry Slider Import ToFileName LinkageExamplesDirectory STL PistonSlider st1 Delete the geometric representation of Workbench link from the SLinkGeomet ry record In 49 piston Delete piston LinkGeometry Workbench Out 49 LinkageData 7 Display the piston linkage In 50 Show Linkage3D piston Axes gt True Out 50 Graphics3D You can enhance the rendering by as
140. tDrivingVariables cardanShaftT1 ql gt 30 11 977 Second 8 80362x10777 0 1 52625x10711j 1 00001 1 11573x107 0 0000226906 The result approximates what we expected namely a null vector for the translational velocity and the 1 0 0 vector for the angular velocity The imprecision rooted in the numerical root finding since the loop closing constraint equations are evaluated with the FindRoot function If you would like to calculate the velocity vectors more accurately you have to raise the precision of the constraint equations and re evaluate the function by requesting a bigger working precision Re calculate the translational and rotational velocity by setting the WorkingPrecision to 30 digit Timing v1 GetLinkageRules SetDrivingVariables SetPrecision cardanShaftT1 40 q1 gt 30 WorkingPrecision gt 30 MaxIterations gt 150 76 81 Second 0 x10777 0 x10719 0 x10718 1 000000000003123373 0 x 1077 1 081968x1071 1 192 LinkageDesigner User Manual You can calculate the derivative vectors for cardanShaftT2 linkage in a similar way than cardanShaftTl Get the first derivatives of link3 s motion in cardanShaftT2 linkage Timing v2 GetLinkageDerivative cardanShaftT2 link3 5 177 Second Null m Change the w simple parameter s value to 27 SetSimpleParametersTo cardanShaftT2 w gt 27 LinkageData 10 Calculate the translational and rotational velocit
141. tains the implicitly defined parameters of the linkage Predefined record identifiers of LinkageData 2 LinkageData A new datatype 55 Record Identifier Description LowOrderJoint Stores data of the low order joints name limits etc LinkGeometry Stores the geometric representation of the links as Graphics3D objects SLinkGroundTransformat Stores the transformation matrix of all LLRFs to ion the Global Reference Frame TimeDependentVariables Contains the list of time dependent variables together with their first derivative DrivingVelocities Stores the velocity values of the driving variables Predefined record identifiers of LinkageData Not all the predefined records have to be presented in every LinkageData record For example linkages with open kinematic chain usually does not have SDerivedParametersA and SDerivedParametersB records LinkageData object is manipulated principally by the CreateLinkage and DefineKinematicPair functions The first one creates a LinkageData object with the minimal set of records while the second one fills up the database gradually 2 2 Structural information of the linkage CreateLinkage name returns the LinkageData object of an empty linkage The name of the linkage set to name Create an empty LinkageData object 56 LinkageDesigner User Manual option name default value WorkbenchName Workbench Defines the name of the Work
142. te and assign the geometric representation of the movingPlatform link In 94 gr Graphics3D SurfaceColor Hue 0 Js Polygon Flatten Table 1 RotationMatrix 0 0 1 i 4 amp e z movingPlatformChamfer movingPlatformRadius 3 movingPlatformChamfer 2 0 movingPlat formChamfer 2 movingPlatformRadius V3 movingPlatformChamfer 2 0 i 0 240 120 1 In 95 deltaRobot LDLinkGeometry movingPlatform gr Out 95J Graphics3D 124 LinkageDesigner User Manual Render linkage In 96 Show Linkage3D deltaRobot LinkMarkers gt All MarkerSize gt 4 Axes gt True 10 5 Out 96 Graphics3D Move the links closer to the loop closing position In 97 SetDrivingVariablesTo deltaRobot ql gt 20 q2 gt 20 q3 gt 20 1C gt 20 Out 97 LinkageData 6 5 Advanced Linkage Detinition 125 5 2 Loop closing kinematic pair definitions option name default value CandidateLoopVari Automatic list of driving variables names that ables can be selected to be removed from the SDrivingVariables record and appended to DerivedParametersB record in case the kinematic pair defines a loop CheckRedundantEqu True witch on or off the redundant ations constraint equation checking functionality ConstraintEpsilon Automatic Specify the error limit for the constraint equation satisfaction ConstraintWorking 16 Specify the worki
143. tern matching can be started Initially all driving variables of the puma560 linkage q1 q2 q3 q4 q5 q6 are unknown therefore in the first iteration cycle the PatternSolve function is called with all the variable PatternSolve function does basically two things i converts the equations into their normal form depending on the specified variable list ii search for matching equations The normal form of the pattern matching is introduced because a trigonometric polynomial might have different equivalent form after applying equivalent transformation on it The normal form of the pattern matching is depend on a list of variables ConvertToNormalForm expr vars Converts expr to the normal form of pattern matching with respect to the list of variables vars Convert equations to their normal form 156 Ch 06 TemplateBasedSolver nb m Define a formatting function FormattedTemplateSolutions solutionSet List 1_ Module disp disp Transpose Prepend Transpose solutionSet Table i i Length solutionSet disp MapAt Short 1 amp 4 3 4 amp disp disp Prepend disp No Name Solution Condition j Return DisplayForm GridBox disp ColumnWidths gt 2 3 30 Automatic ColumnSpacings gt 0 ColumnLines gt True RowLines gt 0 5 0 ColumnAlignments gt Left 11 First Iteration m Search for template solution on q1 q2 q3 q4 q5 q6 unknown variables
144. the Condition records than should be set separately If the parameter test is the ConstantExprQ function than its second argument is automatically appended by the PatternSolve function Therefore it can be specified in the CreateTemplateEquation as a one parameter function The reason for this awkward function design is that the variable list is known only in the PatternSolve function and the template equation has to be defined before this function is called If there are multiple solutions you can set them as a list of substitution rule similarly to the return list of the Solve function The Condition record is optional Since we are interested only the real solution of the inverse kinematics problem in the Condition 6 Template based solver 151 record you can specify any boolean expression that constraints the template solution to be real These conditions naturally only neccesary but not sufficient m Create a template equation for the linear equation tl CreateTemplateEquation MyTemplateEq a_ ConstantExprQ b_ ConstantExprQ x 0 TemplateEquation MyTemplateEq Define the solution ti Solution x gt a b x 2 Add condition for the solution t1 Condition b 0 b 0 m List the records of the TemplateEquation record TableForm t1 1 S Name MyTemplateEq SPattern a box mL a ConstantExprQ sParaneters b ConstantExprQ Variables x Solution
145. the SDerivedParametersB record load the predefined crank slider mechanism The kinematic graph of this linkage contains one loop therefore one loop closing kinematic pair is defined This kinematic pair definition in turn appended an entry to the 5DerivedParametersB record of the linkage Load LinkageDesigner package lt lt LinkageDesigner 64 LinkageDesigner User Manual Load the pre defined crankSlider mechanism Get ToFileName LinkageExamplesDirectory crankSliderMechanism txt Display the linkage Show Linkage3D crankSliderMechanism Boxed gt False Graphics3D Get the driving variables of crank slider mechanism crankSliderMechanisn DrivingVariables 01 gt 0 Get the implicitly defined dependent variables of crank slider mechanism crankSliderMechanisn DerivedParametersB CrankSliderGTranslationalJoint 4 02 2 69152x10 63 gt 0 0008658 10 Sin p1 91 092 093 loffs Cos p1 91 02 03 12 Sin 03 11 Sin 02 93 Cos p1 01 402 63 1 Every elements of the DerivedParametersB record contains the informations of one set of implicitly defined dependent variables These sub list contains three data 1 String Identifier CrankS1ider8TranslationalJoint 4 2 List of dependent variables and the actual solution of the constraint equations 022 2 69152x107 035 0 0008658 3 List of constraint equations 10 Sin p1 01402403
146. the ground In LinkageDesigner the mobility of the linkage is equal with the number of driving variables The DrivingVariables record contains the independent kinematic variables of the linkage together with their actual numerical value Get the DrivingVariables record fourBarMechanism DrivingVariables 01 gt 0 SetDrivingVariables linkage new set the driving variables of linkage to new and returns the updated LinkageDate object SetDrivingVariablesTo linkage new set the driving variables of linkage to new and rand reset the result to linkage Driving the linkage If you change the associated substitutional value of the driving variables you can drive the linkage which means in our case that you rotate link1 link Set the driving variables 01 to 45 using the SetDrivingVariables function 10 Linkage Designer Getting Started m This will set 61 driving variable to 45 SetDrivingVariablesTo fourBarMechanism 01 gt 45 LinkageData 6 DefineKinematicPair function also appends default geometric representation to the SLinkGeometry record for every new links of the linkage As the rotational joint is defined between linkO and linki DefineKinematicPair creates and appends a default geometric representation of link and linkO The generated Graphics3D representation of the links are simple Text primitives that contains the name of the link If you want to change the
147. the link pair in order to change the number of generated equation This can be done by setting the relative rotational r and translational t DOF with the EnforceDOF gt r t option Use this option carefully because overriding the relative DOFs might result incorrect linkage definition In the third step the loop variables are selected from the non redundant constraint equations The driving variables that are selected to move into SDerivedParametersB record are called loop variables Normally there are many possibilities to select the loop variables Any 5 Advanced Linkage Detinition 127 driving variable that appear in the generated constraint equations are potential candidates to become a loop variable and called candidate loop variable DefineKinematicPair function select automatically the loop variables from the list of candidate loop variables by removing the candidate loop variables from the end of the SDrivingVariables record If you want to change the order of selection of the loop variables specify the list of candidate loop variables with the CandidateLoopVariables option In complicated multi looped mechanism you must almost always override the automatic loop variable selection because the automatic selection result incorrect set of loop variables To illustrate this we will define two loop closing kinematic pair using the automatic loop variable selection algorithm Change the default options of DefineKinema
148. the upper and the LLRF of the lower one Since there are only four D H variable the relative placements of the LLRFs are restricted Also the applicable joint type is restricted since only rotational and translational joint definition is allowed in this scenario There is no joint variable specification in the DefineKinematicPair function unlike before This is so because and d D H parameters are the joint variables in case of rotational and translational joint definition To illustrate the kinematic pair definition of this scenario you can define the test mechanism using D H parameters Load the LinkageDesigner package In 34 lt lt LinkageDesigner Create a test linkage with link as the Workbench In 35 test3 CreateLinkage test3 WorkbenchName gt link1 Out 35 LinkageData 6 Since the joint to be defined is a rotational one the 0 variable will be the joint variable Therefore you specify the 4th parameter with a symbol 50 LinkageDesigner User Manual Append the rotational joint definition between link and link2 to test linkage In 36 test3 DefineKinematicPair test3 Rotational linkl link2 0 6 2 0 q1j Out 36 LinkageData 6 Display the LLRF markers of test3 linkage In 37 Show Linkage3D test3 LinkMarkers gt All MarkerSize gt 3 PlotRange gt 3 3 3 3 0 9 Axes gt True Out 37 Graphics3D 1 Principles of linkage def
149. ticPair function In 98 SetOptions DefineKinematicPair Verbose gt True MaxIterations gt 200 Copy the LinkageData object of Delta robot In 99 deltaRobotTest deltaRobot m 5 2 1 Automatic loop variables selection List the driving variables of the linkage In 100 deltaRobotTest LDDrivingVariables All 1 Out 100 ql q2 q3 01A 01A W1A 61B Q1B W1B O2A 2A wW2A O2B Q2B W2B O3A 3A W3A O3B 3B W3B O1C 1C W1C 128 LinkageDesigner User Manual Define the spherical joint between eg2A and movingPlatform links In 101 DefineKinematicPairTo deltaRobotTest Spherical 02C 2C w2C leg2A mx1 movingPlatform rotMx mx2 This is a loop closing kinematic pair Placing links into constrained position is finished in 14 211 sec Candidate loop variables ql q2 O1A 1A J1A O2A 2A O1C Q1C J1C Non redundant constraint equations 3 Selected loop variables wW1C 1C 61C The updated list of driving variables ql gt 0 362378 q2 gt 0 359292 q3 gt 0 349066 01A gt 0 0023813 1A gt 0 00662784 1A 2 0 00224508 61B gt 0 1B gt 0 J1Bo0 02A gt 0 000126444 02A gt 0 0147508 2A gt 0 02B 5 0 2B 5O0 y2B gt 0 63A25 0 03A 5 0 3A 25 0 O3B5 0 3B 5 0 3B 5 O0 Out 101 LinkageData 7 Since the Verbose option is set to True some diagnostic message is printed out during the evaluation You can see that 3 non redundant constra
150. tion It defines the mobility or DOF of the linkage therefore if you change the number of driving variables this leads to incorrect mobility calculation However in this case we don t want to further build the linkage therefore the DOF calculation will be not performed The reason of this changes in the mobility number is that the x1 x2 x3 z1 z2 z3 target variables are not independent Only three out of the six variables are independent It is possible to define the target variables that are equal in number with the old driving variables but it would require the introduction of more dependent variables This would unnecessary complicate the expressions The only thing that you have to take care that the x1 x2 x3 z1 z2 z3 are the coordinates of two perpendicular unit vectors 170 Ch 06 TemplateBasedSolver nb Append the LinkGroundTransformation record to the inverse linkages In 46 puma560Inverse PlaceLinkage puma560Inverse Out 46 LinkageData 8 LinkageData 8 LinkageData 8 LinkageData 8 LinkageData 8 LinkageData 8 LinkageData 8 LinkageData 8 Generate the 8 solution branch of the robot for the same target variable values Show PlotRange gt All Axes gt True FaceGrids gt 0 0 1 DisplayFunction gt Identity amp Linkage3D LinkMarkers gt link6 MarkerSize gt 200 amp e puma560Inverse Partition the graphics into four rows and sho
151. tions from the text file The LinkageExamplesDirectory is added to the Path during initialization In 5 lt lt fourBarMechanism txt Out 5 LinkageData 8 Animate Linkage If the linkage definition is finished you can animate syntethise or further process the mechanism You can animate the linkage in Mathematica notebook in Dynamic Visualizer or ina VRML97 viewer Load the LinkageDesigner package and the pre defined four bar linkage lt lt LinkageDesigner lt lt fourBarMechanism txt a Animate fourBarMechanism in Dynamic Visualizer Timing DVAnimateLinkage fourBarMechanism 012 0 012 360 1 542 Second Nullj Linkage Designer Getting Started 27 Dynamic Visualizer Ele Edt View Animations Object Help Mathink Connected viq Generate animation of fourBarMechanismil in the notebook In 81 Timing ls AnimateLinkage fourBarMechanisml 012 0 91 gt 360 LinkMarkers gt link2 MarkerSize 5 TracePoints gt link2 0 5 O PlotRange gt 10 17 15 15 1 4 Out 81J 3 585 Second Null 28 Linkage Designer Getting Started gj Export animation of fourBarMechanism2 to VRML97 world In 90 Show GraphicsArray Partition ls 3 t i f J A T iQ j q Out 90 GraphicsArray Timing WriteVRMLAnimation fourBarMechanism2 ToFileName LinkageExamplesDirectory fourBarAnimation wrl 91 gt
152. titutions as the driving shaft is rotating Timing sub4 GetLinkageRules cardanShaftT4 t gt 0 t gt 1 Resolution gt 50 MaxIterations 50 30 574 Second Null Calculate the translational and rotational velocity of link3 at t20 v4 sub4 1 0 5 61247x1077 0 6 34702 0 0 110557 The velocity values are always calculated relative to World reference frame the one attached to the Ground link Since the two shaft are slightly misaligned the x axis of the ground frame not parallel with the axis of the driven shaft link3 But you can transform the velocity vector into the LLRF of the link3 and this way the y coordinate of the transformed vector correspond to the magnitude of the angular velocity vector As an alternative you can take the absolute value of the angular velocity vector 7 Kinematics of linkages 195 Get 3x3 rotation matrix mx ExtractRotationMatrix GetLLRFMatrix cardanShaftT4 Ground ReferenceFrame gt link3 SubstituteParameters gt True 0 0174161 0 0 999848 0 999848 0 0 0174161 0 1 0 Transform the velocity vectors to the LLRF of link3 mx amp Gv4 sub4 1 0 0 5 61247x1077 2 30391x10 6 34799 0 m Create the base points for the angular velocity interpolation angVelocity t mx v4 2 2 sub4 0 6 34799 y 6 34595 ET 6 33988 2n 6 33022 IT 6 3176 eee
153. translated along the x axis with an offset distance d The AttacheLinkage function glues the Ground link of the attachment links to the base link of the base linkage The attachment operation is basically replacing the Ground links of the attachment linkages with the base link of the base linkage This is the reason why the attachment linkages should be positioned before attaching them together AttacheLinkage base attachment Join the attachement linkages to the base linkage and return the resulted LinkageData object AttacheLinkageTo base attachment Join the attachement linkages to the base linkage and reset the resulted LinkageData object to the base linkage Join linkages together 4 Join linkages 107 option name default value BaseLink Automatic Specifies the link s name of the base linkage where the workbench of the attachement linkages are glued CommonParameters None Specifies the list of symbols that are common in the attachement and base Options of the AttacheLinkage function We will append one more simple parameter d to the piston linkage This parameter is the placeholder for the offset distance between the pistons that is used in the placement operations Append the d parameter to the SimpleParameters record In 63 AppendTo piston LDSimpleParameters d 70 out 63J pl120 11245 122 100 1025 15 loffs gt 0 gt 45 d gt 70 Define the placement transform
154. tring and the EntityName string based on the following pattern FullName LinkageName EntityName There are two help function implemented in LinkageDesigner to manipulate composite names the Get FullName and Get St rippedName functions Get FullName linkage stringID returns the full name of the stringID using the linkage name of linkage LinkageData Get StrippedName stringID returns the entity name of stringID by dropping the substrings up to the first Functions for composite name manipulation Define the full name of the myLink entity name GetFullName test myLink test myLink m Get the entity name back form the full name GetStrippedName myLink Beside the name of the linkage the MechanismID contains the full name of the Ground test Ground and the Workbench test Workbench links This two links were created by CreateLinkage function together with the first kinematic pair of the Structure record The Ground link is the reference rigid body of the entire linkage The LLRF of Ground is the global reference frame for the linkage The Workbench link is by default connected with a fixed joint to the ground link and represents the local reference body of the linkage This duplication of the reference links has two advantages i the reference link can be described with a kinematic pair ii the linkage can be placed anywhere by changing only the Ground Workbench transformation 58 Link
155. two solution set we arrive to a final solution set containing 4 branches It is possible to back substitute the expression of q1 in to this solution using the SubstituteSolution option of AppendTemplateSolution However this is result in a considerably bigger expression which slows down the calculations m Append the template solution found for q2 and q3 to FinalSolution Short AppendTemplateSolutionTo FinalSolution solutionSet 1 15 xl m The length of FinalSolution is equal to the number of solution branches Length FinalSolution 4 Third Iteration After the second iterative step there are only three unknown variables left q4 q5 q6 The new PatternSolve is called for this variable list m Search for template solution on q4 q5 q6 unknown variables In 32 Timing solutionSet PatternSolve eqlist q4 q5 q6 Out 32 22 293 Second Null Display the solutions FormattedTemplateSolutions solutionSet 6 6 Template based solver 161 No Name Solution Conditic T2 T2 T3 T3 T3 q5 gt ArcTan z2 Cos ql q2 q3 2 z3 Cos q2 q3 z2 Cos ql q2 q3 z1 Sin ql q2 q3 z1 Sin q1 q2 q3 4 1 22 Cos q1 q2 q3 2 z3 Cos q2 q3 z2 Cos q1 q2 q3 z1 Sin q1 q2 q3 z1 Sin ql q2 q3 z2 Cos ql q2 q3 z1Sin ql q2 q3 z1Sin ql q2 q3 E lt lt 1 gt gt q5 gt ArcTan i z2 Co
156. ugmented by the number of joint variables This is the reason while the joint variables are appended to the SDrivingVariables record The joint variables represent the remaining Degree of Freedom DoF of the upper link relative to the lower link after the kinematic pair definition is applied In case of rotational 2 LinkageData A new datatype 61 joint out of the possible 6 DoF of the upper link only 1 remains after the joint definition is applied This DoF is the rotation around the z axis of the joint marker The value of joint variable drives this remaining DoF The simple parameters are stored in the SimpleParameters record of the LinkageData object m Get the SimpleParameters record of testReturn LinkageData object testReturn SimpleParameters 11 10 The simple parameters are basically placeholders for dimensional values If they are used instead of numbers all kinematic equations or transformation are generated using the parameter symbols This way the dimensional values can be easily changed without redefine the whole linkage The numerical substitutional value of the independent variables driving variable simple parameter are stored together with the placeholder symbols since they are wrapped with a Rule function SetDrivingVariables linkage new Set the driving variables of linkage to new SetDrivingVariablesTo linkage new Set the driving variables of linkage to new and resets the resulted
157. vingVariables linkage new old Moves the old driving variables into DerivedparametersA record and adds the new driving variables to the DrivingVariables record of linkage The function returns with the updated LinkageData object Define new driving variables 6 Template based solver 169 m Replace the driving variables with the target variables puma560Inverse ReplaceDrivingVariables puma560 x12 1 x22 0 x3 25 0 z125 0 z225 0 z32 1 012 300 022 300 032 600 amp eFinalSolution ReplaceDrivingVariables dofchg Warning The number of driving variables are changed from 6 to 9 This might cause error in the D O F calculations ReplaceDrivingVariables dofchg Warning The number of driving variables are changed from 6 to 9 This might cause error in the D O F calculations ReplaceDrivingVariables dofchg Warning The number of driving variables are changed from 6 to 9 This might cause error in the D O F calculations General stop Further output of ReplaceDrivingVariables dofchg will be suppressed during this calculation LinkageData 7 LinkageData 7 LinkageData 7 LinkageData 7 LinkageData 7 LinkageData 7 LinkageData 7 LinkageData 7 You get a warning since the you changed the number of driving variables from 6 to 9 As you build the linkage with the DefineKinematicPair function the number of driving variables has important significa
158. w the resulting array of images Show GraphicsArray Partition 2 DisplayFunction gt DisplayFunction 0 200400 6 Template based solver 171 GraphicsArray 7 Kinematics of linkages 173 Kinematics of linkages In this chapter we expand the analysis of linkages beyond the static positioning and animation We will address the calculation of the linear and angular velocity of the linkages LinkageDesigner provide function to calculate the linear and angular velocity and also the higher order derivatives acceleration angular acceleration etc of any links of the linkages In order to calculate the velocity or acceleration of the linkages one has to specify how the movement of the linkage depend on time This time dependencies is defined when the linkage is converted into a time dependent linkage When a linkage is converted into time dependent linkage LinkageDesigner precalculates all expressions that are used to construct the time derivatives in closed form These informations are stored in the LinkageData object of the linkage There are principally two ways to convert linkages into time dependent ones Express every driving variables with the explicit function of the time variables and use the time as the only one driving variable Specify the velocity values for every driving variables Workbeftch Cardan shaft mechanism 174 LinkageDesigner User Manual In this chapter you will build an ex
159. world VRMLTextureTransform None Defines the textureTransform node of the graphics in the VRML world VRMLInterpolation Automatic Switch on or off the interpolation between the states Caption describing the option box Export the puma560 robot animation to a VRML97 file In 40 WriteVRMLAnimation puma560 q1 gt 0 3 q2 gt 70 q3 gt 160 q1 gt 130 q4 gt 60 q6 gt 90 Resolution gt 5 LinkMarkers gt link6 Boxed gt False MarkerSize gt 150 TracePoints gt link6 150 0 0 96 LinkageDesigner User Manual m Start netscape explorer with the generated VRML97 file Start netscape explorer with the generated VRML97 file In order to see the VRML world you must have installed a plug in on your system In 41 Run start explorer lt gt LinkageVRMLFile puma560 animation in VRML97 viewer 4 Join linkages 97 Join linkages Very often linkages share the same kinematic principles that one might want to reuse as building blocks of more complicated mechanism LinkageDesigner support this kind of copy and paste linkages through the AttacheLinkage function This function allows you to glue two or more linkages together to arrive a more complex mechanism with minimum effort AttacheLinkage function is especially useful in defining mechanism having replicate base mechanism like an engine To illustrate this linkage definition technique we will build a V e
160. y around the common z axis In order to define the rotational joint between link1 and link2 the joint markers of both link has to be specified Define the joint marker for link by translating the LLRF with 0 0 5 vector In 37 mx1 MakeHomogenousMatrix 0 0 5 MatrixForm Out 37 MatrixForm 1 0 0 0 a c oO 1 0 0 oF Oo 0 5 ij Show the geometry and the joint marker of linki together In 38 Show linklGeometry Graphics3D Marker3D mx1 PlotRange gt A11 LLLP ALL 7 OVE os Out 38 Graphics3D 1 Principles of linkage definition 43 Define the joint marker for link2 by translating the LLRF with 0 0 1 2 vector and rotating 180 around x axis In 40 mx2 MakeHomogenousMatrix 0 0 1 2 0 0 1 MatrixForm Out 40 MatrixForm i 9 0 0 0 1 0 0 0 0 1 1 2 0 0 0 1 Show the geometry and the joint marker of link2 together In 44 Show link2Geometry Graphics3D Marker3D mx2 MarkerSize gt 2 MarkerLabels gt None 2 Out 44 Graphics3D You can see that the joint marker definition for link and link2 places the 1ink2 upside down on the top of the peek of 1inkl Create a test linkage with link as the Workbench In 45 test1 CreateLinkage test1 WorkbenchName gt link1 Out 45 LinkageData 6 44 LinkageDesigner User Manual Append the rotational joint definition between link and link2 to test linkage In 46
161. y of link3 at t 1 12 Timing v2 GetLinkageRules SetDrivingVariables cardanShaftT2 t gt 1 12 12 158 Second 5 53371x107H 0 9 59517x1071j 6 28323 7 01031x10 71 0 000142569 SetDrivingVelocities linkage new Replaces the driving velocities of linkage with new and return resulted LinkageData SetDrivingVelocitiesTo linkage new Replaces the driving velocities of linkage with new and reset the resulted LinkageData to linkage Change the driving velocities Finally you can calculate the derivative vectors for cardanShaftT2 This linkage was converted with NToTimeDependentLinkage function therefore the calculation time are considerably shorter than in case of the two other time dependent linkages 7 Kinematics of linkages 193 Get the first derivatives of link3 s motion in cardanShaftT3 linkage Timing v3 GetLinkageDerivative cardanShaftT3 link3 0 48 Second Null Calculate the translational and rotational velocity of link3 at q130 Timing v3 GetLinkageRules SetDrivingVariables cardanShaftT3 ql gt 30 0 561 Second 0 000340819 2 32804x10 0 000590334 1 00001 3 93559x10 5 0 0000226903 Set the driving velocity of q1 variable to 2 SetDrivingVelocitiesTo cardanShaftT3 q1 gt 2 LinkageData 10 Calculate the translational and rotational velocity of link3 at q1 30 Timing v3 GetLinkageRules SetDrivingVariables cardanShaft
162. ynamic Visualizer If you have installed the Dynamic Visualizer application package you can use it to render linkages LinkageDesigner package provides the VisualizeLinkage function to support the linkage rendering in Dynamic Visualizer VisualizeLinkage linkage renders linkage in Dynamic Visualizer Rendering linkage in Dynamic Visualizer Load LinkageDesigner package lt lt LinkageDesigner If the Dynamic Visualizer application package is installed on your system it is loaded together with LinkageDesigner package therefore it is not necessary to load Load the crank slider mechanism In 15 lt lt crankSliderMechanism txt Out 15J LinkageData 7 m Visualize the crank slider mechanism In 16 VisualizeLinkage crankSliderMechanism Out 16J CrankSlider Workbench CrankSlider Crank CrankSlider ConnectingRod CrankSlider Slider 3 Render linkages 81 Crank slider mechanism displayed in Dynamic Visualizer Dynamic Visualizer does not visualize text primitives therefore VisualizeLinkage function remove all text primitives from the graphical representation of the linkage before it is rendered Every link of the linkage is visualized as a Object 3D object that is identified with the full name of the link You can change the rendering options of each individual link using the settings of Dynamic Visualizer VisualizeLinkage has the same basic options as Linkage3D function option

Download Pdf Manuals

image

Related Search

Related Contents

GE 49-60562-2 Refrigerator User Manual  XV-Z15000 Operation-Manual IT  OUTDOOR TV USER MANUAL  か ん た ん ガ イ ド  here - Adam Morse    Digital-Analog Conversion Module Type  Senseo HD7007  MODE D`EMPLOI D600F INTRODUCTION Voici Le Dictionnaire du  GE 200D8074P037 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file