my custom robot name “bot”
and right click and save selected
and then import that usd file
robot’s structure is changed ( be wrapped)
how to save robot’s … ?
my custom robot name “bot”
and right click and save selected
and then import that usd file
robot’s structure is changed ( be wrapped)
how to save robot’s … ?
@jinyu061353 i am just another OV user, but could you elaborate what you meant by “be wrapped”? what should the structure look like in the stage?
i want usd file has only “bot”
so i click “bot” and saved then re open that usd files
But “bot” is wrapped in the saved file name, such as “mobile_robot4” at the bottom of the picture.
i believe that’s the default behavior: payload/reference composition arc will need to be associated with a USD file. you could rename the payload after bringing it into a new scene, but the name of the payload will always be set as the name of the file by default. the original hierarchy (bot and its children) will also be added under a new root (the name of the file, ‘mobile_robot4’, in your case).
based on my limited experience, you could consider to simply rename the file itself to ‘bot’ after saving selected (or save the file as ‘bot’ during save selected operation). this step should be easy, but if you intend to remove the extra hierarchy under the stage root, you may need to reshuffle some things around in the stage. mainly, drag the child of original ‘bot’ xform to under the root (see below), delete the extra xform, then overwrite the file. now, when you drag and drop this USD into any scene, it’ll default to ‘bot’ with no excess hierarchy. if you have material assignments, you may take an extra step to ensure all the material bindings are not mixed up.
do note that this may not be the most efficient way to go about doing this, or if you have multiple bots, you will need to avoid naming conflicts. so, i am sure the mods/devs have more useful suggestions.
To explain in detail:
I completed the “core api tutorial”.
Now, I want to configure the system using the custom robot I created.
Basically in the tutorial
world = self.get_world()
world.scene.add_default_ground_plane()
# you configure a new server with /Isaac folder in it
assets_root_path = get_assets_root_path()
if assets_root_path is None:
# Use carb to log warnings, errors and infos in your application (shown on terminal)
carb.log_error("Could not find nucleus server with /Isaac folder")
asset_path = assets_root_path + "/Isaac/Robots/Jetbot/jetbot.usd"
add_reference_to_stage(usd_path=asset_path, prim_path="/World/Fancy_Robot")
jetbot_robot = world.scene.add(Robot(prim_path="/World/Fancy_Robot", name="fancy_robot"))
Use this code to spawn a robot
code here
asset_path = "C:/Users/jinu0/Downloads/isaac_sim/jetbot1.usd"
add_reference_to_stage(usd_path=asset_path, prim_path="/World/Fancy_Robot")
If you change it like this and try to spawn, an error will occur.
In the process of spawning this cause, I
If you spawn from basic isaac assets, they will not be wrapped, but
I thought that the cause of the problem was that custom usd was wrapped when spawned.
Is there another way to spawn with code?
2023-10-11 07:29:34 [810,605ms] [Error] [omni.physx.tensors.plugin] Pattern ‘/World/jetbot1’ did not match any articulations 2023-10-11 07:29:34 [810,608ms] [Error] [asyncio] Task exception was never retrieved future: <Task finished coro=<BaseSampleExtension._on_load_world.._on_load_world_async() done, defined at c:\users\jinu0\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.examples\omni\isaac\examples\base_sample\base_sample_extension.py:150> exception=AttributeError(“‘NoneType’ object has no attribute ‘is_homogeneous’”)> Traceback (most recent call last): File “c:\users\jinu0\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.examples\omni\isaac\examples\base_sample\base_sample_extension.py”, line 151, in _on_load_world_async await self._sample.load_world_async() File “c:\users\jinu0\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.examples\omni\isaac\examples\base_sample\base_sample.py”, line 47, in load_world_async await self._world.reset_async() File “c:\users\jinu0\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.core\omni\isaac\core\world\world.py”, line 314, in reset_async self._scene._finalize(self.physics_sim_view) File “c:\users\jinu0\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.core\omni\isaac\core\scenes\scene.py”, line 292, in _finalize robot.initialize(physics_sim_view) File “c:\users\jinu0\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.core\omni\isaac\core\articulations\articulation.py”, line 163, in initialize self._articulation_view.initialize(physics_sim_view=physics_sim_view) File “c:\users\jinu0\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.core\omni\isaac\core\articulations\articulation_view.py”, line 201, in initialize assert self._physics_view.is_homogeneous File “c:\users\jinu0\appdata\local\ov\pkg\isaac_sim-2022.2.1\kit\extsphysics\omni.physics.tensors-104.2.4-5.1\omni\physics\tensors\impl\api.py”, line 156, in is_homogeneous return self._backend.is_homogeneous AttributeError: ‘NoneType’ object has no attribute ‘is_homogeneous’
i see, you were following the ‘Hello Robot’ tutorial. if you were to run the default code without any modification, you should notice that when it spawned the jetbot, the reference is pathed to the asset in Isaac folder (jetbot.usd)
and because we specified the prim_path to ‘Fancy_Robot’, the reference name is now called ‘Fancy_Robot’ in the stage. all the hierarchy is still intact as the source asset (as shown above).
based on the log you posted, i am not sure if it’s fully related to the wrapping; but i could be wrong. it seems related to the robot itself like articulation?
Thank you for your reply.
you are right
My problem is when the code is changed by saving the robot (fancy_robot) in your photo locally and then importing the file that saved the code locally.
The structure changes to robot/fancy_robot.
I think it’s a problem with how the file itself is stored.