I’m controlling the wheel of a robot in Isaac Sim using velocity mode. However, instead of maintaining a constant speed, the wheel rotates for a while and then stops intermittently. What could be causing this issue, and how can I ensure the wheel rotates at a constant speed without interruptions?
here is part of my code
sim_dt = sim.get_physics_dt()
count = 0
min_torso_joint_value = np.array([0, 0, 0, 0]) / 180.0 * np.pi *100
steer_joint_value = np.array([0.9250663955407291, 0.7346690973447606, 0.6716847170203316]) /2
zero_steer_joint_value = np.array([0.0, 0.0, 0.0])
wheel_joint_value = np.array([0.2692006686470151, 0.32073197533142844, 0.2555014677061562])*135
wheel_joint_velocity = wheel_joint_value
target_velocity_wheel = torch.tensor(wheel_joint_velocity,dtype=torch.float32, device="cuda:0")
robot.set_joint_velocity_target(target_velocity_wheel, joint_ids=wheel_motor_entity_cfg.joint_ids)
while simulation_app.is_running():
time = count * sim_dt *10
torso_joint_position = min_torso_joint_value
steer_joint_position = steer_joint_value
target_position_torso = torch.tensor(torso_joint_position,dtype=torch.float32, device="cuda:0")
target_position_steer = torch.tensor(steer_joint_position,dtype=torch.float32, device="cuda:0")
robot.set_joint_position_target(target_position_torso, joint_ids=torso_entity_cfg.joint_ids)
robot.set_joint_position_target(target_position_steer, joint_ids=steer_motor_entity_cfg.joint_ids)
scene.write_data_to_sim()
sim.step()
scene.update(sim_dt)
count += 1