@@ -132,7 +132,7 @@ def __init__(
132132 self ._overlay = {}
133133 self ._markers = []
134134
135- def add_line_to_fig (self , line_name , fig_idx = 0 ):
135+ def add_line_to_fig (self , line_name , fig_idx = 0 ):
136136 assert isinstance (line_name , str ), \
137137 "Line name must be a string."
138138
@@ -156,7 +156,7 @@ def add_line_to_fig(self, line_name, fig_idx = 0):
156156 for i in range (mujoco .mjMAXLINEPNT ):
157157 fig .linedata [linecount ][2 * i ] = - float (i )
158158
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 ):
160160 fig = self .figs [fig_idx ]
161161
162162 try :
@@ -174,8 +174,8 @@ def add_data_to_line(self, line_name, line_data, fig_idx = 0):
174174 fig .linedata [line_idx ][2 * i + 1 ] = fig .linedata [line_idx ][2 * i - 1 ]
175175
176176 # 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
179179
180180 def add_marker (self , ** marker_params ):
181181 self ._markers .append (marker_params )
@@ -357,7 +357,7 @@ def read_pixels(self, camid=None, depth=False):
357357 # render
358358 mujoco .mjr_render (self .viewport , self .scn , self .ctx )
359359 shape = glfw .get_framebuffer_size (self .window )
360-
360+
361361 if depth :
362362 rgb_img = np .zeros ((shape [1 ], shape [0 ], 3 ), dtype = np .uint8 )
363363 depth_img = np .zeros ((shape [1 ], shape [0 ], 1 ), dtype = np .float32 )
@@ -368,7 +368,6 @@ def read_pixels(self, camid=None, depth=False):
368368 mujoco .mjr_readPixels (img , None , self .viewport , self .ctx )
369369 return np .flipud (img )
370370
371-
372371 def render (self ):
373372 if self .render_mode == 'offscreen' :
374373 raise NotImplementedError (
@@ -429,7 +428,7 @@ def update():
429428 viewport = mujoco .MjrRect (
430429 x , y , int (width / 4 ), int (height / 4 ))
431430
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'' ])
433432 if has_lines :
434433 mujoco .mjr_figure (viewport , fig , self .ctx )
435434
0 commit comments