File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ def __init__(
61
61
self .n_worlds = n_worlds
62
62
self .n_drones = n_drones
63
63
self .freq = freq
64
+ self .max_visual_geom = 1000
64
65
65
66
# Initialize MuJoCo world and data
66
67
self ._xml_path = xml_path or self .default_path
@@ -302,7 +303,7 @@ def thrust_control(self, cmd: Array):
302
303
def render (self ):
303
304
if self .viewer is None :
304
305
patch_viewer ()
305
- self .viewer = MujocoRenderer (self .mj_model , self .mj_data , max_geom = 1000 )
306
+ self .viewer = MujocoRenderer (self .mj_model , self .mj_data , max_geom = self . max_visual_geom )
306
307
self .mj_data .qpos [:] = self .data .mjx_data .qpos [0 , :]
307
308
self .mj_data .mocap_pos [:] = self .data .mjx_data .mocap_pos [0 , :]
308
309
self .mj_data .mocap_quat [:] = self .data .mjx_data .mocap_quat [0 , :]
Original file line number Diff line number Diff line change @@ -78,6 +78,9 @@ def patch_viewer():
78
78
the rendering pipeline between `mjv_updateScene`, which deletes all previous markers, and
79
79
`mjr_render`, so if we want to add markers to the scene, we need to do it here. The patch
80
80
ensures that markers are added correctly to the scene.
81
+
82
+ If you want to add more markers than the default limit, you can increase the `max_visual_geom`
83
+ parameter in the `Sim` class.
81
84
"""
82
85
83
86
def _add_marker_to_scene (self : BaseRender , marker : dict ):
You can’t perform that action at this time.
0 commit comments