parameters: (self,inputs,res,indices,values)
docstring: Given a return dictionary res for the output() function, sets a joint command for a multiple
          links, dqdes[index]=value for (index,value) in zip(indices,values). 
          If a position command is already given, this will figure out how to move along the desired velocity
          over the next cycle.
          Indices can also be joint names.
docstring_summary: Given a return dictionary res for the output() function, sets a joint command for a multiple
          links, dqdes[index]=value for (index,value) in zip(indices,values). 
          If a position command is already given, this will figure out how to move along the desired velocity
          over the next cycle.
          Indices can also be joint names.
docstring_tokens: Given a return dictionary res for the output () function sets a joint command for a multiple links dqdes [ index ] = value for ( index value ) in zip ( indices values ) . If a position command is already given this will figure out how to move along the desired velocity over the next cycle . Indices can also be joint names .
function: def setVelocityCommands(self,inputs,res,indices,values):
          """Given a return dictionary res for the output() function, sets a joint command for a multiple
          links, dqdes[index]=value for (index,value) in zip(indices,values). 
          If a position command is already given, this will figure out how to move along the desired velocity
          over the next cycle.
          Indices can also be joint names."""
          #klampt can only do uniform position, velocity, or torque commands
          if 'qcmd' in res:
              for index,value in zip(indices,values):
                  if isinstance(index,str):
                      #perform the mapping automatically
                      index = self.nameToLinkIndex[index]
                  res['qcmd'][index] = inputs['qcmd'][index]+value*inputs['dt']
          elif 'dqcmd' in res:
              for index,value in zip(indices,values):
                  if isinstance(index,str):
                      #perform the mapping automatically
                      index = self.nameToLinkIndex[index]
                  res['dqcmd'][index] = value
              res['tcmd']=inputs['dt']
          elif 'torquecmd' in res:
              print "Cannot combine joint velocity commands with joint torque commands"
          else:
              #no joint commands set yet, set a position command
              res['dqcmd'] = inputs['dqcmd']
              for index,value in zip(indices,values):
                  if isinstance(index,str):
                      #perform the mapping automatically
                      index = self.nameToLinkIndex[index]
                  res['dqcmd'][index] = value
function_tokens: def setVelocityCommands ( self , inputs , res , indices , values ) : #klampt can only do uniform position, velocity, or torque commands if 'qcmd' in res : for index , value in zip ( indices , values ) : if isinstance ( index , str ) : #perform the mapping automatically index = self . nameToLinkIndex [ index ] res [ 'qcmd' ] [ index ] = inputs [ 'qcmd' ] [ index ] + value * inputs [ 'dt' ] elif 'dqcmd' in res : for index , value in zip ( indices , values ) : if isinstance ( index , str ) : #perform the mapping automatically index = self . nameToLinkIndex [ index ] res [ 'dqcmd' ] [ index ] = value res [ 'tcmd' ] = inputs [ 'dt' ] elif 'torquecmd' in res : print "Cannot combine joint velocity commands with joint torque commands" else : #no joint commands set yet, set a position command res [ 'dqcmd' ] = inputs [ 'dqcmd' ] for index , value in zip ( indices , values ) : if isinstance ( index , str ) : #perform the mapping automatically index = self . nameToLinkIndex [ index ] res [ 'dqcmd' ] [ index ] = value