isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
1.54k stars 478 forks source link

[Question] Writing Joint Velocity into Simulation with robot.write_joint_state_to_sim(position=..., velocity=..., joint_ids=...) #432

Open YZhang001 opened 1 month ago

YZhang001 commented 1 month ago

Question

Hello. I was simulating a Franka robot arm in Isaac Sim 2023.1.1 and followed the tutorial from this page.

I need to assume perfect joint velocity tracking for the robot, so for every time step I tried to directly set the joint velocities with: robot.write_joint_state_to_sim(position=..., velocity=..., joint_ids=robot_entity_cfg.joint_ids) But this function requires joint position as input, and if I set position as the current joint position and velocity as the desired joint velocity, the robot hardly moves as expected in simulation (I recorded the joint velocities from robot.data.joint_vel[:, robot_entity_cfg.joint_ids] and they are different from the reference value). Is there a way to directly set joint velocity (like set_joint_velocities) so that the robot can start moving from the current joint position with the set joint velocity during one control loop?

Thanks.

jtigue-bdai commented 3 weeks ago

Yes there is take a look at the Articulation.set_joint_velocity_target, just be sure to read the section about writing that data to sim.