Skip to content
LIBRARY
TrajectorySelector.md

TrajectorySelector

Selects one axis from the vector-valued outputs of a multi-axis trajectory generator.

Given the position, velocity, acceleration, and jerk reference vectors of an nin-axis trajectory generator, this component picks the entry at index from each and exposes them as scalar references for a single-axis controller. Using one instance per axis turns the axis-major trajectory outputs into per-axis reference bundles.

Usage

MultibodyComponents.TrajectorySelector()

Parameters:

NameDescriptionUnitsDefault value
ninNumber of axes in the input vectors1
indexIndex of the selected axis1

Connectors

  • q - This connector represents a real signal as an input to a component (RealInput)

  • qd - This connector represents a real signal as an input to a component (RealInput)

  • qdd - This connector represents a real signal as an input to a component (RealInput)

  • qddd - This connector represents a real signal as an input to a component (RealInput)

  • s - This connector represents a real signal as an output from a component (RealOutput)

  • v - This connector represents a real signal as an output from a component (RealOutput)

  • a - This connector represents a real signal as an output from a component (RealOutput)

  • j - This connector represents a real signal as an output from a component (RealOutput)

Behavior

Source

dyad
"""
Selects one axis from the vector-valued outputs of a multi-axis trajectory
generator.

Given the position, velocity, acceleration, and jerk reference vectors of an
`nin`-axis trajectory generator, this component picks the entry at `index` from
each and exposes them as scalar references for a single-axis controller. Using
one instance per axis turns the axis-major trajectory outputs into per-axis
reference bundles.
"""
component TrajectorySelector
  "Position reference vector"
  q = [RealInput() for i in 1:nin] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 100, "x2": 50, "y2": 200, "rot": 0}
      },
      "tags": []
    }
  }
  "Velocity reference vector"
  qd = [RealInput() for i in 1:nin] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 300, "x2": 50, "y2": 400, "rot": 0}
      },
      "tags": []
    }
  }
  "Acceleration reference vector"
  qdd = [RealInput() for i in 1:nin] {
    "Dyad": {"placement": {"diagram": {"x1": -50, "y1": 570, "x2": 50, "y2": 670}}}
  }
  "Jerk reference vector"
  qddd = [RealInput() for i in 1:nin] {
    "Dyad": {"placement": {"diagram": {"x1": -50, "y1": 770, "x2": 50, "y2": 870}}}
  }
  "Selected position reference"
  s = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 100, "x2": 1050, "y2": 200, "rot": 0}
      },
      "tags": []
    }
  }
  "Selected velocity reference"
  v = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 300, "x2": 1050, "y2": 400, "rot": 0}
      },
      "tags": []
    }
  }
  "Selected acceleration reference"
  a = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 500, "x2": 1050, "y2": 600, "rot": 0}
      },
      "tags": []
    }
  }
  "Selected jerk reference"
  j = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 700, "x2": 1050, "y2": 800, "rot": 0}
      },
      "tags": []
    }
  }
  "Number of axes in the input vectors"
  structural parameter nin::Integer = 1
  "Index of the selected axis"
  structural parameter index::Integer = 1
relations
  s = q[index]
  v = qd[index]
  a = qdd[index]
  j = qddd[index]
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TrajectorySelector.svg"},
    "labels": [
      {
        "label": "[$(index)]",
        "x": 500,
        "y": 850,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
Flattened Source
dyad
"""
Selects one axis from the vector-valued outputs of a multi-axis trajectory
generator.

Given the position, velocity, acceleration, and jerk reference vectors of an
`nin`-axis trajectory generator, this component picks the entry at `index` from
each and exposes them as scalar references for a single-axis controller. Using
one instance per axis turns the axis-major trajectory outputs into per-axis
reference bundles.
"""
component TrajectorySelector
  "Position reference vector"
  q = [RealInput() for i in 1:nin] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 100, "x2": 50, "y2": 200, "rot": 0}
      },
      "tags": []
    }
  }
  "Velocity reference vector"
  qd = [RealInput() for i in 1:nin] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 300, "x2": 50, "y2": 400, "rot": 0}
      },
      "tags": []
    }
  }
  "Acceleration reference vector"
  qdd = [RealInput() for i in 1:nin] {
    "Dyad": {"placement": {"diagram": {"x1": -50, "y1": 570, "x2": 50, "y2": 670}}}
  }
  "Jerk reference vector"
  qddd = [RealInput() for i in 1:nin] {
    "Dyad": {"placement": {"diagram": {"x1": -50, "y1": 770, "x2": 50, "y2": 870}}}
  }
  "Selected position reference"
  s = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 100, "x2": 1050, "y2": 200, "rot": 0}
      },
      "tags": []
    }
  }
  "Selected velocity reference"
  v = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 300, "x2": 1050, "y2": 400, "rot": 0}
      },
      "tags": []
    }
  }
  "Selected acceleration reference"
  a = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 500, "x2": 1050, "y2": 600, "rot": 0}
      },
      "tags": []
    }
  }
  "Selected jerk reference"
  j = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 700, "x2": 1050, "y2": 800, "rot": 0}
      },
      "tags": []
    }
  }
  "Number of axes in the input vectors"
  structural parameter nin::Integer = 1
  "Index of the selected axis"
  structural parameter index::Integer = 1
relations
  s = q[index]
  v = qd[index]
  a = qdd[index]
  j = qddd[index]
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TrajectorySelector.svg"},
    "labels": [
      {
        "label": "[$(index)]",
        "x": 500,
        "y": 850,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses