Skip to content

Commit

Permalink
Add free-flyer when loading in Pinocchio
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-caron committed Aug 16, 2024
1 parent a7550e2 commit 655ae4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

defaults:
run:
# See https://github.com/mamba-org/provision-with-micromamba#important
# See https://github.com/mamba-org/setup-micromamba#about-login-shells
shell: bash -l {0}

jobs:
Expand Down
3 changes: 1 addition & 2 deletions examples/display_collisions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
import argparse
import time

from pinocchio.visualize import MeshcatVisualizer

import upkie_description
from pinocchio.visualize import MeshcatVisualizer

if __name__ == "__main__":
parser = argparse.ArgumentParser(description=__doc__)
Expand Down
7 changes: 6 additions & 1 deletion examples/load_in_pinocchio.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import argparse

import pinocchio as pin
import upkie_description

if __name__ == "__main__":
Expand All @@ -22,6 +23,10 @@
if args.variant:
label = f"'{args.variant}' variant of the robot"
print(f"Loading {label} in Pinocchio...")
robot = upkie_description.load_in_pinocchio(variant=args.variant)
robot = upkie_description.load_in_pinocchio(
# NB: we add a free-flyer so that the torso mass is included
root_joint=pin.JointModelFreeFlyer(),
variant=args.variant,
)
print(f"{robot=}")
print("Run this example with ``python -i`` to interact with it")

0 comments on commit 655ae4d

Please sign in to comment.