Skip to content

Commit 53f070a

Browse files
committed
Add actuated_joints attribute to Model class
1 parent 563b0f5 commit 53f070a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/adam/model/model.py

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Model:
1717
joints: List[Joint]
1818
tree: Tree
1919
NDoF: int
20+
actuated_joints: List[str]
2021

2122
def __post_init__(self):
2223
"""set the "length of the model as the number of links"""
@@ -41,6 +42,9 @@ def build(factory: ModelFactory, joints_name_list: List[str] = None) -> "Model":
4142
# if the joints_name_list is None, set it to the list of all the joints that are not fixed
4243
if joints_name_list is None:
4344
joints_name_list = [joint.name for joint in joints if joint.type != "fixed"]
45+
print(
46+
f"joints_name_list is None. Setting it to the list of all the joints that are not fixed: {joints_name_list}"
47+
)
4448

4549
# check if the joints in the list are in the model
4650
for joint_str in joints_name_list:
@@ -69,6 +73,7 @@ def build(factory: ModelFactory, joints_name_list: List[str] = None) -> "Model":
6973
joints=joints,
7074
tree=tree,
7175
NDoF=len(joints_name_list),
76+
actuated_joints=joints_name_list,
7277
)
7378

7479
def get_joints_chain(self, root: str, target: str) -> List[Joint]:

0 commit comments

Comments
 (0)