Skip to content

Commit

Permalink
Merge pull request #168 from open-dynamic-robot-initiative/fkloss/pin…
Browse files Browse the repository at this point in the history
…occhio_utils

Use Kinematics class from robot_properties_fingers
  • Loading branch information
luator authored Sep 21, 2023
2 parents 6fd39bf + dca614a commit 3ab3a24
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions demos/demo_trifingerpro_kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
For the computation the `Kinematics` class from the trifinger_simulation
package is used, so this package needs to be installed.
For complete documentation of the `Kinematics` class see
https://open-dynamic-robot-initiative.github.io/trifinger_simulation/api/pinocchio_utils.html
https://open-dynamic-robot-initiative.github.io/robot_properties_fingers/robot_properties_fingers.html#robot_properties_fingers.Kinematics
"""
import argparse
import copy
Expand All @@ -16,18 +16,18 @@
import numpy as np
from ament_index_python.packages import get_package_share_directory

import trifinger_simulation.finger_types_data
import trifinger_simulation.pinocchio_utils
import robot_interfaces
import robot_fingers
import robot_interfaces
import robot_properties_fingers
import trifinger_simulation.finger_types_data


def init_kinematics():
"""Initialise the kinematics calculator for TriFingerPro."""
robot_properties_path = get_package_share_directory("robot_properties_fingers")
urdf_file = trifinger_simulation.finger_types_data.get_finger_urdf("trifingerpro")
finger_urdf_path = os.path.join(robot_properties_path, "urdf", urdf_file)
kinematics = trifinger_simulation.pinocchio_utils.Kinematics(
kinematics = robot_properties_fingers.Kinematics(
finger_urdf_path,
["finger_tip_link_0", "finger_tip_link_120", "finger_tip_link_240"],
)
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module = [

# our packages
"robot_interfaces",
"robot_properties_fingers",
"trifinger_cameras.*",
"trifinger_simulation.*",
"trifinger_object_tracking.*",
Expand Down
3 changes: 2 additions & 1 deletion scripts/claw_crane.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import trifinger_simulation

import robot_fingers
import robot_properties_fingers
from robot_fingers.curses import SimpleCursesGUI


Expand All @@ -22,7 +23,7 @@ def loop(win, args):
robot_properties_path = get_package_share_directory("robot_properties_fingers")
urdf_file = trifinger_simulation.finger_types_data.get_finger_urdf("trifingerpro")
finger_urdf_path = os.path.join(robot_properties_path, "urdf", urdf_file)
kinematics = trifinger_simulation.pinocchio_utils.Kinematics(
kinematics = robot_properties_fingers.Kinematics(
finger_urdf_path,
["finger_tip_link_0", "finger_tip_link_120", "finger_tip_link_240"],
)
Expand Down

0 comments on commit 3ab3a24

Please sign in to comment.