"Grasp and Motion Planning Python Package."
Project description
This package provides grasp and motion planning using CasADi and IPOPT.
Usage
from grasp_planning import GOMP
import numpy as np
import time
import os
# Mug's pose
T_W_Obj = np.array([[-0.71929728, -0.69467357, 0.0063291, -2.35231148],
[ 0.69430406, -0.71916348, -0.02730871, 1.78948217],
[ 0.0235223, -0.01524876, 0.99960701, 0.71829593],
[ 0., 0., 0., 1. ]], dtype=float)
# Obstacle's pose
T_W_Obst = np.eye(4)
T_W_Obst[:3,3] = np.array([1.86, 0.4, 0.15]).T
# Current robot's state
q_init = np.array([0.0, 0.0, 0.0, 0.0, 0.0, 1.57, 1.57, 1.57, 1.57], dtype=float)
absolute_path = os.path.dirname(os.path.abspath(__file__))
URDF_FILE = absolute_path + "/assets/dingo_kinova_gripper.urdf"
num_waypoints = 3 # needs to be more than 3 for now
theta = np.pi/2 #Degree of freedom around grasp pose
planner = GOMP(num_waypoints, URDF_FILE, theta, 'world', 'arm_tool_frame')
planner.set_init_guess(q_init)
planner.set_boundary_conditions(q_start=q_init)
planner.add_grasp_constraint(waypoint_ID=2, tolerance=0.01)
for i in range(num_waypoints):
planner.add_collision_constraint(waypoint_ID=i,
child_link="chassis_link",
r_link=0.5,
r_obst=0.2,
tolerance=0.01)
planner.setup_problem(verbose=False)
start = time.time()
planner.update_constraints_params(T_W_Obj, T_W_Obst)
x, solver_flag = planner.solve()
end = time.time()
print(f"Computational time: {end-start}" )
print(f"Solver status: {solver_flag}" )
ToDo
- removing constraints
- automatic constraints for collisions
- zacni riesit to ze nejde mi parametre
- trebalo poriesit ze kazde zavolanie add collision vytvori premennu pre obstacle
- idealne poriesit aby sa zadaval aj parent link pre koliziu
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
grasp_planning-0.5.3.tar.gz
(7.2 kB
view details)
Built Distribution
File details
Details for the file grasp_planning-0.5.3.tar.gz
.
File metadata
- Download URL: grasp_planning-0.5.3.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.8.10 Linux/5.15.0-105-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87041526d63232d4e0182d6d4055e2c159adcc120b20801f54668e1bd18dfa5f |
|
MD5 | 473054b99a7fc62eabd51eb37429dc1e |
|
BLAKE2b-256 | c0b64ddd86e83522a6e5d43d313843f0b70eeba1bfd483b7d4626582aa26cb73 |
Provenance
File details
Details for the file grasp_planning-0.5.3-py3-none-any.whl
.
File metadata
- Download URL: grasp_planning-0.5.3-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.8.10 Linux/5.15.0-105-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6e154c016e8128b7cb06ee5c1d0266cebf7879876226fb0a97f00b876993c2d |
|
MD5 | e00f2f71fe33c9899a42bd03d00a805b |
|
BLAKE2b-256 | 05f451ed3d5463f2b65999cf489aa899fe6e86032af93c68cb1b2e50032cc638 |