Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Kinematics class from robot_properties_fingers #168

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading