Hello!
The previous issue has been resolved. It was simply due to calling the set_joint_positions
function multiple times within a single loop, which resulted in overwriting the values.
However, I have encountered another issue related to the behavior difference between the CPU pipeline and the GPU pipeline.
I am trying to recreate the Factory environment using the reference of the OmniIsaacGymEnvs Factory with a different robot. In the process of resetting the environment, when I use set_joint_positions
to move the robot to its initial pose in the ArticulationView, the robot disappears inexplicably.
This issue does not occur when the pipeline is set to CPU, and the robot is properly initialized. However, using the CPU pipeline prevents me from simulating the SDF, which is necessary for replicating the Factory environment.
After executing the following code, the robot disappears somewhere:
def apply_actions(self, actions):
# Actions are velocity commands
jt_pos = self.robots.get_joint_positions(joint_indices=self.combined_dof_idxs)
jt_pos += actions * self.action_arm_scale * self.dt
# Modify torso value
arm_dof_pos = self.get_arms_dof_pos()
scaled_arm_lift_pos = arm_dof_pos[:, 0] / self.arm_dof_upper[0]
scaled_torso_lift_pos = scaled_arm_lift_pos * self.torso_dof_upper[0]
jt_pos[:, 3] = scaled_torso_lift_pos
# Apply modified action
self.robots.set_joint_positions(positions=jt_pos, joint_indices=self.combined_dof_idxs)
SimulationContext.step(self._env._world, render=True)
Before calling it.
After calling it.
In this image, the robot and the table appear to overlap, so I initially thought that the robot might be getting displaced to an unintended location due to contact. However, even after removing the table, the same issue continues to occur.
And here is the image when running with the CPU pipeline.
Before calling it.
After calling it.
Best regards,
SMakolon385