Model package#
The model package builds the graph of the robot model and stores the information about the robot’s kinematics and dynamics.
- class adam.model.model.Model(name: str, links: dict[str, Link], frames: dict[str, Link], joints: dict[str, Joint], tree: Tree, NDoF: int, actuated_joints: list[str])[source]#
Bases:
object
Model class. It describes the robot using links and frames and their connectivity
- static build(factory: ModelFactory, joints_name_list: list[str] = None) Model [source]#
generates the model starting from the list of joints and the links-joints factory
- Parameters:
factory (ModelFactory) – the factory that generates the links and the joints, starting from a description (eg. urdf)
joints_name_list (list[str]) – the list of the actuated joints
- Returns:
the model describing the robot
- Return type:
- get_joints_chain(root: str, target: str) list[Joint] [source]#
generate the joints chains from a link to a link
- Parameters:
root (str) – the starting link
target (str) – the target link
- Returns:
the list of the joints
- Return type:
list[Joint]
adam.model.tree module#
- class adam.model.tree.Node(name: str, link: Link, arcs: list[Joint], children: list[Node], parent: Link | None = None, parent_arc: Joint | None = None)[source]#
Bases:
object
The node class
- class adam.model.tree.Tree(graph: dict[str, Node], root: str)[source]#
Bases:
Iterable
The directed tree class
- static build_tree(links: list[Link], joints: list[Joint]) Tree [source]#
builds the tree from the connectivity of the elements
- get_ordered_nodes_list(start: str) list[str] [source]#
get the ordered list of the nodes, given the connectivity
- Parameters:
start (str) – the start node
- Returns:
the ordered list
- Return type:
list[str]
- classmethod get_children(node: Node, list: list)[source]#
Recursive method that finds children of child of child :param node: the analized node :type node: Node :param list: the list of the children that needs to be filled :type list: list
- get_idx_from_name(name: str) int [source]#
- Parameters:
name (str) – node name
- Returns:
the index of the node in the ordered list
- Return type:
int