Target Velocity in Drive component

Isaac Sim Version

4.5.0

Topic Description

I have a robot with a couple of wheels. each wheel has a RevoluteJoint prim which has a Drive component. I set the TargetVelocity from my extension. I was trying to figure out the units of the target velocity and the discription explains “if linear drive/ if angular drive“. How can i get and set those parameters? I need to have angular drive such that the units of TargetVelocity will be degrees/seconds. Thank you.

image

Hi, to get and set the TargetVelocity for a Drive component of a RevoluteJoint prim, the standard approach is to use the USD and Physics APIs provided by Isaac Sim. The TargetVelocity is typically accessed via the Drive API associated with the joint, specifically the "angular" drive for revolute joints.

Getting and Setting Drive TargetVelocity

  • Access the Joint Prim: First, acquire the joint prim (“PhysicsRevoluteJoint”) via the stage using its path.
  • Access the Drive API: The drive attribute for velocity control is usually labeled "angular" for revolute joints.
  • Set or Get Parameters: Use the methods on the UsdPhysics.DriveAPI object to get or set the parameters like TargetVelocity, Stiffness, and Damping.

Example Python Code

from pxr import Usd, UsdPhysics

# Get the prim for your joint
joint_prim = stage.GetPrimAtPath("/path/to/your/joint")

# Get the angular drive API associated with this joint prim
drive_api = UsdPhysics.DriveAPI.Get(joint_prim, "angular")

# To set target velocity (in radians per second)
drive_api.GetTargetVelocityAttr().Set(desired_velocity)

# To get current target velocity
current_velocity = drive_api.GetTargetVelocityAttr().Get()
  • For a velocity drive, set the stiffness to 0 and tune the damping; then set the TargetVelocity to the desired value.[1][2]

Parameter Details

  • TargetVelocity is in degrees per second for angular drives (revolute joints).
  • Stiffness should be 0 for velocity drives, and Damping should be tuned high enough for stable velocity control.
  • These attributes can be edited either programmatically or through Isaac Sim’s UI.

  1. ishandotsh ↩︎

  2. Tutorial 11: Tuning Joint Drive Gains — Isaac Sim Documentation ↩︎

1 Like

Awesome, Thank you.