-
Notifications
You must be signed in to change notification settings - Fork 48
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
fabrik chain implementation #4
Comments
hi -- devel branch is pretty active right now with major revisions, but vsr_chain is fairly stable. actually your question led me to find a small bug in the calcJoints() method, I also added an examples/xFabrikChain.cpp for reference on how to use the fabrik() solver. let me know if/how it works for you! |
Thanks! I'll give it a try. I had to hack things a bit to get stuff to compile. I wanted to see some of the stuff in scratch because it looks like there are some good examples of IK in there. I manually set some of the paths and compiled GLV, but it seems to be a bit of a mess. :-) |
I made a gist with a cmake patch and errors for the versor scratch folder |
I'm also interested in using the new model constraints published for FABRIK with vsr_chain. Any chance those are present or could be added relatively easily?
In my case I just have 7dof revolute joints and need to set joint limits. There is also an interesting thread related to constraints, and another on math.stackexchange |
fyi right now what i use to compile projects in scratch is ./run.sh scratch/projects/…../xProjectName.cpp and optionally add “configure” to the end to force cmake to add it to the targets list if it is a new project ./run.sh scratch/projects/…../xProjectName.cpp configure note that not all projects in scratch currently compile
|
thanks for these newer references, i had not seen them but will look over them . . . happy to help get something going, if you find a particular algorithm you want to implement.
|
The two constraints I care about are very simple: Revolute joints and joint limits. Essentially, each joint on the arm I use is a 7 rotating joint arm, and it only has a range of +/- theta from the center which varies for each joint. I think the revolute joints are already implemented for devel, do you think the joint limits could be added easily? |
Traveling a bit at the moment (to the AGACSE conference!) and have not had a chance to look at the extended technique, Constraining the angles would then be a matter of clamping the thetas of each to a lower and higher bound, I suppose. Currently the ik fabrik solver in vsr_chain just constrains to spherical distances (so, ball joints), but the Constraint class in vsr_rigid.h shows some I haven’t tested below, but i think the forward rotation constraint would look something like this: 1 - get location of point closest to chain[i].cxy(); Circle circle = chain[i].cxy(); /// circle of rotation Point pa = chain[i].pos(); /// Note: I would encapsulate the following into a method which takes a circle and a point p, and returns a point on the circle closest to p. auto cen = round::location( tangent::at( circle, p ) ); /// point on same plane as circle then it is a matter of taking the result and limiting the rotation of the joint. I can try this out if I get a moment….
|
ok there were a few bugs in that of course, but i pushed a working Constrain::PointToCircle( const Point& p, const Circle& c ); to vsr_rigid.h which calculates the point on circle c closest to p. examples/xPointToCircle.cpp shows this particular constraint in action. it is a little easier than i suggested, we can project the point to the plane of c, this constrains a point to a circle . . . limiting its angle is then the next step pc
|
awesome! Also, enjoy the conference it sounds super interesting. |
Any chance you could explain joint angle limits? I'm eager to try this out. |
I'll try to take a look at this this week - ;)
|
cool thanks! |
I’ve managed to make a constrainedFabrik() method in vsr_chain see examples/xConstrainedFabrik.cpp this was quite a difficult challenge, and it took me a little while, but now I have note that I have not restricted the angles, just the rotation plane. restricting the angles
|
Wow, fantastic! Thank you! I've just started grad school classes up again so time is a bit dear at the moment, but I have this in my project issue tracker and as soon as I have the chance I will try it, even if the angles aren't yet restricted. When you say it is restricted to the x-y plane, do you mean a local x-y plane for each joint, or a single global x-y plane? |
I took a look at the code and ran the demo example, it is very impressive! By manually mousing around I can't get it to exceed ~20% cpu even if I try to maximize how often I hit singularities. You mentioned some of this might be a section in your PhD, have you perhaps written anything up about it I could read? Also, do you know any great resources for someone just starting to learn cga? More advanced references are useful too, I just might not get much out of them yet. I'm more familiar with linear algebra techniques for this sort of thing and I have very basic familiarity with quaternions and dual quaternions. Actually, I just started reading the relevant wikipedia page and it seems versor is just another name for a unit quaternion? Ah, but it seems there are a couple of underlying concepts that can be used to generalize many other concepts. Well, to avoid writing a running commentary of everything I read I'll just say this looks very interesting and I hope to learn some more. I've also been thinking through what I need to be able to make use of this constrained fabrik implementation myself. I'll just enumerate a few things below. Don't worry, I understand if implementation is up to me. However, I would appreciate any thoughts, suggestions, or plans/designs that have occurred to you. Minimal useful implementation:
More complete implementation:
I don't know if I'll be able to fully pursue this, but at least writing some thoughts out out felt like an interesting exercise. Hope you don't mind me filling up your issue page. :-) |
Thanks for your comments, Andrew — since I am not a roboticist, knowing what What else is the issue tracker for if not for asking questions! Though I suppose It seems a minimal useful implementation is within reach with another week's work — unfortunately Once that is done, it would be fun to work together on satisfying a more complete implementation. Since it is still in progress, send me an email at wolftype@gmail and I will send you By far the best introduction for me was Leo Dorst’s textbook “Geometric Algebra for Computer Science” Dietmar Hildenbrand wrote up some nice descriptions of -P
|
I'm interested in using the fabrik chain implementation, and the version in devel looks easier to use. Should that work or is it still expected to change substantially?
The text was updated successfully, but these errors were encountered: