Open Danfoa opened 3 years ago
Hi,
thank you very much for pointing out this issue!!!
Yes self-collision as an option at least is good to have. We honestly did not check this possibility before, once we know which bodys are interpenetrating I will try to get a revised version of the meshes.
Best
Hello @MaximilienNaveau,
I run a simple self contact detection script within a custom env with the robot base fixed above the ground. The self contacts are detected between the following links of Solo12:
Self-contact between [HL_UPPER_LEG, base] detected
Self-contact between [HR_UPPER_LEG, base] detected
Self-contact between [FL_UPPER_LEG, base] detected
Self-contact between [FR_UPPER_LEG, base] detected
If you want to reproduce this errors use:
def check_self_collision(pb, robot):
contact_points = pb.getContactPoints(bodyA=robot.robot_id, bodyB=robot.robot_id)
for contact_info in reversed(contact_points):
linkA_id = contact_info[3]
linkB_id = contact_info[4]
link_A_name = "base" if linkA_id == -1 else pb.getJointInfo(robot.robot_id, linkA_id)[12].decode("UTF-8")
link_B_name = "base" if linkB_id == -1 else pb.getJointInfo(robot.robot_id, linkB_id)[12].decode("UTF-8")
print("Self-contact between [{},{}] detected".format(link_A_name, link_B_name))
Hi @Danfoa ,
thank you very much for the feedback!!! I appreciate your effort finding the problem. I contacted our chief of mechanics to see if he can regenerate the STL files of those part. I still need to meet with him about the subject.
Thanks again for the debugging!
Don't hesitate to share the full script for the error reproduction.
I added @fgrimminger and @jviereck on the subject as they might be interested by this.
As a workaround, you could create a list of allowed self collisions and then filter the self collisions with it. That's what we setup in the srdf files: https://github.com/open-dynamic-robot-initiative/robot_properties_solo/blob/master/src/robot_properties_solo/resources/srdf/solo.srdf
Thibault reported a mistake in the stl files last year. In some postures there was a collision of the upper leg motor with the hip aa support. That problem was fixed.
Issue: Undue collision due to URDF meshes placement
Does that help? Are you using the outdated stl files?
Good day,
For a learning project, I am working with Solo8 and Solo12. During the learning process, I have found it very useful to enable self-collisions during simulation, as the impacts generated by self collisions and the resultant impact generalized forces are a strong cue to the control policy to avoid such states, simply by their energy expense. Therefore guiding the policy exploration towards safer and more energy-efficient dynamical states.
This is working properly for Solo8, however, I came to realize that the Solo12 URDF has constant links in collision and therefore self-collision cannot be enabled during simulation (because infinite forces are generated due to interpenetration).
I have not had the time to debug which links and specific points are in a constant self-collision, but I hope to do so soon and hopefully make a PR. In the meantime, I leave constancy of this issue (I believe is an issue)