Skip to content
LIBRARY
SphereVisualizer.md

SphereVisualizer

Frame-connected sphere visualizer with zero mass. Used for URDF import of zero-mass links with sphere geometry.

Usage

MultibodyComponents.SphereVisualizer(render=true, color=[1.0, 0.0, 0.0, 1.0], radius=0.1)

Parameters:

NameDescriptionUnitsDefault value
renderWhether to rendertrue
colorRGBA color[1.0, 0.0, 0.0, 1.0]
radiusRadius of the sphere0.1

Connectors

  • frame_a - Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or several Frame

connectors that can be connected together (Frame3D)

Variables

NameDescriptionUnits
r_shapePosition of sphere center relative to frame_a, resolved in frame_a

Behavior

Dict{MIME{Symbol("text/plain")}, String} with 1 entry: MIME type text/plain => "Error displaying result"

Source

dyad
"""
Frame-connected sphere visualizer with zero mass.
Used for URDF import of zero-mass links with sphere geometry.
"""
component SphereVisualizer
  frame_a = Frame3D() {}
  shape = SphereShape(render = render, color = color, r = frame_a.r_0, R = transpose(frame_a.R), r_shape = r_shape, length = 2 * radius, width = 2 * radius, height = 2 * radius)
  "Whether to render"
  parameter render::Boolean = true
  "RGBA color"
  parameter color::Real[4] = [1.0, 0.0, 0.0, 1.0]
  "Radius of the sphere"
  parameter radius::Real = 0.1
  "Position of sphere center relative to frame_a, resolved in frame_a"
  variable r_shape::Real[3] = [0, 0, 0]
relations
  frame_a.f = [0, 0, 0]
  frame_a.tau = [0, 0, 0]
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/SphereVisualizer.svg"},
    "labels": [
      {
        "label": "a",
        "x": 110,
        "y": 410,
        "rot": 0,
        "layer": "icon",
        "attrs": {
          "fill": "#333",
          "font-size": "80",
          "font-weight": "bold",
          "text-anchor": "middle",
          "dominant-baseline": "central"
        }
      }
    ]
  }
}
end
Flattened Source
dyad
"""
Frame-connected sphere visualizer with zero mass.
Used for URDF import of zero-mass links with sphere geometry.
"""
component SphereVisualizer
  frame_a = Frame3D() {}
  shape = SphereShape(render = render, color = color, r = frame_a.r_0, R = transpose(frame_a.R), r_shape = r_shape, length = 2 * radius, width = 2 * radius, height = 2 * radius)
  "Whether to render"
  parameter render::Boolean = true
  "RGBA color"
  parameter color::Real[4] = [1.0, 0.0, 0.0, 1.0]
  "Radius of the sphere"
  parameter radius::Real = 0.1
  "Position of sphere center relative to frame_a, resolved in frame_a"
  variable r_shape::Real[3] = [0, 0, 0]
relations
  frame_a.f = [0, 0, 0]
  frame_a.tau = [0, 0, 0]
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/SphereVisualizer.svg"},
    "labels": [
      {
        "label": "a",
        "x": 110,
        "y": 410,
        "rot": 0,
        "layer": "icon",
        "attrs": {
          "fill": "#333",
          "font-size": "80",
          "font-weight": "bold",
          "text-anchor": "middle",
          "dominant-baseline": "central"
        }
      }
    ]
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses