leggedrobotics / raisimLib

RAISIM, A PHYSICS ENGINE FOR ROBOTICS AND AI RESEARCH
http://www.raisim.com
325 stars 50 forks source link

Question on the materials used in function addHeightMap. #62

Closed Fleer-code closed 4 years ago

Fleer-code commented 4 years ago

Hello, I wonder if there is a way to change the coefficient of friction between the robot and the ground. I have found a parameter material in function HeightMap *addHeightMap(const std::string &raisimHeightMapFileName, double centerX, double centerY, const std::string &material = "default", CollisionGroup collisionGroup = 1, CollisionGroup collisionMask = CollisionGroup(-1));. Is there any other choice to change the "default" into other materials? I have also found a file, _raisimworkspace/raisimLib/examples/rsc/basicMaterials.xml which has definition of friction and restitution. Is it related to the the parameter material in addHeightMap? If yes, how should I modify or insert material parameters in this file, and how can I adopt these materials in my own code file?

jhwangbo commented 4 years ago

Check this link. http://raisim.com/sections/MaterialSystem.html

Fleer-code commented 4 years ago

Thanks. That's exactly what I need.

Fleer-code commented 4 years ago

There is another question I feel confused. Is there a way to change the material of the links of the robot, which is loaded from .urdf file. I found a function void setMaterial(const std::string &material); in JointAndBodies.hpp, but haven't figure out how to use it.

jhwangbo commented 4 years ago

articulated system materials are specified differently. I added description here http://raisim.com/sections/MaterialSystem.html#example-articulated-systems

Fleer-code commented 4 years ago

Thanks. That's very helpful!