---
url: /dyad/dev/stdlib/MultibodyComponents/components/PlanarMechanics.examples.excavator.AnchoredCylinderMount.md
description: >-
  Dyad PlanarMechanics.examples.excavator.AnchoredCylinderMount docs.  A
  PlanarCylinderMount together with the two anchor translations that place its
  ends on the adjacent links.
---

# `PlanarMechanics.examples.excavator.AnchoredCylinderMount` {#PlanarMechanics.examples.excavator.AnchoredCylinderMount}

A `PlanarCylinderMount` together with the two anchor translations that place its ends on the adjacent links.

`frame_base` and `frame_rod` attach to the two link frames between which the cylinder acts; the fixed translations `r_base` and `r_rod` offset the mount ends to the cylinder anchor points on each link. The mechanical `flange` connects to the driving actuator.

This component extends from [`MultibodyComponents.Renderable`](../types/Renderable.md)

## Usage {#Usage}

`MultibodyComponents.PlanarMechanics.examples.excavator.AnchoredCylinderMount(render=true, color=[0.85, 0.75, 0.15, 1.0], specular_coefficient=1.5, r_base=[0, 0], r_rod=[1, 0], s_offset=1.0, stroke=0.5, barrel_radius=0.05)`

## Parameters: {#Parameters:}

|                   Name |                                          Description | Units |           Default value |
| ----------------------:| ----------------------------------------------------:| -----:| -----------------------:|
|               `render` |                                                      |     – |                    true |
|                `color` |                                                      |     – | \[0.85, 0.75, 0.15, 1.0] |
| `specular_coefficient` |                                                      |     – |                     1.5 |
|               `r_base` | Offset from the base-link frame to the barrel anchor |     m |                  \[0, 0] |
|                `r_rod` |     Offset from the rod-link frame to the rod anchor |     m |                  \[1, 0] |
|             `s_offset` |              Anchor distance at zero piston position |     m |                     1.0 |
|               `stroke` |     Cylinder stroke bounding the valid piston travel |     m |                     0.5 |
|        `barrel_radius` |                        Radius of the rendered barrel |     – |                    0.05 |

## Connectors {#Connectors}

* `frame_base` - Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.

