Hello,
I’m trying to add a ur5e robot without a gripper using SingleManipulator. But when I try to reset the world I get an error. I can run the code without world.reset() and the manipulator is added to the stage.
How can I fix this problem? Do I need to define a gripper even though I’m not using one?
– Thanks in advance
My error
Traceback (most recent call last):
File "exts/omni.isaac.examples/omni/isaac/examples/user_examples/my_application.py", line 25, in <module>
my_world.reset()
File "/home/user/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.core/omni/isaac/core/world/world.py", line 283, in reset
self.scene.post_reset()
File "/home/user/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.core/omni/isaac/core/scenes/scene.py", line 258, in post_reset
prim_registery[prim_name].post_reset()
File "/home/user/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.manipulators/omni/isaac/manipulators/single_manipulator.py", line 118, in post_reset
self._gripper.post_reset()
AttributeError: 'NoneType' object has no attribute 'post_reset'
My Code
from omni.isaac.kit import SimulationApp
simulation_app = SimulationApp({"headless": False})
from omni.isaac.core.utils.nucleus import get_assets_root_path
from omni.isaac.core import World
from omni.isaac.manipulators import SingleManipulator
from omni.isaac.core.utils.stage import add_reference_to_stage
import carb
my_world = World(stage_units_in_meters=1.0)
assets_root_path = get_assets_root_path()
if assets_root_path is None:
carb.log_error("Could not find nucleus server with /Isaac folder")
asset_path = assets_root_path + "/Isaac/Robots/UniversalRobots/ur5e/ur5e.usd"
add_reference_to_stage(usd_path=asset_path, prim_path="/World/ur5e")
#define the manipulator
my_ur5 = my_world.scene.add(SingleManipulator(prim_path="/World/ur5e", name="ur5e_robot",end_effector_prim_name="flange"))
my_world.scene.add_default_ground_plane()
my_world.reset()
while simulation_app.is_running():
my_world.step(render=True)
simulation_app.close()