Skip to main content

No project description provided

Project description

🤖 Dexmate Robot Motion Planning API

Python

📦 Installation

pip install dexmotion

📚 Usage

🚀 API Usage Guide

Basic Setup

from dexmotion.motion_manager import MotionManager

# Initialize MotionManager
mm = MotionManager()

# Initialize with specific robot type
mm = MotionManager(robot_type = "vega_1")

# Initialize with locked joint regions
mm = MotionManager(robot_type = "vega_1", joint_regions_to_lock=["BASE", "HEAD", "LEFT_HAND", "RIGHT_HAND"])

# Set robot joints (locked or unlocked) before using active joints
initial_config = {
        "L_arm_j1": 0.064,
        "L_arm_j7": 0.03,
        "R_arm_j1": -0.064,
        "torso_j1": 0.42,
        "torso_j2": 0.14,
        "torso_j3": -0.6,
        "head_j1": 0.4,
    }
mm = MotionManager(
        robot_type="vega_1",
        initial_joint_configuration_dict=initial_config,
    )

# Setting custom target frames for dexmotion
mm.target_frames = ["L_ee", "R_arm_j7", "head_l1"]

Available Robot Types

Dexmotion supports multiple Vega robot variants with different configurations:

No End Effector:

  • vega_1 - Full body robot (arms, torso, base, head)
  • vega_1u - Upper body only (arms, head, no torso/base)
  • vega_1p - Full body robot variant (arms, torso, base, head)

Gripper End Effector:

  • vega_1_gripper - Full body with gripper hands
  • vega_1u_gripper - Upper body with gripper hands
  • vega_1p_gripper - Full body variant with gripper hands

F5D6 Hand End Effector:

  • vega_1_f5d6 - Full body with F5D6 dexterous hands
  • vega_1u_f5d6 - Upper body with F5D6 dexterous hands
  • vega_1p_f5d6 - Full body variant with F5D6 dexterous hands
# Example: Initialize with F5D6 hands
mm = MotionManager(robot_type="vega_1_f5d6")

# Example: Initialize upper body variant with grippers
mm = MotionManager(robot_type="vega_1u_gripper")

Joint Control

# Get current joint positions
joint_pos_dict = mm.get_joint_pos_dict()

# Set joint positions
new_positions = {"L_arm_j1": 0.5, "R_arm_j1": -0.5}
mm.set_joint_pos(new_positions)

# Set joint poses at component level
mm.right_arm.set_joint_pos([-2.5, -0.3, 0.0, 0.0, 0.0, 0.0, 0.0])
mm.torso.set_joint_pos([0.42, 0.14, -0.6])
mm.head.set_joint_pos([0.4, 0.0, 0.0])

# Read full body pose
joint_pos_dict = mm.get_joint_pos_dict()

# Read component pose
updated_head_pos = mm.head.get_joint_pos()

Forward Kinematics

# Get end-effector poses
poses = mm.fk(["L_ee", "R_ee"])

# Get poses for specific configuration
poses = mm.fk(["L_ee", "R_ee"], qpos=solution)

End effector control

# Move chosen frame to absolute or realtive pose
mm.right_arm.set_ee_pose(
    right_target_pos, right_target_rot, target_frame="R_arm_j4", relative=True
)

# Move chosen EE about cartesian space
mm.left_arm.move_ee_xyz(np.array([0.0, 0.0, 0.5]))
mm.right_arm.move_ee_rpy(np.array([np.pi / 4, 0.0, 0.0]))

Inverse Kinematics

# Relative movement IK
solution, collision_status, limits_status = mm.ik(
    target_pos={"L_ee": [0.05, 0.0, 0.02]},
    relative=True,
    type="pink"
)

Inverse Kinematics with External Obstacle Avoidance

# IK with obstacle avoidance using pink_ext
from dexmotion.configs.ik import LocalPinkExtIKConfig

# Configure external obstacles
obstacle_config = LocalPinkExtIKConfig(
    external_obstacles=[
        {
            "urdf_path": "/path/to/obstacle.urdf",
            "position": [0.5, 0.0, 0.5],
            "orientation": [1.0, 0.0, 0.0, 0.0],
        }
    ]
)

# Initialize with pink_ext solver
mm = MotionManager(
    local_ik_solver_type="pink_ext",
    custom_local_ik_config=obstacle_config
)

# Solve IK avoiding obstacles
solution, collision_status, limits_status = mm.ik(
    target_pos={"L_ee": [0.05, 0.0, 0.02]},
    relative=True,
    type="pink_ext"
)

Global IK

# Absolute positioning with quaternions
target_configuration_dict, is_in_collision, is_joints_within_limits = mm.global_ik(
    target_pos={"L_ee": [0.4, 0.2, 1.0]},
    target_rot={"L_ee": [1.0, 0.0, 0.0, 0.0]},  # Quaternion [w,x,y,z], RPY [r,p,y]
    type="hybrid"  # "pink", "casadi", or "hybrid"
)

Motion Planning

# Plan to configuration
waypoints = mm.plan(
    goal_config=goal_config,
    planner_type="ompl"  # "ompl" or "interpolation"
)

# Plan to poses
waypoints = mm.plan(
    goal_pos={"L_ee": [0.1, 0.0, 0.1]},
    target_rot={"L_ee": [3.14, 0.0, 0.0]},
    planner_type="interpolation"
)

### Trajectory Smoothing
smooth_trajectory = mm.smooth_trajectory(
    waypoints=waypoints_qpos,
    method="gaussian",  # "gaussian", "toppra", "ruckig"
    control_frequency=100.0
)

# Extract smoothed data
positions = smooth_trajectory["positions"]
velocities = smooth_trajectory.get("velocities")

Visualization

# Visualize motion plan
mm.visualize_motion_plan(waypoints, duration=3.0)

