Giter Site home page Giter Site logo

tinyik's People

Contributors

lanius avatar ricardodeazambuja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tinyik's Issues

proof of concept IK help for CAM application

Hi. I work on the CNC/CAM workbench in FreeCAD. I want to add basic 4th and 5th axis capability and I need a very simple inverse kinematics solver. I'd really like to have a longer conversation/chat with you about whether tinyik can meet our needs.
If you'd be willing to chat, please email me at shopinthewoods 'at' gmail.com, reply here, or find me on the FreeCAD/Path gitter page at https://gitter.im/FreeCAD/Path.

To give a little context of what I'm trying to achieve, check the XYZAC-TRT diagram on this page:
https://linuxcnc.org/docs/2.8/html/motion/5-axis-kinematics.html

Implementation of relative axis

Hi lanius,

The current version is implemented for absolute axis 'x', 'y', 'z'. Is it possible to provide option for relative axis, i.e. Flexion, Abduction, Twist? Thanks!

arm initial position and angles

Hi,

is it possible to set the initial angles and positions of the joints of the arm?

if so can you please tell how to do that?

Thanks

module 'tinyik' has no attribute 'visualize'

Hello. I'm trying to run the examples with visualization feature, as shown in Readme.md. But I'm having the following error message:
module 'tinyik' has no attribute 'visualize'

In fact, "visualize" function was not found at tinyik code.

P.S.: I've installed the package using the command "pip install tinyik[viz]" at cmd. During installation, I've received the following:
WARNING: tinyik 1.2.0 does not provide the extra 'viz'

How to get the visualization feature? I'm using Python 3.8.3 over Windows 10 64bits.

How to set rotation/pose of the end effector?

It looks like the ee() method will always return the position, but not the orientation of the end effector. How can I get the full pose (X/Y/Z/Yaw/Pitch/Roll) of the end effector on a 6DOF system?

problem for using multiple solver in same time

Hello
When three classes are built from this library at the same time, the calculations for the third class are not done correctly.

self.brush_arm= Actuator(['y', [0., 0., 0.01], 'x', [0., 0., 1.11], 'x', [0., 0., 1.225]])
self.left_leg = Actuator(['x', [0., 0., 1.175], 'x', [0., 0., 1.225],'x', [0., 0., .001] ])
self.right_leg = Actuator(['x', [0., 0., 1.175], 'x', [0., 0., 1.225],'x', [0., 0., .001] ])

joint angle limits

Good day!

I'm new to Python and especially on the Inverse Kinematics topic. If I may ask, is it possible to give angle limits to each joint since I'm using servo motors.

Thanks!

DH Params conversion?

How can I go about transforming my known DH Parameters into the coordinate system that's expected by this solver? In general, some more examples or documentation about the coordinate system used would be super helpful. Thanks!

Why bypass `ImportError` in `visualizer.py`

Really great work!

try:
import open3d as o3d # the extra feature
except ImportError:
pass

Why do this? Initially, I didn't install with pip install tinyik[viz] and was confused what o3d was when I got an error about not begin able to import it. Suggest removing this since you are bypassing the check and potentially leading to a confusing error for the user.

Links that run along the Z-axis aren't shown in the visualizer

Hello!

First off, this project is awesome! The fact that is it so simple and the code is easy to understand is great.

The problem I have is that when some links are drawn along the Z-axis, the cylinders aren't displayed in the visualizer.

Here's the configuration I'm working with:

tinyik.Actuator(['z', [0, 0, 180.7], 'y', [-612.7, 0, 0], 'y', [-571.55, 0, 0], 'y', [0, -174.15, 0], 'z', [0, 0, -119.85], 'y', [0, -116.55, 0]])

Here's a screenshot from the visualizer:
Screenshot (107)

(FYI, I'm using a radius of 10)

Do you know of a workaround for this problem?

Thanks!

trouble with basic results

I am following this simple example:

import tinyik
arm = tinyik.Actuator(['z', [1., 0., 0.], 'z', [1., 0., 0.]])
arm.ee = [2 / np.sqrt(2), 2 / np.sqrt(2), 0.]
arm.angles
array([ 7.85398147e-01, 3.23715739e-08])
np.round(np.rad2deg(arm.angles))
array([ 45., 0.])

In my case I am using 3 links which look like this:
image
Red is the root (say, shoulder joint), green is parented to it (i.e. elbow) and blue is parented to green (i.e. wrist).
The yellow dot is the end effector.
So in my code I do something like:

arm = tinyik.Actuator(['z',[red.x, red.y, 0], 'z',[green.x, green.y, 0], 'z',[blue.x, blue.y, 0]])
red.angle = np.rad2deg(arm.angles[0])
green.angle = np.rad2deg(arm.angles[1])
blue.angle = np.rad2deg(arm.angles[2])

When I apply the above example and move the end effector to x=1.5, y=1.5 I get this:
image
Looks promising but doesn't seem very close to what I expected (i.e. the blue joint reaching to be as close to the end effector as possible).
When I move the end effector even closer to the left, i.e. x=1.0, y=1.5 it gets worse:
image
I'm sure I'm doing something wrong but don't know what it is.
Can you help?

Thanks,
frank

wrong visualization

Thanks for this great tool.

However, when I try to visualize my chain, it does not work well. Would you please help me find the reason? My code is shown below:

import tinyik
import numpy as np

left_arm_idx = [15, 16, 17]
left_arm_bone1 = source_joints[ left_arm_idx[1],: ] - source_joints[ left_arm_idx[0],: ]
left_arm_bone2 = source_joints[ left_arm_idx[2],: ] - source_joints[ left_arm_idx[1],: ]

leftarm = tinyik.Actuator(['x','y','z', left_arm_bone1, 'x','y','z', left_arm_bone2])
tinyik.visualize(leftarm)

The values of the two bones are:

left_arm_bone1 = [-0.77607921, 2.00528251, -3.82166443]
left_arm_bone2 = [-4.19961586, -0.31558648, 0.79598167]

The visualization is not as expected. The direction of the bone is wrong.

Visualization of two bones

Visualization results in a blank screen

Using tinyik off of Git, commit e34d514

I am trying to implement a model of the robot arm used in one of my projects,

before I can evaluate how well the IK provided by this library works the first step is to ensure I can represent the arm in a form that this library can understand.

I modified the example in the readme with the dimensions of my arm, though the visualizer seems to draw a blank.

import tinyik

import numpy

raw_list = [
    # [0.0, 0.0, 0.0],
    # turret rotation is at IK root.
    # "z",
    # offset to pivot of upper arm joint
    [84.62, (31.62 + 47.76), 0.0],
    # which pivots on the Y axis
    "y",
    # offset ot pivot of lower "forearm" joint
    [265.96+267.44, 0, 0],
    #  which is Also a Y axis Joint
    "y",
    # leads to the EE pitch joint
    [0, -1 * (239.48+239.92), 0.0],
    "y"
]

arm = tinyik.Actuator(raw_list
)

# leg = tinyik.Actuator([[.3, .0, .0], 'z', [.3, .0, .0], 'x', [.0, -.5, .0], 'x', [.0, -.5, .0]])
# leg.angles = numpy.deg2rad([30, 45, -90])
# tinyik.visualize(leg)
print(arm.components)
tinyik.visualize(arm)

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.