I tried multiple revolute joints to connect to the object (free translation, then rotate x then y then z). I tried a D6 joint allowing translation and limiting rotx y z. I tried stringing together D6 joints so they’re basically like revolute joints.
No matter what I do I get crazy motion, or false masses with intermediate bodies because they can’t just be defined kinematic, and setting up joints doesnt do reverse kinematics, AND OR i get these “double pyramid” errors.
PLEASE HELP!
I have an object, I want it to do all the physics sim stuff it can do, but I dont want my object to rotate beyond ±x_angle (world coordinates) ±y_angle and ±z_angle. So some artificial clamping of rotations.
Hi @kristinandtom2016, thank you for posting your issue. I think you can achieve what you want to do with a D6 joint. You want to make sure translation joints are unlimited and rotation joints are limited to your specifications. Also, you will want to add Angular Joint Drives in X, Y and Z axis and set a damping and stiffness.
Here is a video of what I got working and attached is a USD you can try.
Interesting. I wonder if there is a difference in that I was generating it from a python script? Doubly pyramid error no matter how I tried.
I got pretty close by defining a 6dof articulation robot with prismatix xyz joints, then revolute joints around xyz with limits. each joint was in the same physical location. then then I’d attach it to my rigid body in the appropriate pose. That actually worked I think. but it was weird in that while the object seemed to obey the physical limits including when it hit the ground and bounced around and obeyed the joint limits, the fixed joint that attached it to the end of the articulation robot would separate, and the robot node would fall infinitely. (i had the robot without collision enabled since i didnt want it part of the sim).
Also, in your solution, I was sceptical on adding a drive and damping and stiffness… they would be artificial forces imposed on the part that push it in a certain direction, no? I kind of just wanted a hard stop
What I ended up doing was adding a physics call back function and i monitor the angles every step and overwrite them if they go beyond the limits. i also zero out the angular velocity in that direction.
its not amazing though. a part can tip just enough that it is constantly falling/reseting every step of the simulation and it slowly “walks” away. i can probably fix that with more programming though… monitor the last position’s xyz location and reset it to the prevoius step’s location if the current step’s orientation is over the limit.
actually thats a good idea. i might just do that :)
Adding a Joint drive with zero stiffness and damping should not add any artificial forces unless it is hitting the joint limits. What you are doing also makes sense but might be a bit more involved.
Let me know if you need any further help! I’ll close the issue for now but feel free to open a new one if needed.