roblocks.mdl
来自「robot toolbox很多不全面」· MDL 代码 · 共 1,824 行 · 第 1/3 页
MDL
1,824 行
DstBlock "qdd" DstPort 1 } } } Block { BlockType SubSystem Name "plot" Ports [1] Position [190, 82, 270, 138] BackgroundColor "red" ShowPortLabels on TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" MaskDescription "Graphical robot display." MaskHelp "This block graphically displays the named robot" MaskPromptString "Name of robot" MaskStyleString "edit" MaskTunableValueString "on" MaskEnableString "on" MaskVisibilityString "on" MaskToolTipString "on" MaskVariables "robot=@1;" MaskInitialization "plot(robot,zeros(1,robot.n))" MaskDisplay "text(0.5, 0.5, robot.name, 'horizontalAlignmen""t', 'center')" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "normalized" MaskValueString "robot" System { Name "plot" Location [511, 512, 776, 594] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Inport Name "q" Position [25, 33, 55, 47] Port "1" Interpolate on } Block { BlockType "S-Function" Name "S-Function" Ports [1] Position [120, 25, 180, 55] FunctionName "slplotbot" Parameters "robot" PortCounts "[]" SFunctionModules "''" } Line { SrcBlock "q" SrcPort 1 DstBlock "S-Function" DstPort 1 } } } Block { BlockType SubSystem Name "rne" Ports [3, 1] Position [35, 197, 130, 263] BackgroundColor "red" ShowPortLabels on TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" MaskDescription "Rigid-body inverse dynamics." MaskHelp "Given a robot dynamic model and joint angle, ra""te and acceleration determine the required joint torque. Useful for computed"" and inverse torque control schemes." MaskPromptString "Robot object|Gravity" MaskStyleString "edit,edit" MaskTunableValueString "on,on" MaskCallbackString "|" MaskEnableString "on,on" MaskVisibilityString "on,on" MaskToolTipString "on,on" MaskVariables "robot=@1;grav=@2;" MaskInitialization "n=robot.n;" MaskDisplay "port_label('output', 1, 'tau')\nport_label('inp""ut', 1, 'q')\nport_label('input', 2, 'qd')\nport_label('input', 3, 'qdd')\nte""xt(0.9, 0.9, robot.name, 'horizontalAlignment', 'right')\n" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "normalized" MaskValueString "robot|[0 0 9.81]" MaskVariableAliases "," System { Name "rne" Location [240, 487, 732, 638] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Inport Name "q" Position [20, 33, 50, 47] Port "1" Interpolate on } Block { BlockType Inport Name "qd" Position [20, 73, 50, 87] Port "2" Interpolate on } Block { BlockType Inport Name "qdd" Position [15, 113, 45, 127] Port "3" Interpolate on } Block { BlockType MATLABFcn Name "MATLAB Fcn" Position [115, 66, 290, 94] MATLABFcn "rne(robot, u(1:n)', u(n+1:2*n)', u(2*n+1:3*""n)')" OutputDimensions "n" OutputSignalType "auto" Output1D on } Block { BlockType Mux Name "Mux" Ports [3, 1] Position [85, 21, 90, 139] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Outport Name "tau" Position [370, 73, 400, 87] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "Mux" SrcPort 1 DstBlock "MATLAB Fcn" DstPort 1 } Line { SrcBlock "q" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "qd" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "qdd" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "MATLAB Fcn" SrcPort 1 DstBlock "tau" DstPort 1 } } } Block { BlockType SubSystem Name "rpy2T" Ports [3, 1] Position [630, 148, 680, 202] BackgroundColor "red" ShowPortLabels on TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" MaskDescription "Convert roll/pitch/yaw angles to transform." MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "normalized" System { Name "rpy2T" Location [167, 513, 531, 662] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Inport Name "roll" Position [25, 33, 55, 47] Port "1" Interpolate on } Block { BlockType Inport Name "pitch" Position [25, 68, 55, 82] Port "2" Interpolate on } Block { BlockType Inport Name "yaw" Position [25, 103, 55, 117] Port "3" Interpolate on } Block { BlockType MATLABFcn Name "MATLAB Fcn" Position [120, 60, 180, 90] MATLABFcn "rpy2tr(u)" OutputDimensions "[4 4]" OutputSignalType "auto" Output1D off } Block { BlockType Mux Name "Mux" Ports [3, 1] Position [85, 20, 90, 130] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Outport Name "T" Position [225, 68, 255, 82] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "yaw" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "MATLAB Fcn" SrcPort 1 DstBlock "T" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "MATLAB Fcn" DstPort 1 } Line { SrcBlock "roll" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "pitch" SrcPort 1 DstBlock "Mux" DstPort 2 } } } Block { BlockType SubSystem Name "tr2diff" Ports [2, 1] Position [530, 262, 580, 318] BackgroundColor "red" ShowPortLabels on TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" MaskDescription "Robot forward kinematics." MaskHelp "Compute homogeneous transform for robot end-eff""ector given joint angles." MaskPromptString "Robot object" MaskStyleString "edit" MaskTunableValueString "on" MaskEnableString "on" MaskVisibilityString "on" MaskToolTipString "on" MaskVariables "robot=@1;" MaskDisplay "port_label('input', 1, 'T1')\nport_label('input""', 2, 'T2')\nport_label('output', 1, 'dx')\n\n" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "normalized" MaskValueString "robot" System { Name "tr2diff" Location [198, 462, 562, 611] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Inport Name "T1" Position [45, 38, 75, 52] Port "1" Interpolate on } Block { BlockType Inport Name "T2" Position [45, 93, 75, 107] Port "2" Interpolate on } Block { BlockType MATLABFcn Name "MATLAB Fcn" Position [215, 40, 275, 70] MATLABFcn "tr2diff(reshape(u(1:16),4,4), reshape(u(17:""32),4,4))" OutputDimensions "6" OutputSignalType "auto" Output1D on } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [185, 36, 190, 74] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Reference Name "Reshape" Ports [1, 1] Position [115, 33, 145, 57] SourceBlock "simulink3/Signals\n& Systems/Reshape" SourceType "Reshape" OutputDimensionality "1-D array" OutputDimensions "[1,1]" } Block { BlockType Reference Name "Reshape1" Ports [1, 1] Position [125, 88, 155, 112] SourceBlock "simulink3/Signals\n& Systems/Reshape" SourceType "Reshape" OutputDimensionality "1-D array" OutputDimensions "[1,1]" } Block { BlockType Outport Name "dx" Position [300, 48, 330, 62] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "MATLAB Fcn" SrcPort 1 DstBlock "dx" DstPort 1 } Line { SrcBlock "T1" SrcPort 1 DstBlock "Reshape" DstPort 1 } Line { SrcBlock "T2" SrcPort 1 DstBlock "Reshape1" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "MATLAB Fcn" DstPort 1 } Line { SrcBlock "Reshape" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Reshape1" SrcPort 1 Points [10, 0] DstBlock "Mux" DstPort 2 } } } Block { BlockType SubSystem Name "xyz2T" Ports [3, 1] Position [625, 78, 675, 132] BackgroundColor "red" ShowPortLabels on TreatAsAtomicUnit off RTWSystemCode "Auto" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" MaskDescription "Convert xyz scalars to transform." MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "normalized" System { Name "xyz2T" Location [167, 513, 531, 662] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" AutoZoom on Block { BlockType Inport Name "x" Position [25, 33, 55, 47] Port "1" Interpolate on } Block { BlockType Inport Name "y" Position [25, 68, 55, 82] Port "2" Interpolate on } Block { BlockType Inport Name "z" Position [25, 103, 55, 117] Port "3" Interpolate on } Block { BlockType MATLABFcn Name "MATLAB Fcn" Position [120, 60, 180, 90] MATLABFcn "transl(u)" OutputDimensions "[4 4]" OutputSignalType "auto" Output1D off } Block { BlockType Mux Name "Mux" Ports [3, 1] Position [85, 20, 90, 130] ShowName off Inputs "3" DisplayOption "bar" } Block { BlockType Outport Name "T" Position [225, 68, 255, 82] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "y" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "x" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "MATLAB Fcn" DstPort 1 } Line { SrcBlock "MATLAB Fcn" SrcPort 1 DstBlock "T" DstPort 1 } Line { SrcBlock "z" SrcPort 1 DstBlock "Mux" DstPort 3 } } } Annotation { Position [268, 24] BackgroundColor "lightBlue" Text "Robotics Toolbox for Matlab (release 7)" FontName "new century schoolbook" FontSize 24 FontWeight "bold" } Annotation { Position [245, 216] Text "TODO\n" } Annotation { Position [90, 330] Text "Copyright (c) 2002 Peter Corke" } Annotation { Position [67, 57] BackgroundColor "lightBlue" Text "Dynamics" FontSize 12 FontWeight "bold" } Annotation { Position [232, 57] BackgroundColor "lightBlue" Text "Graphics" FontSize 12 FontWeight "bold" } Annotation { Position [497, 57] BackgroundColor "lightBlue" Text "Kinematics" FontSize 12 FontWeight "bold" } Annotation { Position [697, 57] BackgroundColor "lightBlue" Text "Transform conversion" FontSize 12 FontWeight "bold" } Annotation { Position [342, 57] BackgroundColor "lightBlue" Text "Trajectory" FontSize 12 FontWeight "bold" } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?