Skip to content

Any suggestions on how to lock certain joints? #73

@gunnxx

Description

@gunnxx

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions