_builders

Builders for specific modules or the modular robots.

Package Contents

Classes

ActiveHingeBuilder

A Builder for Hinges.

ActiveHingeSensorBuilder

A Builder for Cores.

AttachmentFaceBuilder

A Builder for Attachment Faces.

BrickBuilder

A Builder for Bricks.

Builder

An abstract builder class.

CameraSensorBuilder

A Builder for Cores.

CoreBuilder

A Builder for Cores.

IMUSensorBuilder

A Builder for Cores.

class ActiveHingeBuilder(module: revolve2.modular_robot.body.base.ActiveHinge, rigid_body: revolve2.simulation.scene.RigidBody, slot_pose: revolve2.simulation.scene.Pose)

Bases: modular_robot_simulation._build_multi_body_systems._builders._builder.Builder

Inheritance diagram of modular_robot_simulation._build_multi_body_systems._builders.ActiveHingeBuilder

A Builder for Hinges.

build(multi_body_system: revolve2.simulation.scene.MultiBodySystem, body_to_multi_body_system_mapping: modular_robot_simulation._build_multi_body_systems._body_to_multi_body_system_mapping.BodyToMultiBodySystemMapping) list[modular_robot_simulation._build_multi_body_systems._unbuilt_child.UnbuiltChild]

Build a module onto the Robot.

Parameters:
  • multi_body_system – The multi body system of the robot.

  • body_to_multi_body_system_mapping – A mapping from body to multi-body system

Returns:

The next children to be built.

class ActiveHingeSensorBuilder(sensor: revolve2.modular_robot.body.sensors.ActiveHingeSensor, rigid_body: revolve2.simulation.scene.RigidBody)

Bases: modular_robot_simulation._build_multi_body_systems._builders._builder.Builder

Inheritance diagram of modular_robot_simulation._build_multi_body_systems._builders.ActiveHingeSensorBuilder

A Builder for Cores.

build(multi_body_system: revolve2.simulation.scene.MultiBodySystem, body_to_multi_body_system_mapping: modular_robot_simulation._build_multi_body_systems._body_to_multi_body_system_mapping.BodyToMultiBodySystemMapping) list[modular_robot_simulation._build_multi_body_systems._unbuilt_child.UnbuiltChild]

Build a module onto the Robot.

Parameters:
  • multi_body_system – The multi body system of the robot.

  • body_to_multi_body_system_mapping – A mapping from body to multi-body system

Returns:

The next children to be built.

class AttachmentFaceBuilder(module: revolve2.modular_robot.body.base.AttachmentFace, rigid_body: revolve2.simulation.scene.RigidBody, slot_pose: revolve2.simulation.scene.Pose)

Bases: modular_robot_simulation._build_multi_body_systems._builders._builder.Builder

Inheritance diagram of modular_robot_simulation._build_multi_body_systems._builders.AttachmentFaceBuilder

A Builder for Attachment Faces.

build(multi_body_system: revolve2.simulation.scene.MultiBodySystem, body_to_multi_body_system_mapping: modular_robot_simulation._build_multi_body_systems._body_to_multi_body_system_mapping.BodyToMultiBodySystemMapping) list[modular_robot_simulation._build_multi_body_systems._unbuilt_child.UnbuiltChild]

Build a module onto the Robot.

Parameters:
  • multi_body_system – The multi body system of the robot.

  • body_to_multi_body_system_mapping – A mapping from body to multi-body system

Returns:

The next children to be built.

class BrickBuilder(module: revolve2.modular_robot.body.base.Brick, rigid_body: revolve2.simulation.scene.RigidBody, slot_pose: revolve2.simulation.scene.Pose)

Bases: modular_robot_simulation._build_multi_body_systems._builders._builder.Builder

Inheritance diagram of modular_robot_simulation._build_multi_body_systems._builders.BrickBuilder

A Builder for Bricks.

build(multi_body_system: revolve2.simulation.scene.MultiBodySystem, body_to_multi_body_system_mapping: modular_robot_simulation._build_multi_body_systems._body_to_multi_body_system_mapping.BodyToMultiBodySystemMapping) list[modular_robot_simulation._build_multi_body_systems._unbuilt_child.UnbuiltChild]

