_brain_cpg_network_static
Module Contents
Classes
A CPG (central pattern generator) brain with CPGs and connections defined by the user. |
- class BrainCpgNetworkStatic(initial_state: numpy.typing.NDArray[numpy.float_], weight_matrix: numpy.typing.NDArray[numpy.float_], output_mapping: list[tuple[int, modular_robot.body.base.ActiveHinge]])
Bases:
modular_robot.brain._brain.Brain
A CPG (central pattern generator) brain with CPGs and connections defined by the user.
A state vector is integrated over time using a weight matrix which multiplication with the state vector sum defines the derivative of the state vector. I.e X’ = WX
The first num_output_neurons in the state vector are the outputs for the controller created by this brain.
- classmethod uniform_from_params(params: numpy.typing.NDArray[numpy.float_], cpg_network_structure: modular_robot.brain.cpg._cpg_network_structure.CpgNetworkStructure, initial_state_uniform: float, output_mapping: list[tuple[int, modular_robot.body.base.ActiveHinge]]) BrainCpgNetworkStatic
Create and initialize an instance of this brain from the provided parameters, assuming uniform initial state.
- Parameters:
params – Parameters for the weight matrix to be created.
cpg_network_structure – The cpg network structure.
initial_state_uniform – Initial state to use for all neurons.
output_mapping – Marks neurons as controller outputs and map them to the correct active hinge.
- Returns:
The created brain.
- make_instance() modular_robot.brain._brain_instance.BrainInstance
Create an instance of this brain.
- Returns:
The created instance.