Skip to content

Commit

Permalink
Define DoFs of base link
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Mar 13, 2024
1 parent 22aa114 commit 9568eb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/jaxsim/math/joint_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,16 @@ def build(description: ModelDescription) -> JointModel:
)
)

# Define the DoFs of the base link.
base_dofs = 0 if description.fixed_base else 6

# We always add a dummy fixed joint between world and base.
# TODO: Port floating-base support also at this level, not only in RBDAs.
return JointModel(
λ_H_pre=λ_H_pre,
suc_H_i=suc_H_i,
# Static attributes
joint_dofs=tuple([0] + [int(1) for _ in ordered_joints]),
joint_dofs=tuple([base_dofs] + [int(1) for _ in ordered_joints]),
joint_names=tuple(["world_to_base"] + [j.name for j in ordered_joints]),
joint_types=tuple([JointType.F] + [j.jtype for j in ordered_joints]),
)
Expand Down

0 comments on commit 9568eb7

Please sign in to comment.