Build a module onto the Robot.

Parameters:
  • multi_body_system – The multi body system of the robot.

  • body_to_multi_body_system_mapping – A mapping from body to multi-body system

Returns:

The next children to be built.

class Builder

Bases: abc.ABC

Inheritance diagram of modular_robot_simulation._build_multi_body_systems._builders.Builder

An abstract builder class.

abstract build(multi_body_system: revolve2.simulation.scene.MultiBodySystem, body_to_multi_body_system_mapping: modular_robot_simulation._build_multi_body_systems._body_to_multi_body_system_mapping.BodyToMultiBodySystemMapping) list[modular_robot_simulation._build_multi_body_systems._unbuilt_child.UnbuiltChild]

Build a module onto the Robot.

Parameters:
  • multi_body_system – The multi body system of the robot.

  • body_to_multi_body_system_mapping – A mapping from body to multi-body system

Returns:

The next children to be built.

class CameraSensorBuilder(sensor: revolve2.modular_robot.body.sensors.CameraSensor, rigid_body: revolve2.simulation.scene.RigidBody, pose: revolve2.simulation.scene.Pose)

Bases: modular_robot_simulation._build_multi_body_systems._builders._builder.Builder

Inheritance diagram of modular_robot_simulation._build_multi_body_systems._builders.CameraSensorBuilder

A Builder for Cores.

build(multi_body_system: revolve2.simulation.scene.MultiBodySystem, body_to_multi_body_system_mapping: modular_robot_simulation._build_multi_body_systems._body_to_multi_body_system_mapping.BodyToMultiBodySystemMapping) list[modular_robot_simulation._build_multi_body_systems._unbuilt_child.UnbuiltChild]

Build a module onto the Robot.

Parameters:
  • multi_body_system – The multi body system of the robot.

  • body_to_multi_body_system_mapping – A mapping from body to multi-body system

Returns:

The next children to be built.

class CoreBuilder(module: revolve2.modular_robot.body.base.Core, rigid_body: revolve2.simulation.scene.RigidBody, slot_pose: revolve2.simulation.scene.Pose)

Bases: modular_robot_simulation._build_multi_body_systems._builders._builder.Builder

Inheritance diagram of modular_robot_simulation._build_multi_body_systems._builders.CoreBuilder

A Builder for Cores.

build(multi_body_system: revolve2.simulation.scene.MultiBodySystem, body_to_multi_body_system_mapping: modular_robot_simulation._build_multi_body_systems._body_to_multi_body_system_mapping.BodyToMultiBodySystemMapping) list[modular_robot_simulation._build_multi_body_systems._unbuilt_child.UnbuiltChild]

Build a module onto the Robot.

Parameters:
  • multi_body_system – The multi body system of the robot.

  • body_to_multi_body_system_mapping – A mapping from body to multi-body system

Returns:

The next children to be built.

class IMUSensorBuilder(sensor: revolve2.modular_robot.body.sensors.IMUSensor, rigid_body: revolve2.simulation.scene.RigidBody, pose: revolve2.simulation.scene.Pose, imu_location: pyrr.Vector3)

Bases: modular_robot_simulation._build_multi_body_systems._builders._builder.Builder

Inheritance diagram of modular_robot_simulation._build_multi_body_systems._builders.IMUSensorBuilder

A Builder for Cores.

build(multi_body_system: revolve2.simulation.scene.MultiBodySystem, body_to_multi_body_system_mapping: modular_robot_simulation._build_multi_body_systems._body_to_multi_body_system_mapping.BodyToMultiBodySystemMapping) list[modular_robot_simulation._build_multi_body_systems._unbuilt_child.UnbuiltChild]

Build a module onto the Robot.

Parameters:
  • multi_body_system – The multi body system of the robot.

  • body_to_multi_body_system_mapping – A mapping from body to multi-body system

Returns:

The next children to be built.