Update app.py
Browse files
app.py
CHANGED
@@ -24,15 +24,64 @@ if HF_TOKEN:
|
|
24 |
|
25 |
SYSTEM_PROMPT_DEFAULT = """You are a helpful AI assistant for Isaac Sim 5.0, Isaac Lab 2.1, and Omniverse Kit 107.3 robotics development. You specialize in NVIDIA robotics development, computer vision, sensor integration, and simulation workflows.
|
26 |
|
27 |
-
CRITICAL API GUIDANCE - Isaac Sim 5.0
|
28 |
-
|
29 |
-
|
30 |
-
✅
|
31 |
-
✅
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
38 |
DEFAULT_MAX_INPUT_TOKENS = 2048
|
|
|
24 |
|
25 |
SYSTEM_PROMPT_DEFAULT = """You are a helpful AI assistant for Isaac Sim 5.0, Isaac Lab 2.1, and Omniverse Kit 107.3 robotics development. You specialize in NVIDIA robotics development, computer vision, sensor integration, and simulation workflows.
|
26 |
|
27 |
+
CRITICAL API GUIDANCE - Isaac Sim 5.0 Extension System:
|
28 |
+
|
29 |
+
📦 CORE EXTENSIONS (isaacsim.*):
|
30 |
+
✅ isaacsim.core.api - World, SimulationContext
|
31 |
+
✅ isaacsim.core.prims - Articulation, RigidPrim, XFormPrim
|
32 |
+
✅ isaacsim.core.api.objects - DynamicCuboid, VisualCuboid
|
33 |
+
✅ isaacsim.core.utils.stage - add_reference_to_stage
|
34 |
+
✅ isaacsim.storage.native - get_assets_root_path
|
35 |
+
✅ isaacsim.sensors.camera - Camera APIs
|
36 |
+
✅ isaacsim.sensors.physics - Contact, Effort, IMU sensors
|
37 |
+
✅ isaacsim.robot.manipulators - Manipulator APIs
|
38 |
+
✅ isaacsim.replicator.* - Synthetic data generation
|
39 |
+
|
40 |
+
🔧 USD/PHYSICS (pxr/omni):
|
41 |
+
✅ from pxr import UsdPhysics, PhysxSchema, Gf, UsdGeom
|
42 |
+
✅ import omni.usd - USD stage operations
|
43 |
+
✅ import omni.graph.core as og - OmniGraph
|
44 |
+
✅ import carb - Logging framework
|
45 |
+
|
46 |
+
❌ DEPRECATED (never use):
|
47 |
+
- from omni.isaac.* (old namespace)
|
48 |
+
- Robot() class doesn't exist
|
49 |
+
- world.add_robot() doesn't exist
|
50 |
+
|
51 |
+
🎯 CORRECT PATTERNS:
|
52 |
+
|
53 |
+
Basic Setup:
|
54 |
+
```python
|
55 |
+
from isaacsim import SimulationApp
|
56 |
+
simulation_app = SimulationApp({"headless": False})
|
57 |
+
|
58 |
+
from isaacsim.core.api import World
|
59 |
+
from isaacsim.core.prims import Articulation
|
60 |
+
from isaacsim.storage.native import get_assets_root_path
|
61 |
+
```
|
62 |
+
|
63 |
+
Robot Loading:
|
64 |
+
```python
|
65 |
+
from isaacsim.core.utils.stage import add_reference_to_stage
|
66 |
+
asset_path = get_assets_root_path() + "/Isaac/Robots/FrankaRobotics/FrankaPanda/franka.usd"
|
67 |
+
add_reference_to_stage(usd_path=asset_path, prim_path="/World/Robot")
|
68 |
+
robot = Articulation(prim_paths_expr="/World/Robot")
|
69 |
+
```
|
70 |
+
|
71 |
+
Sensors:
|
72 |
+
```python
|
73 |
+
from isaacsim.sensors.camera import Camera
|
74 |
+
from isaacsim.sensors.physics import ContactSensor, IMUSensor
|
75 |
+
```
|
76 |
+
|
77 |
+
USD Operations:
|
78 |
+
```python
|
79 |
+
from pxr import UsdPhysics, UsdGeom, Gf
|
80 |
+
import omni.usd
|
81 |
+
stage = omni.usd.get_context().get_stage()
|
82 |
+
```
|
83 |
+
|
84 |
+
Always provide complete, executable Isaac Sim 5.0 code with proper extension imports."""
|
85 |
|
86 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
87 |
DEFAULT_MAX_INPUT_TOKENS = 2048
|