From: Joe H. <hay...@gm...> - 2008-06-10 11:31:02
|
Steve, Sounds great. I appreciate your help! I'll play around with the new damping support in the next couple days. I'm also not apposed to investigating how to add the new 'energetic' bodies but that may not come until later in the summer as I'm quite sure this is a more involved task. I'll be in touch. Joe On Mon, Jun 9, 2008 at 7:33 PM, Steve Berard <sb...@cs...> wrote: > Joe, > To follow up the first email, damping of the joints was not as easy to do > as I initially thought it would have been because of some technical issues. > I spent the time to add the damping terms to the bilateral constraints > directly, so this should hopefully be easy to use now. I just committed the > changes and you can see the pendulum examples Pat committed earlier for an > example of how to add damping to joints. It should be as simple as now > adding > <pref name='dampingCoef' type='double' value='10'/> > inside the joint description in the xml file. > > I like the sound of adding a new "energetic" body type. Feel free to do > this and we'll commit it to the code :) > > --Steve > > Joe Hays wrote: > >> Thanks Steve. I appreciate the support. >> >> *"Right now dvc has no notion of a spring or damper." * >> Not that I'm sufficiently familiar with the code nor have I looked into >> the feasibility of this, but, it seems if one were to add a new body type, >> say 'energetic', along with 'dynamical', 'kinematic', and 'obstacle' one >> could define elements such as a spring and/or damper such that their >> wretches on the system are implicitly handled by the solver... Since we're >> dreaming... it would be good if this was a plug-in interface such that new >> body types could be added to the system in such a manner that they were >> implicitly handled by the solver. I'm sure this falls into the long list of >> 'wouldn't it be nice if...". Anyway, you've told me what I needed to know >> and will hopefully play with it a bit to try it out. >> >> *"If no value is specified by the user, then the global value is used."* >> Seems like a reasonable solution. This gives the ability to specifically >> define the coeffs. for specific contacts of interest and the ease of >> assuming a global setting for the rest. >> >> Joe >> >> >> On Mon, Jun 9, 2008 at 12:56 PM, Steve Berard <sb...@cs...<mailto: >> sb...@cs...>> wrote: >> >> Hi Joe, >> You have raised some very good questions. I'll do my best to >> answer them. >> >> 1) Right now dvc has no notion of a spring or damper. If you wish >> to attach a spring-damper to a body, the only way is through the >> forceController class. What this means is that you the user will >> be forced to compute the spring-damper forces as a function of the >> body's state. This is actually how the mouse interaction works. >> We attach one end of a virtual spring-damper to the body and the >> other to the mouse pointer. This spring force is then added to >> the timestepper code through the applied force vector. >> >> >> 2) Pat is right, we currently do not support joint dissipation >> directly through the xml file (we should and if I have time I'll >> try to hack that in). I don't know of a way to add Coulomb >> friction to a joint if the joint is abstracted as a bilateral >> constraint. Viscous friction, however, is possible. The way you >> can do it is by attaching a forceController to the body with the >> joint, and computing the damping force. Here is what I would do >> for revolute joint damping. >> a) attach a forceController to the body with a revolute joint >> b) In the GetForce function of the ForceController >> i) get the angular velocity of the body attached to the >> revolute joint (vel[2]) >> ii) set outForce[2] = -C*vel[2] >> where C is your damping coefficient. >> Force is a bad name for this function, it really should be called >> getWrench since the 3 dimensional value you are returning is the >> force and moment. >> >> For dry friction in a joint, I think you would have to model the >> joint geometrically and drop the bilateral representation. If you >> know of a way to add dry friction into the bilateral joint >> representation I would love to hear it, because (to the best of my >> knowledge) this would be something that no one else is doing. >> >> 3) This is something that Pat and I have talked about in the past >> without an ideal solution. The best idea we currently have >> (un-implemented of course) is to keep the global value (like the >> current set up), but to allow the user to specify a specific value >> at a per-body-pair level. If no value is specified by the user, >> then the global value is used. If this would be sufficient for >> what you need let us know, because that shouldn't be very hard to >> do. If you can think of a better solution, also please let me know. >> >> I hope this answers all of your questions, feel free to email me >> back if anything is unclear or if you have more questions. I have >> also copied this message to the dvc-devel mailing list so a public >> copy is archived. >> >> Thanks, >> >> --Steve >> >> >> >> Joe Hays wrote: >> >> Steve, >> >> I've learned quite a bit in the last two weeks or so about >> DVC. With Pat's help I've successfully made a double pendulum, >> added a feedback controller to it and observed closed-loop >> behavior (even though my current controller design sucks... I >> know the loop is closed and that's what was important to me.) >> >> The following questions are outstanding in my mind. (Pat has >> indicated that you're the right person to elaborate on these >> topics. If you have any light you can shed on these topics I'd >> appreciate it.) >> >> *How to make the classic "mass-spring-damper" model?* >> From what I've seen so far DVC's unique strength is in solving >> the Coulomb Friction and Impact dynamics for a >> rigid-body-system. However, I've not seen how to create some >> of the classical models to be simulated (e.g. the >> "mass-spring-damper"). Is there a way I can define general >> elements such as a spring, with either linear or nonlinear >> constitutive law, as well as a damper (such as a viscous >> damper which is either linear or non-linear)? >> >> *How to add dissipation (i.e. viscous and/or Coulomb friction, >> preferably both) to joints?* >> Pat indicated I need to 'hack' this in as their is no direct >> facility for this. Can you give me some guidance on this? >> >> *Unique friction and restitution coefficients?* >> From what I've learned so far both the friction and collision >> restitution coefficients are global for the scene. Do you have >> plans, back door entry points, or hacks, to allow these to be >> defined for each body combination pair? (This is less >> important for now but will become important to me in the >> future...) >> >> I'm enjoying learning your system. Congratulations on the >> progress you've made thus far with DVC, and, thanks for the >> support. >> >> Joe >> >> >> >> >> |