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.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.6 MB view details)

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

dexmotion-0.4.2-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.2-cp313-cp313-macosx_11_0_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

dexmotion-0.4.2-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.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.4 MB view details)

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

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

Uploaded CPython 3.12macOS 11.0+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

dexmotion-0.4.2-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.2-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.2-cp311-cp311-macosx_11_0_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

dexmotion-0.4.2-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.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.3 MB view details)

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

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

Uploaded CPython 3.10macOS 11.0+ x86-64

dexmotion-0.4.2-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.2-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.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 19f686a33b5e26f58976d7d83a7d2b8d86f98f7fbd15f7d2978baddbb20d3da1
MD5 fb0e9c43d4b9c2063d4d72eea5307031
BLAKE2b-256 1c961af3f475c93e0cb8ccb5c3ceb23bd93993da2c8a0818a263a308caa2fa65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a11c32d6747034ad9ec3b99a3ec339c6a827defc386f1f448969980390fdc48d
MD5 6f8a311adf7fe17961b6d82f2a113277
BLAKE2b-256 142800cc3d1d4b8dafcb313b5e2943604a8d8bd65856900e812153a4589a4210

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 95cbd5e04a762ac365b11e02893aa09433696cac2f3a3786fd813141898935a9
MD5 a0eb8356851f6e5e7a5393a58ebe3af2
BLAKE2b-256 0a96067222f7359ca8ff2a6d1d42d32236a2447019035723516c90fa58c9a27a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e340df9482ecf3c05e671989540e806701f9690e82c38ea4aac5d8f537e5156
MD5 b470c20aa437d2a90d4973b88e6fe0f3
BLAKE2b-256 e1bf2fef87477cc03535008206b8c5069fc167d38138f5dcc618a3136b50bcbe

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.2-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.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd6bae9061820d624b97153664377e5d8e95ced2578325205a151d0d2b1d221d
MD5 8f8b98608631c7b1ea120b6221e55157
BLAKE2b-256 7cab2bfc298c578890f3a2cba78ac38dcda4a36674a874abb789fb98bd1fdfbb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b7a4ad149420942898ccabf2eb7f7758a1fd3a81ea6ed276695aabaa6b9d4623
MD5 338a41c9027fc7af3d8d19671bb7b8e1
BLAKE2b-256 c65fa27efa2fde47f8df3737b779d4018aa07e620b2fba296c304493726ebb0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 99d33c6bc2f13a7211ebe80cb08b644edeb2a81dd5b499a0a824b9fab6a4c111
MD5 606037975d268e2c27a7052bb111aeb1
BLAKE2b-256 0accbf64c2c957f290a65cf344d2bb90d78f5cbae69039f98acae8a769847b00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 de29003eef6fb2a07191a54eecb3f3afb3048bec60126d7d4f7b218e2adb3869
MD5 e6c8bed57c29be7f5b951a099472eb06
BLAKE2b-256 02edce6c52b22454a724a85a7bad37517c26a1cd3ac19e9c0938566be296843a

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.2-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.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 acc272c053529d5ad6aa0d7992d2601feb606c07089bff26fb6cddd8e88d60a7
MD5 4616301e608095132a3f91d25af0633f
BLAKE2b-256 4f8e2af9903ec79ee5792c4e801026ec90b88c41a4e039479c1e8834e69605e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d13d7ce267b74dd3de304512791b082d380f0b3524196f9db405f60c68c04bc8
MD5 6a577427269ef579308261f1ed290389
BLAKE2b-256 09c22caf2dbf89cf45cef2001730662867e84d6d3b39aed4ee6976aae6bd4d6d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 7dff918f7c44bd4f2dff903f53f2f50a240614847736749cb3579f5382115110
MD5 8b6aa1aa7d6a8ed657330bd0329254c5
BLAKE2b-256 5ba6a62b454e9d433056b4c7a05acd57b4e5f42b1d42354cfed42f9240644b9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6cac5205258fc1ae22e542f8bc0f7da33aab8c4a0b1411f93dfbdbdd67f0c8b8
MD5 d87124a8f52e5bea0640b1a49b0a939f
BLAKE2b-256 1edade677bce623ac79a1e824fa4f2b1460d27fbadec1191a554751b615264d6

See more details on using hashes here.

File details

Details for the file dexmotion-0.4.2-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.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18bd0fa411f8960a1bd1eb554e0ec773d3d9722180d82122cc31ada4dd2634d9
MD5 662aaaf32b3150bc69db0146f11067d9
BLAKE2b-256 73f47ad88281af01c34a6b8ca43658d03a1866f81c8207959866f83d0081d535

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 514afa48b93cc12b4f366c9fc7a0af6f99734d87df605d695fee2808ca287cb7
MD5 b50a8df1f7e5184dd2776f583aabb324
BLAKE2b-256 e73eccc51201cec89e52f80b3220b9ebc651d4b5de0e53cdf8c1149f13689275

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f71a5a9f48ac9a3a0262f8dff890efed6c92a82d5de4ec71d07da17f3d0c11f9
MD5 c2201ed8ff93986f91d47b295b80122a
BLAKE2b-256 2d98570a51bb16b16beb6d7394ce9dde10071f8e2295ff3e1dc5788b78ea2b3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dexmotion-0.4.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6b822a876f9ceb786c62f1749db5119022e14d3f8027e9f661f76b7bff20903d
MD5 f2b44cf4c561c880099f6eac24e57d83
BLAKE2b-256 19e2b65f3a9d71eb005c5fc78c30a3aabf75d371d20f20eaafe709405bbf18ef

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