My solution (Problem: joint position is not aligned with the value we set. We can raise the times of calling sim.step(), but it is inefficient)
Code: Select all
initial_positions = self.np_random.uniform(-np.pi / 3, np.pi / 3, size=6)
self._set_joint_mode('position')
for i, joint in enumerate(self.general_joints):
self.sim.setJointTargetPosition(joint, float(initial_positions[i]))
for i in range(20):
self.sim.step()
Coppeliasim: v4.10 Edu
Windows 11
Additional info: Dyn control enabled