All variables are resolved in the planar world frame. ([`Frame2D`](/stdlib/Dyad/connectors/Frame2D#Frame2D))

* `frame_rod` - Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.

All variables are resolved in the planar world frame. ([`Frame2D`](/stdlib/Dyad/connectors/Frame2D#Frame2D))

* `flange` - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. ([`Flange`](/stdlib/Dyad/connectors/Flange#Flange))

## Behavior {#Behavior}

## Source {#Source}

```dyad
"""
A `PlanarCylinderMount` together with the two anchor translations that place its
ends on the adjacent links.

`frame_base` and `frame_rod` attach to the two link frames between which the
cylinder acts; the fixed translations `r_base` and `r_rod` offset the mount ends
to the cylinder anchor points on each link. The mechanical `flange` connects to
the driving actuator.
"""
component AnchoredCylinderMount
  extends MultibodyComponents.Renderable(color = [0.85, 0.75, 0.15, 1.0])
  "Frame of the link carrying the base (barrel) anchor"
  frame_base = Frame2D() {
    "Dyad": {"placement": {"diagram": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}
  }
  "Frame of the link carrying the rod anchor"
  frame_rod = Frame2D() {
    "Dyad": {"placement": {"diagram": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}
  }
  "Mechanical flange of the driving actuator"
  flange = Flange() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  base_tf = MultibodyComponents.PlanarMechanics.FixedTranslation(r = r_base, render = false) {
    "Dyad": {"placement": {"diagram": {"x1": 790, "y1": 450, "x2": 690, "y2": 550}}}
  }
  rod_tf = MultibodyComponents.PlanarMechanics.FixedTranslation(r = r_rod, render = false) {
    "Dyad": {"placement": {"diagram": {"x1": 190, "y1": 450, "x2": 290, "y2": 550}}}
  }
  mount = PlanarCylinderMount(final s_offset = s_offset, final stroke = stroke, final barrel_radius = barrel_radius, final render = render, final color = color) {
    "Dyad": {"placement": {"diagram": {"x1": 550, "y1": 450, "x2": 450, "y2": 550}}}
  }
  "Offset from the base-link frame to the barrel anchor"
  parameter r_base::Length[2] = [0, 0]
  "Offset from the rod-link frame to the rod anchor"
  parameter r_rod::Length[2] = [1, 0]
  "Anchor distance at zero piston position"
  parameter s_offset::Length = 1.0
  "Cylinder stroke bounding the valid piston travel"
  parameter stroke::Length = 0.5
  "Radius of the rendered barrel"
  parameter barrel_radius::Real = 0.05
relations
  connect(frame_base, base_tf.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}}
  connect(base_tf.frame_b, mount.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}}
  connect(frame_rod, rod_tf.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}}
  connect(rod_tf.frame_b, mount.frame_b) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}}
  connect(mount.flange, flange) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {
  "Dyad": {"icons": {"default": "dyad://MultibodyComponents/PlanarCylinderMount.svg"}}
}
end
```

```dyad
"""
A `PlanarCylinderMount` together with the two anchor translations that place its
ends on the adjacent links.

`frame_base` and `frame_rod` attach to the two link frames between which the
cylinder acts; the fixed translations `r_base` and `r_rod` offset the mount ends
to the cylinder anchor points on each link. The mechanical `flange` connects to
the driving actuator.
"""
component AnchoredCylinderMount
  parameter render::Boolean = true
  parameter color::Real[4] = [0.5, 0.5, 0.5, 1.0]
  parameter specular_coefficient::Real = 1.5
  "Frame of the link carrying the base (barrel) anchor"
  frame_base = Frame2D() {
    "Dyad": {"placement": {"diagram": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}
  }
  "Frame of the link carrying the rod anchor"
  frame_rod = Frame2D() {
    "Dyad": {"placement": {"diagram": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}
  }
  "Mechanical flange of the driving actuator"
  flange = Flange() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": -50, "x2": 550, "y2": 50, "rot": 0}
      },
      "tags": []
    }
  }
  base_tf = MultibodyComponents.PlanarMechanics.FixedTranslation(r = r_base, render = false) {
    "Dyad": {"placement": {"diagram": {"x1": 790, "y1": 450, "x2": 690, "y2": 550}}}
  }
  rod_tf = MultibodyComponents.PlanarMechanics.FixedTranslation(r = r_rod, render = false) {
    "Dyad": {"placement": {"diagram": {"x1": 190, "y1": 450, "x2": 290, "y2": 550}}}
  }
  mount = PlanarCylinderMount(final s_offset = s_offset, final stroke = stroke, final barrel_radius = barrel_radius, final render = render, final color = color) {
    "Dyad": {"placement": {"diagram": {"x1": 550, "y1": 450, "x2": 450, "y2": 550}}}
  }
  "Offset from the base-link frame to the barrel anchor"
  parameter r_base::Length[2] = [0, 0]
  "Offset from the rod-link frame to the rod anchor"
  parameter r_rod::Length[2] = [1, 0]
  "Anchor distance at zero piston position"
  parameter s_offset::Length = 1.0
  "Cylinder stroke bounding the valid piston travel"
  parameter stroke::Length = 0.5
  "Radius of the rendered barrel"
  parameter barrel_radius::Real = 0.05
relations
  connect(frame_base, base_tf.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}}
  connect(base_tf.frame_b, mount.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}}
  connect(frame_rod, rod_tf.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}}
  connect(rod_tf.frame_b, mount.frame_b) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}]}}
  connect(mount.flange, flange) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {
  "Dyad": {"icons": {"default": "dyad://MultibodyComponents/PlanarCylinderMount.svg"}}
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
