-
Notifications
You must be signed in to change notification settings - Fork 17
Add USD scene tools #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This commit introduces 5 new utility functions for interacting with USD scenes in Isaac Sim: list_prims() — enumerate all prims in the stage open_usd() — load a USD file as the main stage import_usd() — import USD files at a custom pose get_object_info() — retrieve detailed transform + type move_prim() — move prims using various rotation formats
@@ -302,6 +302,11 @@ def _execute_command_internal(self, command): | |||
"generate_3d_from_text_or_image": self.generate_3d_from_text_or_image, | |||
"transform": self.transform, | |||
"search_3d_usd_by_text": self.search_3d_usd_by_text, | |||
"list_prims": self.list_prims, | |||
"open_usd": self.open_usd, | |||
"import_usd": self.import_usd, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move all usd related method into usd.py
https://github.com/omni-mcp/isaac-sim-mcp/blob/main/isaac.sim.mcp_extension/isaac_sim_mcp_extension/usd.py#L370
"traceback": traceback.format_exc() | ||
} | ||
|
||
def import_usd(self, usd_path: str, prim_path: str = None, position: List[float] = None, orientation: List[float] = None, orientation_format: str = "degrees") -> Dict[str, Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return f"Error listing prims: {str(e)}" | ||
|
||
@mcp.tool() | ||
def open_usd(usd_path: str) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicated to load_usd() and consider to reuse load_usd instead.
"traceback": traceback.format_exc() | ||
} | ||
|
||
def move_prim(self, prim_path: str, position: List[float] = None, orientation: List[float] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reuse transform() method
This commit introduces 5 new utility functions for interacting with USD scenes in Isaac Sim:
list_prims() — enumerate all prims in the stage
open_usd() — load a USD file as the main stage
import_usd() — import USD files at a custom pose
get_object_info() — retrieve detailed transform + type move_prim() — move prims using various rotation formats