roboglia.utils.get_registered_class

get_registered_class(class_name)[source]

Retrieves a class object from the class factory by name.

Parameters

class_name (str) – the name of the class to be retrieved.

Returns

the class requested

Return type

class type

Raises

KeyError – if the class name is not in the class factory dictionary.

Example

The way the get_regstered_class is to be used is by first retrieving the needed class object and then instantiating it according to the rules for that class:

bus_class = get_registered_class('DynamixelBus')
bus = bus_class(init_dict)