def METHOD_NAME(self,msg):
    if self.firstJointCommand:
        print "Warning, got ROS joint command without reading from simulator yet, ignoring."
        return
    #copy elements of msg to the current joint command
    elements = ['position','velocity','effort','kp_position','ki_position','kd_position','kp_velocity','i_effort_min','i_effort_max']
    for i,n in enumerate(msg.name):
        index = self.nameToIndex[n]
        for e in elements:
            emsg = getattr(msg,e)
            if len(emsg) > 0:
                ecmd = getattr(self.currentJointCommand,e)
                ecmd[index] = emsg[i]
    self.newJointCommand = True
    return