@@ -132,7 +132,7 @@ def __init__(
132
132
self ._overlay = {}
133
133
self ._markers = []
134
134
135
- def add_line_to_fig (self , line_name , fig_idx = 0 ):
135
+ def add_line_to_fig (self , line_name , fig_idx = 0 ):
136
136
assert isinstance (line_name , str ), \
137
137
"Line name must be a string."
138
138
@@ -156,7 +156,7 @@ def add_line_to_fig(self, line_name, fig_idx = 0):
156
156
for i in range (mujoco .mjMAXLINEPNT ):
157
157
fig .linedata [linecount ][2 * i ] = - float (i )
158
158
159
- def add_data_to_line (self , line_name , line_data , fig_idx = 0 ):
159
+ def add_data_to_line (self , line_name , line_data , fig_idx = 0 ):
160
160
fig = self .figs [fig_idx ]
161
161
162
162
try :
@@ -174,8 +174,8 @@ def add_data_to_line(self, line_name, line_data, fig_idx = 0):
174
174
fig .linedata [line_idx ][2 * i + 1 ] = fig .linedata [line_idx ][2 * i - 1 ]
175
175
176
176
# assign new
177
- fig .linepnt [line_idx ] = pnt ;
178
- fig .linedata [line_idx ][1 ] = line_data ;
177
+ fig .linepnt [line_idx ] = pnt
178
+ fig .linedata [line_idx ][1 ] = line_data
179
179
180
180
def add_marker (self , ** marker_params ):
181
181
self ._markers .append (marker_params )
@@ -357,7 +357,7 @@ def read_pixels(self, camid=None, depth=False):
357
357
# render
358
358
mujoco .mjr_render (self .viewport , self .scn , self .ctx )
359
359
shape = glfw .get_framebuffer_size (self .window )
360
-
360
+
361
361
if depth :
362
362
rgb_img = np .zeros ((shape [1 ], shape [0 ], 3 ), dtype = np .uint8 )
363
363
depth_img = np .zeros ((shape [1 ], shape [0 ], 1 ), dtype = np .float32 )
@@ -368,7 +368,6 @@ def read_pixels(self, camid=None, depth=False):
368
368
mujoco .mjr_readPixels (img , None , self .viewport , self .ctx )
369
369
return np .flipud (img )
370
370
371
-
372
371
def render (self ):
373
372
if self .render_mode == 'offscreen' :
374
373
raise NotImplementedError (
@@ -429,7 +428,7 @@ def update():
429
428
viewport = mujoco .MjrRect (
430
429
x , y , int (width / 4 ), int (height / 4 ))
431
430
432
- has_lines = len ([i for i in fig .linename if i != b'' ])
431
+ has_lines = len ([i for i in fig .linename if i != b'' ])
433
432
if has_lines :
434
433
mujoco .mjr_figure (viewport , fig , self .ctx )
435
434
0 commit comments