config.coordinates

Coordinates in a configuration: a name, or a mapping of one registered kind to its arguments.

Each kind is a builder (args, scope, path) -> Coordinate registered as "coordinate", so a plugin adds its own. Builders record which Param holds which value of the file, so the file can be written back with the Params’ current values.

Functions

box_distance(args, scope, path)

Signed distance from a point to a box's surface: {point, center, half_sizes}.

capsule_distance(args, scope, path)

Signed distance from a point to a capsule's surface: {point, a, b, radius}, the segment from a to b and its radius.

cylinder_distance(args, scope, path)

Signed distance from a point to a cylinder's surface: {point, center, axis, radius, half_height}.

difference(args, scope, path)

a − b; a plain list on either side is a live reference named ref.

from_frame(args, scope, path)

A vector given along the axes of a frame of the robot, in the base frame: {of, at, s}.

in_frame(args, scope, path)

A vector along the axes of a frame of the robot: {of, at, s}.

joint(args, scope, path)

Entries of the robot's q: an index, a list of indices, or {start, stop, step}.

norm(args, scope, path)

The length of a coordinate.

orientation_error(args, scope, path)

The rotation vector of a frame of the robot from a goal: {at, s, goal}.

plane_distance(args, scope, path)

Signed distance from a point to a plane: {point, normal, origin (0, 0, 0)}.

point(args, scope, path)

A point of the robot: a site's name, or {at, s, offset} as in robot.point.

projection(args, scope, path)

The length of a coordinate along a direction: {of, direction, scope (episode)}.

ref(args, scope, path)

A live reference held in a Param: {name, value, unit (m), scope (stage)}.

rotation(args, scope, path)

The rotation matrix of a frame of the robot, row by row: {at, s} as for a point.

slice_(args, scope, path)

Some entries of a coordinate: {of, index} with an index or a list of indices.

sphere_distance(args, scope, path)

Signed distance from a point to a sphere's surface: {point, center, radius}.

stack(args, scope, path)

Coordinates stacked into one: a list.

state(args, scope, path)

A virtual state of the controller, by name.

sum_(args, scope, path)

a + b; a plain list on either side is a live reference named ref.

Classes

Scope(robot, names, record)

What a coordinate is built from: the robot, the coordinates and states known by name, and record, the Param behind each value of the file (by its path).