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

Any suggestions on how to lock certain joints? #73

Open
gunnxx opened this issue Sep 17, 2021 · 0 comments
Open

Any suggestions on how to lock certain joints? #73

gunnxx opened this issue Sep 17, 2021 · 0 comments

Comments

@gunnxx
Copy link

gunnxx commented Sep 17, 2021

I am trying to implement meta-learning for RL that needs environment that can be applied with certain damages. I am trying to implement locked joint on the agent e.g. ant environment. I tried two options

self.robot.ordered_joints[idx].disable_motor()   # first way
self.robot.ordered_joints[idx].power_coef = 0.0  # second way

Turns out, disable_motor() only makes the motor dead by applying no torque to the motor i.e. setJointMotorControl2(self.bodies[self.bodyIndex], self.jointIndex, controlMode=pybullet.POSITION_CONTROL, targetPosition=0, targetVelocity=0, positionGain=0.1, velocityGain=0.1, force=0). The joint is still moving due to other forces e.g. gravity. What I need is the joint to be locked at a certain degree.

For the power_coef, seems like that property is not being used by any of the methods in Joint class. Additionally, I found a typo(?). Joint has property power_coeff, but this line tries to change power_coef instead of power_coeff.

Back to the original question? Any suggestions on how to lock certain joints?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant