We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e5f4b7 commit c7e93ebCopy full SHA for c7e93eb
1 file changed
crazyflow/sim/sim.py
@@ -8,6 +8,7 @@
8
import jax.numpy as jnp
9
import mujoco
10
import mujoco.mjx as mjx
11
+import drone_models
12
from drone_controllers.mellinger import (
13
attitude2force_torque,
14
force_torque2rotor_vel,
@@ -91,10 +92,7 @@ def __init__(
91
92
93
# Initialize MuJoCo world and data
94
self._xml_path = xml_path or Path(__file__).parents[1] / "scene.xml"
- self.drone_path = (
95
- Path(__file__).parents[2]
96
- / f"submodules/drone-models/drone_models/data/{drone_model}.xml"
97
- )
+ self.drone_path = Path(drone_models.__file__).parent / "data" / f"{drone_model}.xml"
98
self.spec = self.build_mjx_spec()
99
self.mj_model, self.mj_data, self.mjx_model, self.mjx_data = self.build_mjx_model(self.spec)
100
self.viewer: MujocoRenderer | None = None
0 commit comments