Closed WenqiangX closed 2 years ago
Hello @WenqiangX, thanks for asking for the feature of the force sensor. May I clarify if you are looking for the force that the actuators/drivers apply on the joints or the collision/contact forces when multiple objects collide with each other?
If it is the second one, Unity provides the APIs (e.g. Collision.GetContacts
and Collision.impulse
) that allows calculating the contact forces directly if you want to.
Thanks for the reply @peifeng-unity, I meant for the former, as it is important for force control and dynamics related researches. Many robot research simulator like Pybullet, MuJoCo, and Omniverse have added such feature.
I gather currently the robot joints are driven by PD control (according to Section Joint drive effect in https://docs.unity3d.com/Manual/class-ArticulationBody.html).
To enable force-related control, I assume I can try to rewrite the control approach by AddForce/Torque API. But currently I cannot set drive target accelerations, so that I cannot implement impedance control. And I cannot get the joint force (though the API is there, but it returns 0 always), so that I cannot implement hybrid force control.
Since I see this force sensor feature has already in the roadmap, it is exciting, and thus I wonder when will this likely to be available.
Unity provides many features that other simulators cannot provide, and our projects have been heavily built upon it. Thus we really don't want to switch simulation environment at this moment.
Hi @WenqiangX, thanks for letting us know about your use case. Our physics team is actively working on releasing this feature, which is related to inverse dynamics. To my best knowledge, it is coming soon, probably in the next couple of weeks or so. We can keep you updated once it is publicly available.
Thanks, looking forward to it!
Hello @WenqiangX, the inverse dynamics is released! Please find the force sensor feature here. Please let us know if you have any feedbacks for it.
Thank for your hard working! That's great news! I think I can close the issue for now.
Hi,
I read the README.md of this repo, it says "Force/Torque Sensor API" is comming soon.
Could you maybe give a rough time about when will it be ready? I guess it means making the ArticulationBody.getJointForces() actually work?
Thanks!