MultibodyComponents
This is the documentation for the MultibodyComponents library. Here you will find the documentation for the various definitions contained in MultibodyComponents.
Note that this documentation is automatically generated primarily from the doc strings and metadata associated with those definitions.
Types
OrientationState- Specifies the type of orientation state variables used in a component.PartialLineForce- Base model for line force components that define the force law directlyPartialOrientation- Partial component providing orientation state variables for a 3D frame.PartialTwoFrames- Partial model with two 3D frames.PlanarMechanics.PartialTwoFrameSensor- Partial model for sensors with two frames, displayed as an analog dial gauge.PlanarMechanics.PartialTwoFrames- Partial model with two frames.ResolveInFrame- Specifies the coordinate frame in which force/torque inputs are resolved.RootedFrame- Specifies which frame of a component is closest to the root of the kinematic tree.Shape- Base visual shape primitive for 3D rendering.
Connectors
Components
AbsoluteAngles- Measures absolute Euler/Cardan angles of a frame relative to the world.ArrowShape- Arrow shape primitive for 3D rendering.Body- Rigid body with mass, inertia tensor, and one frame connector.BodyBox- Rigid body with box shape. Mass properties are computed from theBodyCylinder- Rigid body with cylinder shape. Mass properties are computed from theBodyShape- Body with shape: a rigid rod (FixedTranslation) fromframe_atoframe_bBoxShape- Box shape primitive for 3D rendering.BoxVisualizer- Frame-connected box visualizer with zero mass.Bushing- Compliant mount (bushing): roots one frame from the other through its ownCable- Cable / rope of total lengthland massm, modeled asnrigidCascadeServoController- Cascade motion controller with position, velocity, and force loops.Concat3- Three-way array concatenation. Takes three array inputs of structural sizesConeShape- Cone shape primitive for 3D rendering.ControlMixer- Static thrust mixer: maps three control channels into four thruster commandsControlledRotorCraft- Quadrotor with three PID feedback loops (altitude, roll, pitch) and aCutForce- Inline sensor measuring the cut force passing through the connection.CutMount- Zero-clearance mount that rigidly constrains selected directions and prescribesCutTorque- Inline sensor measuring the cut torque passing through the connection.CylinderShape- Cylinder shape primitive for 3D rendering.CylinderVisualizer- Frame-connected cylinder visualizer with zero mass.Cylindrical- Cylindrical joint: combined prismatic and revolute along/around the same axis.Damper- Linear damper acting as line force betweenframe_aandframe_b.Demux3- Split a 3-element vector into three scalar outputs. Used inDemux4- Split a 4-element vector into four scalar outputs. Used insideRotorCraftDemux6- Split a 6-element vector into six scalar outputs. Used inFixed- A component rigidly attached to the world frame with translationrFixedRotation- Fixed translation and rotation offrame_bwith respect toframe_a.FixedTranslation- Fixed translation between two frames.Force- Force acting between two frames, defined by 3 input signals resolved inGasForce2- Rough approximation of the gas force in the cylinder of a combustion engine,GearConstraint- Ideal massless gear constraint between two arbitrary 3D shaft axes.JointRRP- Planar revolute - revolute - prismatic joint aggregation. Closes a planarJointRRR- Joint assembly of three revolute joints with parallel axes (hence RRR),JointSSP- Spherical - spherical - prismatic joint aggregation. Analytically closes aJointSSR- Spherical - spherical - revolute joint aggregation. Analytically closes aJointUPS- Universal - prismatic - spherical joint aggregation. A universal joint atJointUSP- Universal - spherical - prismatic joint aggregation. Analytically closes aJointUSR- Joint assembly consisting of a universal joint atframe_a, aKinematic5- A component emitting a 5th order polynomial trajectory.KinematicPTP- A component emitting a trajectory created by thepoint_to_pointtrajectory generator.KinematicPTPBoundedJerk- A component emitting a time-optimal point-to-point trajectory with bounded velocity,LQRControlledRotorCraft- Quadrotor under static LQR state feedback. The 13 measured signals from theLQRGain- Static multivariable (MIMO) gain block implementingy_out = K * u_in.LineForceBase- Base model for line force components.LineForceWithMass- Line force component with optional point mass on the line between two frames.Mounting1D- Propagates 1D rotational flange reactions into the 3D frame.Mux1- Trivial adapter that wraps a single scalar input into a 1-element vectorMux3- Bundle three scalar signals into a 3-element vector,y = [u1, u2, u3].NullJoint- Rigid connection between two frames (zero degrees of freedom).PacejkaSlippingWheel- Wheel with mass, inertia, and Pacejka magic-formula friction on the flat planePacejkaWheelJoint- Joint for a wheel with Pacejka magic-formula friction rolling on the flat planePlanar- Planar joint: motion in a plane plus rotation about the plane normal.PlanarMechanics.AbsoluteAcceleration- Measures absolute acceleration and angular acceleration of the origin of a frame connector.PlanarMechanics.AbsolutePosition- Measures absolute position and orientation of the origin of a frame connector.PlanarMechanics.AbsoluteVelocity- Measures absolute velocity and angular velocity of the origin of a frame connector.PlanarMechanics.BasicAbsolutePosition- Measures absolute position and orientation resolved in a configurable frame.PlanarMechanics.BasicRelativePosition- Measures relative position and orientation (frame_b - frame_a) resolved in aPlanarMechanics.Body- Body component with mass and inertia.PlanarMechanics.BodyShape- Body with shape: a rigid rod (FixedTranslation) from frame_a to frame_b with aPlanarMechanics.Cable- Planar cable / rope of total lengthland massm, modeled asnrigidPlanarMechanics.CutForce- Measures the cut force between two rigidly connected frames.PlanarMechanics.CutTorque- Measures the cut torque between two rigidly connected frames.PlanarMechanics.Damper- Linear velocity-dependent damper.PlanarMechanics.DetachableMount- Detachable 2D spring-damper mount whose force and torque are scaled by thePlanarMechanics.DifferentialGear- A differential gear that distributes torque equally among two output flanges.PlanarMechanics.Distance- Measures the distance between the origins of two frame connectors.PlanarMechanics.Fixed- Frame fixed in the planar world frame at a given position and orientation.PlanarMechanics.FixedRotation- Fixed angular offset between two frames with no translational offset.PlanarMechanics.FixedTranslation- A fixed translation between two components (rigid rod).PlanarMechanics.FrameVisualizer2D- Visualizes a 2D frame as three colored axis cylinders (red=x, green=y, blue=z).PlanarMechanics.IdealPlanetary- Ideal planetary gearbox without inertia, elasticity, damping or backlash.PlanarMechanics.OneDOFRollingWheelJoint- An ideal rolling wheel joint constrained to move only along the x-axis without slip.PlanarMechanics.OneDOFSlippingWheelJoint- Simplified 1-DOF wheel joint with slip-dependent friction, constrained to the x-axis.PlanarMechanics.PlanarToMultiBody- Adapter between a 2D planar frame (frame_a) and a full 3D frame (frame_b).PlanarMechanics.Power- Measures the mechanical power transmitted between two rigidly connected frames.PlanarMechanics.PrescribedAcceleration- Prescribed acceleration offrame_bvia input connectors.PlanarMechanics.PrescribedPose- Prescribed position and orientation offrame_bvia input connectors.PlanarMechanics.PrescribedPosition- Prescribed position offrame_bvia input connectors.PlanarMechanics.PrescribedVelocity- Prescribed velocity offrame_bvia input connectors.PlanarMechanics.Prismatic- Prismatic (sliding) joint allowing translation along a fixed direction.PlanarMechanics.RelativeAcceleration- Measures relative acceleration and angular acceleration between the origins of twoPlanarMechanics.RelativeForce- Relative force and torque acting between frame_a and frame_b, defined by input signals.PlanarMechanics.RelativePosition- Measures relative position and orientation between the origins of two frame connectors.PlanarMechanics.RelativeVelocity- Measures relative velocity and angular velocity between the origins of two frame connectors.PlanarMechanics.Revolute- Revolute joint: allows rotation about the z-axis while rigidly connecting positions.PlanarMechanics.SlipBasedWheelJoint- Slip-based wheel joint with slip-dependent friction characteristics.PlanarMechanics.Spring- Linear 2D translational spring with independent x and y stiffness.PlanarMechanics.SpringDamper- Linear 2D translational spring-damper with independent x, y, and phi stiffness and damping.PlanarMechanics.TransformAbsoluteVector- Rotates an absolute vector between frames via a two-step rotation through thePlanarMechanics.TransformRelativeVector- Rotates a relative vector between frames via a two-step rotation through thePlanarMechanics.World- The root component for all 2D planar mechanics models.PlanarMechanics.WorldForceTorque- External force and torque acting at frame_b, defined by input signals.PlanarMechanics.examples.excavator.AnchoredCylinderMount- APlanarCylinderMounttogether with the two anchor translations that place itsPlanarMechanics.examples.excavator.ControlledCylinder- A hydraulic cylinder axis with its own valve, sensors, and cascade controller.PlanarMechanics.examples.excavator.DigReference- Piston position references for the three excavator cylinders over one digPlanarMechanics.examples.excavator.PlanarCylinderMount- Mounts a translational actuator between two planar frames as a line forcePlanarMechanics.examples.excavator.ProportionalValve- Proportional 4/3 directional valve metering flow between a supply, a tank, andPlanarMechanics.examples.excavator.SoilContact- Soil reaction force acting on a digging tool at a flat soil surface.PlanarMechanics.examples.two_joint_robot.InverseKinematicsDriver- Drives an inverse robot model in Cartesian tool space: the tool-flange position ofPlanarMechanics.examples.two_joint_robot.InverseModelDriver- Drives the joints of an inverse robot model at the acceleration level from a vector-valued reference acceleration and measures the torques required to realize the reference motion. The measured torques constitute a computed-torque feedforward signal.PlanarMechanics.examples.two_joint_robot.JointController- Joint-level tracking controller: selects the reference position and velocity for one joint from vector-valued trajectory signals and computes a torque command using a PID controller with external derivative and feedforward inputs. The derivative input is formed from the velocity reference and a filtered velocity measurement.PlanarMechanics.examples.two_joint_robot.TwoJointPlanarArm- Planar 2-joint serial arm: two revolute joints exposed through rotational flanges, two rigid links, and an end-effector body. Instantiated twice in TwoJointPlanarRobotPID: once as the simulated robot and once as an inverse model for computed-torque feedforward.PlanarMechanics.examples.two_joint_robot.UnknownTorqueSource- Applies an a-priori unknown torque to the spline and reports it as an output. The torque magnitude carries no equation of its own: it is determined by the constraints of the surrounding model. This is the actuation side of an inverse model whose motion is prescribed elsewhere, e.g. a robot whose tool position is prescribed by a forceless PrescribedPosition while the joints are driven by UnknownTorqueSource components: the reported torques then solve the inverse dynamics of the prescribed motion.PlaneShape- Plane shape primitive for 3D rendering.Power- Inline sensor measuring mechanical power transmitted fromframe_atoframe_b.PrescribedAcceleration- Prescribed acceleration offrame_bvia input connectors.PrescribedPose- Prescribed position and orientation offrame_bvia input connectors.PrescribedPosition- Prescribed position offrame_bvia input connectors.PrescribedVelocity- Prescribed velocity offrame_bvia input connectors.Prismatic- Prismatic joint: translation along a single axis in 3D.PrismaticConstraint- Prismatic cut-joint that rigidly constrains the orientation offrame_bto thatPrismaticWithLengthConstraint- Prismatic joint whose translational distance is computed analytically from aRelativeAngles- Measures relative Euler/Cardan angles between two frames.RelativePosition- Measures the relative position vector between two frames.Revolute- Revolute joint: rotation about a single axis in 3D.RevoluteConstraint- Revolute cut-joint that constrainsframe_bto a single rotational degree ofRevolutePlanarLoopConstraint- Revolute joint for closing planar kinematic loops.RevoluteWithLengthConstraint- Revolute joint whose angle is determined analytically by a length constraintRollingConstraintVerticalWheel- Rolling constraint for a vertical wheel rolling on the world x-z plane.RollingWheel- Ideal rolling wheel (mass + inertia) on the flat plane y = 0.RollingWheelJoint- Joint (no mass, no inertia) for an ideal rolling wheel on the flat plane y = 0.RollingWheelSet- Ideal two-wheel rolling axle with masses and inertia per wheel.RollingWheelSetJoint- Idealized two-wheel rolling axle (wheelset) without bodies.RotorCraft- Open-loop quadrotor airframe: a centralBodywith Euler-angle orientation,ShapefileVisualizer- Frame-connected mesh visualizer with no mass or inertia.SlipWheelJoint- Joint for a wheel with slip-dependent friction rolling on the flat plane y = 0.SlippingWheel- Wheel with mass, inertia, and slip-dependent friction on the flat plane y = 0.SphereShape- Sphere shape primitive for 3D rendering.SphereVisualizer- Frame-connected sphere visualizer with zero mass.Spherical- Spherical joint: free rotation in all three directions (ball joint).SphericalConstraint- Spherical cut-joint (ball joint) that constrains the relative position ofSphericalSpherical- Joint with two spherical-like ends connected by a fixed-length rod.Spring- Linear spring acting as line force betweenframe_aandframe_b.SpringDamperParallel- Linear spring and linear damper in parallel acting as line force betweenSpringShape- Spring coil shape primitive for 3D rendering.TexturedPlaneVisualizer- Frame-connected textured rectangle visualizer with no mass or inertia.Thruster- Idealized propeller thruster: applies a force along the local y-axis ofTorque- Torque acting between two frames, defined by 3 input signals resolved inTrajectorySelector- Selects one axis from the vector-valued outputs of a multi-axis trajectoryURDFBodyBox- Rigid body with box visualization, for URDF import.URDFBodyCylinder- Rigid body with cylinder visualization, for URDF import.URDFBodySphere- Rigid body with sphere visualization, for URDF import.URDFPrismatic- Prismatic joint preceded by a fixed translation and rotation.URDFRevolute- Revolute joint preceded by a fixed translation and rotation.Universal- Universal joint: two revolute joints in series with perpendicular axes.UniversalConstraint- Universal cut-joint that constrainsframe_bto two rotational degrees ofUniversalSpherical- Joint assembly: universal joint atframe_a+ spherical joint atframe_b,World- The root component for all 3D multibody models.WorldForce- External force acting atframe_b, defined by 3 input signals.WorldTorque- External torque acting atframe_b, defined by 3 input signals.examples.Cartpole- Inverted pendulum on a cart.examples.OpenLoopCartpole- Cartpole mounted in a world, with the force input exposed as a top-levelexamples.suspension.DoubleSuspensionWithExcitationAndMass- Half-car model: two excited quarter-car suspensions (rightmirror=falseandexamples.suspension.ExcitedWheelAssembly- Quarter-car suspension carrying a slipping wheel, excited by a time-varying road.examples.suspension.FullCar- Full four-wheel car model: fourExcitedWheelAssemblycorner suspensionsexamples.suspension.HalfCar- Half-car model with two rolling wheels: twoExcitedWheelAssemblysuspensionsexamples.suspension.QuarterCarSuspension- Double-wishbone quarter-car suspension linkage.examples.suspension.SuspensionWithExcitation- Quarter-car suspension driven by a sinusoidal wheel-position excitation.examples.suspension.SuspensionWithExcitationAndMass- Quarter-car model: an excited suspension carrying a chassis mass, constrained toexamples.suspension.SuspensionWithWheelAndMass- Quarter-car model with a rolling wheel: anExcitedWheelAssemblycarrying a
Analyses
ParallelKinematicRobotAnalysis- short ParallelKinematicRobotAnalysis analysis description
Examples
OpenLoopRotorCraft- Open-loop quadrotor + world used for linearization. Wraps aRotorCraftPlanarMechanics.examples.PendulumTest- A free swinging pendulum.PlanarMechanics.examples.SlipBasedWheelTest- A slip-based wheel.PlanarMechanics.examples.SpringAndDamperTest- This example shows how to use a spring and a damper separately. The motion is constrained by a prismatic joint. The spring passes a point of zero length.PlanarMechanics.examples.SpringDamperSystemTest- This example shows how to use a spring and a damper in combination. The motion of the body is not constrained.PlanarMechanics.examples.TwoTrackModelTest- A double track model of a car.PlanarMechanics.examples.dyad_balans.DyadBalans2D- This example models a wheeled balancing robot with a cascade control system stabilizing the angle in the inner loop and the position in the outer loop.PlanarMechanics.examples.dyad_balans.DyadBalans2DFF- This is a continuation of the DyadBalans2D example, adding a feedforward generator computed usingDyadControlSystems.feedforward_generatorin the scriptcompute_feedforward.jl. The feedforward generator provides a filtered position reference to the outer controller as well as an angle feedforward reference for the inner controller and a direct torque feedforward signal to be applied directly to the torque input. Both inner feedforward signals are connected to theu_ffport on theLimPIDcomponents.PlanarMechanics.examples.excavator.Excavator- Planar excavator digging through soil with hydraulically actuated boom, stick,PlanarMechanics.examples.trebuchet.Trebuchet- A planar trebuchet built from PlanarMechanics components.PlanarMechanics.examples.trebuchet.TrebuchetDetachable- A planar trebuchet that releases its projectile through a gated compliant mount.PlanarMechanics.examples.two_joint_robot.TwoJointPlanarRobotPID- Planar 2-joint serial robot tracking a jerk-bounded reference with per-joint JointController controllers. Computed-torque feedforward is obtained from a second instance of the arm acting as an inverse model: its joints are driven at the acceleration level by the reference trajectory through an InverseModelDriver, and the torques required to realize the reference motion are measured and fed to the feedforward inputs of the controllers.PlanarMechanics.examples.two_joint_robot.TwoJointPlanarRobotPIDCartesian- Planar 2-joint serial robot tracking a jerk-bounded reference specified in Cartesian tool-flange space. A single inverse instance of the arm solves both the inverse kinematics and the inverse dynamics: its tool flange is constrained to the Cartesian reference without applying force there, while its joints are actuated by unknown torques (InverseKinematicsDriver). The unknown torques constitute the computed-torque feedforward, and joint angle and velocity references for the per-joint JointController feedback controllers are measured on the same inverse instance.examples.CartWithInput- Cartpole driven in open loop by a cosine force signal.examples.CartWithSwingup- Cartpole with an energy-based swing-up controller and a stabilizing LQRexamples.Engine1b- # One-cylinder engine with gas force (planar loop closed by a constraint)examples.Engine1b_analytic- # One-cylinder engine with gas force (planar loop solved analytically)examples.FourBar- Planar four-bar linkage closed with aRevolutePlanarLoopConstraint.examples.FourBar2- Four-bar linkage closed with a cut joint.examples.FourBar3- Four-bar linkage closed with theUniversalSphericaljoint assembly.examples.QuaternionBody- # Free body with quaternion stateexamples.SpringMassSystem- # Spring-mass systemexamples.ThreeSprings- # Three springsexamples.TrajectoryPlannersTest- Example model for the Kinematic5 trajectory planner. The velocity output istests.CutMountTest- # CutMount Testtests.CylindricalJointTest- # Cylindrical Joint Testtests.DrivingWheelSetTest- # Driving Wheel Set Testtests.GearConstraintTest- # Gear Constraint Testtests.JointRRRTest- # JointRRR testtests.JointUSRTest- # JointUSR testtests.PacejkaWheelInWorld- # Pacejka Wheel In Worldtests.PlanarJointTest- # Planar Joint Testtests.PointGravityOrbit- Free-floating body in a point-gravity field (structuralpoint_gravity = truetests.PrescribedAccelerationTest- # Prescribed Acceleration Testtests.PrescribedPoseTest- # Prescribed Pose Testtests.PrescribedPositionTest- # Prescribed Position Testtests.PrescribedVelocityTest- # Prescribed Velocity Testtests.PrismaticConstraintTest- # Prismatic Constraint (closed loop with a spring)tests.RevoluteConstraintTest- # Revolute Constraint (closed loop with a spring)tests.RevolutePendulumRef- # Revolute Pendulum (reference for Spherical joint tests)tests.Sensors3DTest- # 3D Sensors Testtests.SlipVsPacejkaSpinUp- # Slip vs Pacejka spin-up comparisontests.SlipWheelInWorld- # Slip Wheel In Worldtests.SlipWheelOnIncline- # Slip Wheel on an inclined planetests.SlipWheelOnSurface- # Slip Wheel on a moving surfacetests.SphericalConstraintTest- # Spherical Constraint (closed loop with a spring)tests.SphericalFreeSpin- # Spherical Free Spin (zero gravity)tests.SphericalPendulum- # Spherical Pendulumtests.SphericalPendulumConstraint- # Spherical Pendulum (joint as pure constraint, body holds quaternion state)tests.SphericalPendulumQuatJoint- # Spherical Pendulum (quaternion state in joint)tests.UniversalConstraintTest- # Universal Constraint (closed loop with a spring)tests.UniversalPendulum- # Universal Pendulumtests.WheelInWorld- # Wheel In World
Tests
PlanarMechanics.BodyShapePendulumTest- Pendulum with BodyShape: Fixed -> Revolute -> BodyShape.PlanarMechanics.CentrifugalTest- Centrifugal acceleration test: a body on a rotating arm with an AbsoluteVelocity sensor.PlanarMechanics.CutForceTest- Test for CutForce sensor: a damped pendulum with three CutForce sensorsPlanarMechanics.CutTorqueTest- Test for CutTorque sensor: a damped pendulum with a CutTorque sensor, a WorldForcePlanarMechanics.OneDOFRollingWheelJointTest- Test for OneDOFRollingWheelJoint: a body connected to an ideal rolling wheel.PlanarMechanics.OneDOFSlippingWheelSegwayTest- Test for OneDOFSlippingWheelJoint: planar segway model.PlanarMechanics.OneDOFSlippingWheelSpinningTest- Test for OneDOFSlippingWheelJoint: a wheel spinning in place.PlanarMechanics.PlanarToMultiBodyEmbeddedTest- Embedding test ofPlanarToMultiBody: the planar world is mounted at a nonzeroPlanarMechanics.PlanarToMultiBodyKinematicTest- Kinematic test ofPlanarToMultiBody: a prescribed planar pose is lifted intoPlanarMechanics.PlanarToMultiBodyPendulumTest- Dynamic test ofPlanarToMultiBody: a swinging planar pendulum drives thePlanarMechanics.PrescribedAccelerationTest- A body whoseframe_ais driven by aPrescribedAccelerationcomponentPlanarMechanics.PrescribedPoseTest- A body whoseframe_ais driven by aPrescribedPosecomponent. PositionPlanarMechanics.PrescribedPositionTest- A body whoseframe_ais driven by aPrescribedPositioncomponent withPlanarMechanics.PrescribedVelocityTest- A body whoseframe_ais driven by aPrescribedVelocitycomponent withPlanarMechanics.RelativeForceTest- Test for RelativeForce: a damped pendulum with an applied sinusoidal relative force.PlanarMechanics.SensorsTest- Sensor test with two free-falling bodies: validates all 6 sensor types.PlanarMechanics.TestPlanarCableEndJoints- Planar cable test: World → Cable(end_joints=true, n=3) → Body.PlanarMechanics.TestPlanarCableNoEndJoints- Planar cable test: World → Cable(end_joints=false, n=3) → Body.PlanarMechanics.WorldForceTest- Test for WorldForceTorque: a damped pendulum with an applied sinusoidal force.tests.TestCableEndJoints- Simple test: World → Cable(end_joints=true, n=2) → Bodytests.TestCableNoEndJoints- Simple test: World → Cable(end_joints=false, n=2) → Body