Skip to content
LIBRARY
examples.OpenLoopCartpole.md

examples.OpenLoopCartpole

Cartpole mounted in a world, with the force input exposed as a top-level variable for linearization and control design.

Usage

MultibodyComponents.examples.OpenLoopCartpole()

Variables

NameDescriptionUnits
xCart positionm
vCart velocitym/s
phiPendulum angle, zero when the pendulum points uprad
wPendulum angular velocityrad/s

Behavior

Source

dyad
"""
Cartpole mounted in a world, with the force input exposed as a top-level
variable for linearization and control design.
"""
component OpenLoopCartpole
  world = MultibodyComponents.World()
  cartpole = Cartpole()
  "Cart position"
  variable x::Length
  "Cart velocity"
  variable v::Velocity
  "Pendulum angle, zero when the pendulum points up"
  variable phi::Angle
  "Pendulum angular velocity"
  variable w::AngularVelocity
relations
  x = cartpole.x
  v = cartpole.v
  phi = cartpole.phi
  w = cartpole.w
end
Flattened Source
dyad
"""
Cartpole mounted in a world, with the force input exposed as a top-level
variable for linearization and control design.
"""
component OpenLoopCartpole
  world = MultibodyComponents.World()
  cartpole = Cartpole()
  "Cart position"
  variable x::Length
  "Cart velocity"
  variable v::Velocity
  "Pendulum angle, zero when the pendulum points up"
  variable phi::Angle
  "Pendulum angular velocity"
  variable w::AngularVelocity
relations
  x = cartpole.x
  v = cartpole.v
  phi = cartpole.phi
  w = cartpole.w
metadata {}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses