-
Notifications
You must be signed in to change notification settings - Fork 384
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
How to apply ground collision? #771
Comments
I'm not so familiar with FCL. I think @jmirabel may help you for the first issue which is: how to get the collision point between a Mesh and a Plane with FCL. @jmirabel Can you provide some insights for this question? |
This comment was marked as abuse.
This comment was marked as abuse.
A collision pair is a pair of geometry indices in the geometry model. A collision checking algorithm will be run for each active specified pairs, upon collision queries. |
This comment was marked as abuse.
This comment was marked as abuse.
Class GeometryModel has several geometries. It can be one for each link of your robot and some more for the environment. A collision pair is a pair of geometries, however complex these geometries are. It is not a pair of points, as you seem to be thinking. It is something like the pair ( "link 4 of the robot", "ground" ), replacing geometry names by their indices. |
This comment was marked as abuse.
This comment was marked as abuse.
For 1., @nmansard did the writing. @nmansard can you provide some fix to it? |
This comment was marked as abuse.
This comment was marked as abuse.
The id of a joint is unique, and independent from the number of DOF a joint. |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry @littleggghost, but I do get the end of your previous remark. What do you mean by a free-flyer scene? |
This comment was marked as abuse.
This comment was marked as abuse.
It is hard for me to help you on this point remotely. Maybe, you may provide some source code example and explain inside which problem you are currently facing. |
This comment was marked as abuse.
This comment was marked as abuse.
@littleggghost Thanks for your example. I will be off these next few days. I will try to have a look at it as soon as possible in order to provide the help you need. |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
@littleggghost I think you may understand that the delay in our answers may vary according to our job load. And personally, I only have few times free to answer questions like yours which are a bit aside of the Pinocchio developments as you might guess. Concerning your issue, you need to check whenever the two objects collide and then add an
I hope this will answer your current issue. |
@littleggghost, other than what @jcarpent explained, I add a few comments on your code:
Notice that the element w of a quaternion is at the end, in Pinocchio's convention. So, this should rather be
but the best is to use Pinocchio's built-in function
which directly outputs a valid "zero" configuration, no matter your model
Similar to the point above. This is not the proper way of creating a random configuration for a Pinocchio model. If your model contains non-trivial configuration types (and I see your model contains quaternions) the corresponding configuration will not be normalized. So either you normalize it a posteriori, doing
or you use Pinocchio's built-in function, which will work for any type of configuration
Notice that in order to use the latter method you need to set joint limits (including for the position of the freeflyer).
For forward dynamics, you can directly use ABA:
This is a mistake.
which will work for any type of configuration |
This comment was marked as abuse.
This comment was marked as abuse.
Hi @littleggghost, |
This comment was marked as abuse.
This comment was marked as abuse.
You can use the GeometryModel and GeometryData associated to your URDF model in order to compute collision with
The contact Jacobian corresponds to the Jacobian of the contact points when you perform a collision detection to get the list of the current collision points.
What do you want to do exactly? If you need to do simulation, I would suggest relying on Gazebo, which is intended. |
This comment was marked as abuse.
This comment was marked as abuse.
Yes, you can do that by using the impulseDynamics and the contactDynamics to compute all those quantities indeed. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, it was forwardDynamics: https://gepettoweb.laas.fr/doc/stack-of-tasks/pinocchio/master/doxygen-html/namespacepinocchio.html#a8b7d42cb4e87d9de4ae108919fa3d2cc |
This comment was marked as abuse.
This comment was marked as abuse.
|
This comment was marked as abuse.
This comment was marked as abuse.
If there is not contact, then you must run aba which is the classic forwardDynamics. |
For such a simple problem as a ball bouncing on the ground, I don't think it is needed. |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
@littleggghost, I am sorry, I can't. This completely falls outside the scopes of Pinocchio API. Pinocchio provides the tools for performing dynamical computations, but in no way at all it contains any numerical solver or any full-scale simulation engine. I hope you understand making a good, stable LCP solver is no trivial task, which would cost me a non-negligible amount of time and work for something that is in no way part of the core library (plus, the library itself is not even my main work topic, I am just here to give a hand when it's needed). If you need to implement a full dynamic simulation, I suggest that you look for appropriate sources on the internet on how to implement it. Pinocchio will be very useful for performing appropriate related computations. Meanwhile, I strongly suggest that you start simple and implement the bouncing-ball example first. This way you will gain more knowledge and confidence in the tools provided by Pinocchio. You may certainly use a simplified criterion for that. Then, you may try to switch to a full-scale walk. Maybe a simple extension of the velocity criterion will be enough for your needs. This I cannot know. Meanwhile, I would ask myself whether starting to implement a full dynamic simulator yourself is really what you need and if it is not maybe better to employ an off-the-shelf solution such as Gazebo |
Dear @littleggghost, I am Nicolas Mansard, senior researcher in CNRS and one of the team leader behind the software you are apparently extensively using for your work. We are very happy that you find interest in our work. However, I believe that you are not interacting properly with the development team, and I would like you to adapt your behavior accordingly. First, you have to understand that we are answering questions of the external users independently of our own work. It is our choice to freely publish our work, because we believe science benefit from free access to knowledge. However, our work is not to solve your own objectives or to train you to the basic knowledge that you need to solve them. Using our software requires a set of state-of-the-art knowledge, that is available in various Master class, books and web tutorial. It is your duty to make the effort to train yourself before starting using our software and asking questions about subject you do not know. In this frame, questions like #771 are very not welcome. LCP is out of the scope of Pinocchio, it is an evidence, and the way you ask the question is evidently consuming the time of @gabrielebndn unduly (and other like @jcarpent, @jmirabel or me before that). You are neither welcome to unconveniently push for new features when they are not the natural results of the work of one of the members of our team. You can neither violently remind open issue, with a lack of elementary politeness (quoting you: "Hi, @jcarpent One month passed."). Here is what your are welcome to ask. You can propose new features in the software, and (under the condition that somebody in the team is interesting by the new feature) receive support to implement it following our standards. You may politely ask for information about the API when it lacks of documentation ; however, you are expected to acknowledge the support when it is helping you, and a nice contribution in return is to propose a fix in the documentation to add the corresponding information on the devel branch. You are also welcome to raise bug report when they are decently documented. I also think that, considering the extensive usage of our work you are doing, the team might be interested by you introducing yourself and presenting in which frame you are working. Among others, this would have allowed me to contact you privately and not through a public post. Please take this post very seriously. Not complying with the basic rules of human cooperation while lead to being ban of our chat platform and being cut from any resources at all. I might also be pushed to publicly raise the issue by an issue on the Pinocchio repo advising members of the team to ignore your help request and systematically close the issues you open. I sincerely hope that this recall will help you to find a reasonable way to collaborate together. We are happy to count you among the Pinocchio users and hope that your interest might result in relevant contributions. Best regards, Nicolas Mansard |
Hi, @jmirabel @jcarpent
Afaik, if I want to add a ground collision, then I should add a big box which represents the ground collision box.
But the question is, how many collisionPairs should be added? The ground box will be huge and I don't know where the collision will happen. The concept of collisionPairs is introduced in 4.1) Direct dynamics.
I think the collision point should be detected automatically based on intuition, not set by hands. Because if we introduce curve faces then the contact point can't be predicted.
You can also have a look at issue: #756.
Really hope your reply!
The text was updated successfully, but these errors were encountered: