Skip to content

raisim::Tendon::PathElement ​

struct · #include <raisim/constraints/Tendon.hpp>

One element of a spatial tendon route. Create elements with the static factory functions.

Public types ​

Kind ​

cpp
enum class Kind

Site: via point. Sphere/Cylinder: wrapping obstacle (must sit between two via sites). Pulley: starts a new branch.

Enumerator
Site
Sphere
Cylinder
Pulley

Public member functions ​

withSideSite ​

cpp
PathElement &withSideSite(const Site &side)

Set the side site of a wrapping obstacle.

Parameters

ParameterDescription
side (in)side site

Returns *this for chaining.

Static member functions ​

via static ​

cpp
static PathElement via(const Site &site)

Parameters

ParameterDescription
site (in)via-point location

Returns a via-point element at site.

sphere static ​

cpp
static PathElement sphere(const Site &center, double radius)

Parameters

ParameterDescription
center (in)sphere center
radius (in)sphere radius (m)

Returns a spherical wrapping obstacle.

cylinder static ​

cpp
static PathElement cylinder(
    const Site &center,
    double radius,
    const Vec<3> &axis={0., 0., 1.})

Parameters

ParameterDescription
center (in)cylinder center
radius (in)cylinder radius (m)
axis (in)cylinder axis in the obstacle's body frame (normalized when the tendon is created)

Returns a cylindrical wrapping obstacle.

pulley static ​

cpp
static PathElement pulley(double divisor)

Parameters

ParameterDescription
divisor (in)positive length divisor for the following branch

Returns a pulley element that starts a new branch.

Public attributes ​

kind ​

cpp
Kind kind

Element kind.

site ​

cpp
Site site

Via-point location, or the obstacle center for Sphere/Cylinder.

radius ​

cpp
double radius

Obstacle radius in meters (Sphere/Cylinder only; must be positive).

axis ​

cpp
Vec<3> axis

Cylinder axis in the obstacle's body frame.

hasSideSite ​

cpp
bool hasSideSite

True if sideSite is set (see withSideSite()).

sideSite ​

cpp
Site sideSite

Optional site that selects which side of the obstacle the tendon wraps around.

divisor ​

cpp
double divisor

Pulley only: lengths of the branch that follows are scaled by 1/divisor (must be positive).

RaiSim — physics for robotics and AI.