simulation.py
def _gatherBulletArgs(self): # {{{0
    "Gather the arguments to pass to pybullet.connect"
    # Determine background color arguments
    cr = cg = cb = None
    if self.args.bgr is not None:
      cr = self.args.bgr
    if self.args.bgg is not None:
      cg = self.args.bgg
    if self.args.bgb is not None:
      cb = self.args.bgb
    if self.args.bg:
      crgba = parseColor(self.args.bg, cmax=255, scale=255)
      if crgba is not None:
        cr, cg, cb = crgba[0], crgba[1], crgba[2]
      else:
        logger.error("Ignoring invalid --bg value {!r}".format(self.args.bg))

    # Determine the arguments to pass to pybullet.connect
    simArgs = []
    if self.args.width:
      simArgs.append("--width={}".format(self.args.width))
    if self.args.height:
      simArgs.append("--height={}".format(self.args.height))
    if not self.args.gui:
      simArgs.append("--nogui")
    if cr is not None:
      simArgs.append("--background_color_red={}".format(cr / 255.0))
    if cg is not None:
      simArgs.append("--background_color_green={}".format(cg / 255.0))
    if cb is not None:
      simArgs.append("--background_color_blue={}".format(cb / 255.0))
    simArgs.extend(self.remainder)

    return simArgs
Gather the arguments to pass to pybullet.connect
Gather the arguments to pass to pybullet.connect
Gather the arguments to pass to pybullet . connect
def _gatherBulletArgs(self): 
    cr = cg = cb = None
    if self.args.bgr is not None:
      cr = self.args.bgr
    if self.args.bgg is not None:
      cg = self.args.bgg
    if self.args.bgb is not None:
      cb = self.args.bgb
    if self.args.bg:
      crgba = parseColor(self.args.bg, cmax=255, scale=255)
      if crgba is not None:
        cr, cg, cb = crgba[0], crgba[1], crgba[2]
      else:
        logger.error("Ignoring invalid --bg value {!r}".format(self.args.bg))
    simArgs = []
    if self.args.width:
      simArgs.append("--width={}".format(self.args.width))
    if self.args.height:
      simArgs.append("--height={}".format(self.args.height))
    if not self.args.gui:
      simArgs.append("--nogui")
    if cr is not None:
      simArgs.append("--background_color_red={}".format(cr / 255.0))
    if cg is not None:
      simArgs.append("--background_color_green={}".format(cg / 255.0))
    if cb is not None:
      simArgs.append("--background_color_blue={}".format(cb / 255.0))
    simArgs.extend(self.remainder)
    return simArgs
def _gatherBulletArgs ( self ) : cr = cg = cb = None if self . args . bgr is not None : cr = self . args . bgr if self . args . bgg is not None : cg = self . args . bgg if self . args . bgb is not None : cb = self . args . bgb if self . args . bg : crgba = parseColor ( self . args . bg , cmax = 255 , scale = 255 ) if crgba is not None : cr , cg , cb = crgba [ 0 ] , crgba [ 1 ] , crgba [ 2 ] else : logger . error ( "Ignoring invalid --bg value {!r}" . format ( self . args . bg ) ) simArgs = [ ] if self . args . width : simArgs . append ( "--width={}" . format ( self . args . width ) ) if self . args . height : simArgs . append ( "--height={}" . format ( self . args . height ) ) if not self . args . gui : simArgs . append ( "--nogui" ) if cr is not None : simArgs . append ( "--background_color_red={}" . format ( cr / 255.0 ) ) if cg is not None : simArgs . append ( "--background_color_green={}" . format ( cg / 255.0 ) ) if cb is not None : simArgs . append ( "--background_color_blue={}" . format ( cb / 255.0 ) ) simArgs . extend ( self . remainder ) return simArgs
Gather the arguments to pass to pybullet.connect
Gather the arguments to pass to pybullet . connect
# {{{0 "Gather the arguments to pass to pybullet.connect" # Determine background color arguments # Determine the arguments to pass to pybullet.connect
self