bulletphysics / bullet3

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
http://bulletphysics.org
Other
12.71k stars 2.88k forks source link

Issues about setJointMotorControlArray() #4304

Open TriBall3 opened 2 years ago

TriBall3 commented 2 years ago

Recently, I was working on the problem of robot arm positioning. I have solved the pose of the robot arm. In the code, it is targj2, but I found that its positioning position is different from what I expected. Then I changed the size of the number in targj and found that the positioning position has not changed. Why?

targj2 = np.array([-1, -0.5, 0.5, -0.5, -0.5, 0]) * np.pi
self.sim.setJointMotorControlArray(
    bodyIndex=self.ur5,
    jointIndices=self.joints,
    controlMode=p.POSITION_CONTROL,
    targetPositions=targj2,
    positionGains=gains)

image When I changed targj2 to np.array([-1, -0.5, 0.5, -0.5, -0.5, 0]),The robot arm still performs the same action. This is how I import UR5: self.ur5 = pybullet.loadURDF('/media/randy/299D817A2D97AD94/FTY/dedo/dedo/envs/ur5/ur5-suction.urdf',[5, 3, 0],globalScaling=15.0) How can I solve this problem?

manavkulshrestha commented 1 year ago

Did you figure this out?