Open tadashiK opened 1 year ago
Yeah this will be a great addition. Passive magnets or even electromagnets can add a lot of potential. @yuvaltassa do you think it's easy enough to implement?
Yes, this should be straightforward to implement. Unfortunately we are very busy with other things and it's hard to imagine that this will be top priority. If you are up for it we can discuss what would be the best API (I have an idea) and you could implement and send a PR?
Yes of course @yuvaltassa I'd love to contribute!
Okay, let's talk features and then once we're happy with them, we'll talk API.
In terms of features, here's what I think we might want, some of this should probably be excluded. Comments welcome. @saran-t, @quagla, @kbayes, your input in particular.
In terms of API all of these will likely be specified as point source at sites, but let's leave that until we agree on the feature set.
@brilliant-ember do you have the required physics background to follow the above?
Last time I saw a physics textbook was few years ago. I would need a big refresher.
Is there any resources you can recommend?
We might as well allow a vector of multipole moments (equiv. spherical harmonics coefficients) to be specified for each body. That's more principled.
Has there been any update on this?
Not really. It's not a very requested feature...
I'll make a deal with you. If you find me the equations for dipole-dipole interaction, I will make the feature 🙂
I'm more interested in having objects that emit a magnetic flux, for use with a magnetometer (to represent a Hall-Effect sensor)
First of all, thank you very much for all contributors to this MuJoCo project. This is an awesome repository.
Is your feature request related to a problem? Please describe.
I want to make a magnet to implement something like MagSafe 3 of Mac.
Implementing magnetic forces might be useful for other functions too. For example, adhesion currently attracts all objects within margin - gap with the same force strength. However, if one needs a realistic suction gripper, its force strength needs to depend on the distance between the gripper and an object, in a way similar to magnetic forces. (Closer, stronger.)
Describe the solution you'd like
It would be nice if we can add to an object a sclar attribute (like "magnetism"), which determines the magnitude of the force, and another attribute that determines the orientation of the magnetism (S and N). It would be also nice if setting the orientation to some special value allows to instantiate something like metal-like objects (no repulsion, no attraction of other objects, only attraction to magnets) and gravitation (no repulsion, only attraction). That said, for the purpose I descibed above (i.e., MagSafe 3), ferromagnetism and magnetic forces caused by electric currents are unnesesary.
Describe alternatives you've considered
Currently, I have no other idea on how to implement magnets. Setting contype and conaffinity with adhesion actuators allows an ad-hoc method to implement something like magnets. However, it sometimes leads to no contacts between some objects.
Additional context
I opened an issue about this topic, and Yuval asked me to open a feature request. See this issue for the additional context: https://github.com/deepmind/mujoco/issues/615#issuecomment-1332673517