Closed whtsao closed 1 year ago
The issue you point to on the chrono issue tracker is saying the API has changed. Now you need to set call that function on the collision object, which is distinct from the body. You may want to see if ChBodyEasyBox has a pointer to its collision object.
Contact materials are now associated with collision shapes (so that you can have multiple different materials in the collision material of any given body). Please see point 5 in this link: https://github.com/projectchrono/chrono/blob/main/CHANGELOG.md#changed-collision-shapes-and-contact-materials
The old code use: mybox = pychrono.ChBodyEasyBox(x size, y size, z size, density, collision?) mybox.SetMaterialSurface(material)
The new code use: mboxBody = chrono.ChBodyEasyBox(x size, y size, z size, density, visualization?, collision?, material)
When I run the moored_body.py in proteus_tutorial/2D/, I got the following error from ‘seabed.SetMaterialSurface(material)’: AttributeError: 'ChBodyEasyBox' object has no attribute 'SetMaterialSurface' I found someone has the same problem before (https://github.com/projectchrono/chrono/issues/428), it seems the new chrono has changed something. Do @cekees know how to rewrite this part for chrono? Thank you.