v2

Explicit modules of V2 Robots.

Package Contents

Classes

ActiveHingeV2

An active hinge v2 module for a modular robot.

BodyV2

Body of a V2 modular robot.

BrickV2

A brick module for a modular robot.

CoreV2

The core module of a modular robot.

class ActiveHingeV2(rotation: float | modular_robot.body._right_angles.RightAngles)

Bases: modular_robot.body.base.ActiveHinge

Inheritance diagram of modular_robot.body.v2.ActiveHingeV2

An active hinge v2 module for a modular robot.

This is a rotary joint.

class BodyV2

Bases: modular_robot.body.base.Body

Inheritance diagram of modular_robot.body.v2.BodyV2

Body of a V2 modular robot.

property core_v2: modular_robot.body.v2._core_v2.CoreV2

Get the specific v2 core of the body.

This function is usd since the base core has fewer attributes than a V2 core. Using this, allows us to specify the return type without overwriting functions of the base module.

Returns:

The v2 core.

class BrickV2(rotation: float | modular_robot.body._right_angles.RightAngles)

Bases: modular_robot.body.base.Brick

Inheritance diagram of modular_robot.body.v2.BrickV2

A brick module for a modular robot.

class CoreV2(rotation: float | modular_robot.body._right_angles.RightAngles, num_batteries: int = 1)

Bases: modular_robot.body.base.Core

Inheritance diagram of modular_robot.body.v2.CoreV2

The core module of a modular robot.

property front_face: modular_robot.body.v2._attachment_face_core_v2.AttachmentFaceCoreV2

Get the face attached to the front of the core.

Returns:

The attached module.

property right_face: modular_robot.body.v2._attachment_face_core_v2.AttachmentFaceCoreV2

Get the face attached to the right of the core.

Returns:

The attached module.

property back_face: modular_robot.body.v2._attachment_face_core_v2.AttachmentFaceCoreV2

Get the face attached to the back of the core.

Returns:

The attached module.

property left_face: modular_robot.body.v2._attachment_face_core_v2.AttachmentFaceCoreV2

Get the face attached to the left of the core.

Returns:

The attached module.

property horizontal_offset: float

Get the horizontal offset for attachment positions (in m).

Returns:

The value.

property vertical_offset: float

Get the vertical offset for attachment positions (in m).

Returns:

The value.

property attachment_faces: dict[int, modular_robot.body.v2._attachment_face_core_v2.AttachmentFaceCoreV2]

Get all attachment faces for the Core.

Returns:

The attachment faces.

mass

Here we produce the attachment faces, with the advanced logic behind conflict checking.