How to enable collision? #711
Replies: 1 comment
-
It doesn't seem like you can delete a post so here's a short description of my stupidity: The arm was being "controlled" by directly setting the joint position angles instead of applying forces. Since I do want to control the robot with target angles I now instead use a controller that produces the required force from the current and target angles. I think I expected that if contact is simulated then setting the position of two geometries to be overlapping would cause the simulator to complain - but since my loop never called mujoco.mj_step and only called mujoco.mj_forward I guess there was no real physics simulation happening. I've still got lots to learn, hope this helps someone! |
Beta Was this translation helpful? Give feedback.
-
Newbie here, I've searched through various documentation but for some reason cannot find anything. I'm working in Python with a UR5 based on abr_control.
By printing out model.data.ncon or model.data.contact I can see that the contacts I care about are being detected but they are not showing up in the simulator, meaning the objects just go through each other.
How do I enable simulation of the actual contact forces so that, for example, the robot arm stops when it hits the ground or self collides (two non-consecutive joints are in contact)?
EDIT: I should also say I am new to robot xml/urdf files. Based on the LQR tutorial where the humanoid does as I want my arm to do without any code explicitly doing anything, my guess is that I can modify the XML file to get what I want? Sorry if this is not the right forum to ask this question, would appreciate any help!
Beta Was this translation helpful? Give feedback.
All reactions