🤝 Ready to build amazing robots?

📧 Contact Us

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dexmotion-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

dexmotion-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

dexmotion-0.4.1-cp313-cp313-macosx_11_0_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

dexmotion-0.4.1-cp313-cp313-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

dexmotion-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

dexmotion-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

dexmotion-0.4.1-cp312-cp312-macosx_11_0_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

dexmotion-0.4.1-cp312-cp312-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

dexmotion-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

dexmotion-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

dexmotion-0.4.1-cp311-cp311-macosx_11_0_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

dexmotion-0.4.1-cp311-cp311-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dexmotion-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

dexmotion-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

dexmotion-0.4.1-cp310-cp310-macosx_11_0_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

dexmotion-0.4.1-cp310-cp310-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file dexmotion-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4384611a1b1f90f9f9b83aa9702a1c60ca58cad800491352b9c8c170104bfc0b
MD5 78cc60226dfcf55eac5421bf81ce9cab
BLAKE2b-256 aa7e7c4de4fddbd316e1219cdee8276a46df3f34bb326c9b732ab7e607e24332

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a0a45c60d12dc990802fa7459fb0704b10ad186fbcedf5eea2e4f50cfa105358
MD5 6b50e915e6249f6287279acab2081c2c
BLAKE2b-256 b2d4f631c2e014d715ae9036456c3c2ca146db2d83c524a6789882faee4271bd

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 02cbfbb9a94b0dffe13cbcaea0f810bd6294401a877bf5f684a291167d467301
MD5 ab75d5d3a5879491a294aa2fac1e6c26
BLAKE2b-256 073916e993de7ba871be3ec75cfc9bacadaf955f3e9d6a15004ff2ac3f67a2ee

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5ce779be961f9edbcbe7029695a18480e264f5c303117a1f74c6028e54199573
MD5 cfcc8cf72ddd34d2134938328a0ede8d
BLAKE2b-256 02d92e1d55dd38749983c540350570d39051456c489bae24a88bd21c513da679

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 199c153f6eb5ab7d4c8cb0be9ddd37b95fccfaf4510c9f825938bd8f0c0f0188
MD5 f34d8342206965cb0a8173d2a950f048
BLAKE2b-256 1d77228a097c99346d40555b49c3c43f1ec2d16d91e2f09c013c251dc526e974

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 06968f901feeaecd347d1990994606d42b886292ea727553a658f3a7a22539e2
MD5 9a20717d889fc43754ccde08cdded027
BLAKE2b-256 68556694929d8cbe9bcfb34baac887fbaaed0dbda391374f8aa0296c31787239

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 43bbc3e5b7666f92fa18e1a6bd1201e40c7dcbee6e9196aad1688a3e2bd2cba7
MD5 a264000b3da45d3c8efe9cbdf107309f
BLAKE2b-256 c2e005da6317015cd9b689d697cc87b9c1573ae2516f0bae085254132fb29743

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 427112c2e7c2722ebd39b179ba996834fb015456652aaff3c87b18feeda21d4c
MD5 04267b7bf76a7b99d8678d28981a432d
BLAKE2b-256 5b5ef8dba10ae79a735fe658e760848f07410c705cf7e94ddfb64135a1b72a10

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 afd5b7d00fbe889a1b4981bc7cc0c719f11f00bf71bbf3dfeadbccf59d182eff
MD5 d2f0e3eb0a4307e3f9e359733a625a5b
BLAKE2b-256 2ff0dbda678145e463151b0c6aec46d80dffaa4d3cc9255fca3ba9e7fbfad23c

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1dd2a755987c61829d99a5ba2e432881be9af798ab9f14e528a564ada80b43a6
MD5 e72fb2bf5672153d33e6af5ff1426c4f
BLAKE2b-256 f0dd556967b314c093e286eb746e71609a85111f3893bcb0b8226b8f0c4a3927

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 494a05157f794d161bdd6c5c52ce3af31a6282049fd2f1464d1557365469d5de
MD5 489cc66b405fc8516e526d7afb9473cd
BLAKE2b-256 1a059020844ff49a77c2ff86053124c968c02f63e5c6b8c639f97b1ede03d40f

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dc0f38e54fe95a86ebfd50fbe46b11b52d87a1a7f3e9ca198e8de4c3fb107c80
MD5 c38c58d52d18a575092daa8fdf7d1224
BLAKE2b-256 95e87ab38f67e0341b66cc60881b3175a8149bf9849deab3ee56a4596520298f

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8ba5d53ecb077b34cf69830b6ba7ab0bca904e322e188a1746a616f2b55b6b33
MD5 c970049326c7076aee332b0ac4d51f55
BLAKE2b-256 fd57db4e79e334ed82e4f8358484121caa33c61fcabe2ea83e51ca3bcee170b4

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 805d7ec7ff1e03e007e1783fae676bbc86b202d56f2546166762902e84b8e790
MD5 299abb8f39f0e3e8ea10fe4313cc0e80
BLAKE2b-256 a27d17df88f8098e6b852bd4e0a1633eec0ef8dc0b880ac60189c846122faf17

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c64a74fd87f309696221525e57bdf578a0805e0c3341e6e4aaba301174e03209
MD5 6a77878c18f3cb616d33be11b0c73d97
BLAKE2b-256 ac6e978012464b77ecc30285720c8c79a5ca97c0799cdda23b9c380f74cca150

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dexmotion-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76457f99375f1037cba82c8be5f6aec8fa5e53b04472ede45b16b20bb02f7e8f
MD5 a39953ef37bae7d0fed16f8dd8f00d5a
BLAKE2b-256 7e2cfd38695c5ff1ce07132c35cf9aa41d18182233c5ae7ae77751fc6d33eb23

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page