Isaac Sim Version
4.5.0
4.2.0
4.1.0
4.0.0
4.5.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):
Operating System
Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify):
GPU Information
- Model: NVIDIA RTX A2000 8GB
- Driver Version: 535.230.02
Topic Description
Detailed Description
We were able to import a custom character in IsaacSim and are now trying to extend its behavior with a custom command. The character we imported works well with the default GoTo, Idle, and LookAround commands so we assume that applying the CharacterRetargetAnimationsCommand is not needed.
Yet we struggle to execute a custom Assembly command.
Steps to Reproduce
- Produce an animation using Iclone8 using the same Character usd file that is being used later in IsaacSim.
- Manually extend the animation usd to contain required attributes for custom commands
from pxr import Usd, Sdf
def create_or_get_attribute(prim, name, typeName):
"""
Retrieve an existing attribute or create a new one on the given prim.
"""
attr = prim.GetAttribute(name)
if not attr:
attr = prim.CreateAttribute(name, typeName)
return attr
# Open the USD stage
usd_path = 'custom_animation.usd'
stage = Usd.Stage.Open(usd_path)
if not stage:
print("Error: Unable to open USD file at", args.usd_path)
sys.exit(1)
# Get the default prim
prim = stage.GetDefaultPrim()
if not prim:
print("Error: No default prim found in the USD file.")
sys.exit(1)
# Create or get the custom command attributes on the default prim.
name_attr = create_or_get_attribute(prim, "CustomCommandName", Sdf.ValueTypeNames.String)
template_attr = create_or_get_attribute(prim, "CustomCommandTemplate", Sdf.ValueTypeNames.String)
anim_start_attr = create_or_get_attribute(prim, "CustomCommandAnimStartTime", Sdf.ValueTypeNames.Float)
anim_end_attr = create_or_get_attribute(prim, "CustomCommandAnimEndTime", Sdf.ValueTypeNames.Float)
# Set attribute values using the USD API's Set method.
name_attr.Set(args.custom_command_name)
template_attr.Set(args.custom_command_template)
anim_start_attr.Set(args.custom_command_anim_start_time)
anim_end_attr.Set(args.custom_command_anim_end_time)
stage.GetRootLayer().Save()
- At the setup of the scene add the adjusted animation usd to the CustomCommandManager.
from omni.anim.people.scripts.custom_command.command_manager import CustomCommandManager
from omni.anim.people.scripts.custom_command.populate_anim_graph import populate_anim_graph
if self._custom_command_manager.add_custom_command(anim_usd_path):
bus = omni.kit.app.get_app().get_message_bus_event_stream()
bus.push(
self.event_add_custom_command,
payload={
"Command": self._custom_command_manager.get_latest_command().name,
"Template": self._custom_command_manager.get_latest_command().template,
},
)
populate_anim_graph()
Error Messages
Eventually, we can see the wanted command being shown as part of the Biped_Setup but it is not being executed giving us some warnings in the logs:
2025-03-13 12:36:54 [498,690ms] [Warning] [omni.anim.asset] Failed to compile Animation. ‘/World/Characters/Biped_Setup/CustomCommandAnimations/Assembly’ is not a valid UsdSkelAnimation
2025-03-13 12:36:54 [498,690ms] [Warning] [omni.anim.asset] Failed to compile asset ‘/World/Characters/Biped_Setup/CustomCommandAnimations/Assembly’:
2025-03-13 12:36:54 [498,698ms] [Warning] [omni.anim.asset] Failed to compile dependencies for ‘/World/Characters/Biped_Setup/CharacterAnimation/AnimationGraph’:
2025-03-13 12:36:54 [498,733ms] [Warning] [omni.anim.graph.core.python] Type mismatch for variable Action in Character::SetVariable
Screenshots or Videos
Here’s what we see before launching the simulation. Yet the command is not being executed.
We would love to know if we are missing something crucial here.