Skip to content
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

Parent Link Collisions on Solo12 #46

Open
Danfoa opened this issue Sep 3, 2021 · 6 comments
Open

Parent Link Collisions on Solo12 #46

Danfoa opened this issue Sep 3, 2021 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@Danfoa
Copy link

Danfoa commented Sep 3, 2021

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)

@MaximilienNaveau
Copy link
Contributor

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

@Danfoa
Copy link
Author

Danfoa commented Nov 30, 2021

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))

@MaximilienNaveau
Copy link
Contributor

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.

@MaximilienNaveau
Copy link
Contributor

I added @fgrimminger and @jviereck on the subject as they might be interested by this.

@jviereck
Copy link
Contributor

jviereck commented Dec 1, 2021

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

@fgrimminger
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants