Esempio n. 1
0
    def __init__(self, name, ndof, ctype):
        M3Component.__init__(self, name, ctype)
        self.read_config()
        self.status = mab.M3JointArrayStatus()
        self.command = mab.M3JointArrayCommand()
        self.param = mab.M3JointArrayParam()
        if ndof is None:
            ndof = self.config['ndof']
        self.ndof = ndof
        self.vias = []
        self.via_idx = 0
        # Grow the protocol buffer messages to correct size
        # NOTE: should really support mixed sizes but...
        for i in range(self.ndof):
            self.command.pwm_desired.append(0)
            self.command.tq_desired.append(0)
            self.command.q_desired.append(0)
            self.command.qdot_desired.append(0)
            self.command.q_stiffness.append(0)
            self.command.q_slew_rate.append(0)
            self.command.smoothing_mode.append(msm.SMOOTHING_MODE_OFF)
            self.command.ctrl_mode.append(mam.JOINT_ARRAY_MODE_OFF)

        self.motor_temp = nu.zeros(self.ndof, float)
        self.amp_temp = nu.zeros(self.ndof, float)
        self.torque = nu.zeros(self.ndof, float)
        self.torquedot = nu.zeros(self.ndof, float)
        self.current = nu.zeros(self.ndof, float)
        self.theta = nu.zeros(self.ndof, float)
        self.thetadot = nu.zeros(self.ndof, float)
        self.thetadotdot = nu.zeros(self.ndof, float)

        self.max_slew_rates = self.__get_max_slew_rates_from_config()
Esempio n. 2
0
    def __init__(self,name,ndof,ctype):
        M3Component.__init__(self,name,ctype)
	self.read_config()
        self.status=mab.M3JointArrayStatus()
        self.command=mab.M3JointArrayCommand()
        self.param=mab.M3JointArrayParam()
	if ndof is None:
	    ndof=self.config['ndof']
        self.ndof=ndof
        self.vias=[]
        self.via_idx=0
        # Grow the protocol buffer messages to correct size
        # NOTE: should really support mixed sizes but...
        for i in range(self.ndof):
            self.command.pwm_desired.append(0)
            self.command.tq_desired.append(0)
            self.command.q_desired.append(0)
            self.command.qdot_desired.append(0)
            self.command.q_stiffness.append(0)
	    self.command.q_slew_rate.append(0)
	    self.command.smoothing_mode.append(msm.SMOOTHING_MODE_OFF)
            self.command.ctrl_mode.append(mam.JOINT_ARRAY_MODE_OFF)
        
        self.motor_temp=nu.zeros(self.ndof,float)
        self.amp_temp=nu.zeros(self.ndof,float)
        self.torque=nu.zeros(self.ndof,float)
        self.torquedot=nu.zeros(self.ndof,float)	
        self.current=nu.zeros(self.ndof,float)
        self.theta=nu.zeros(self.ndof,float)
        self.thetadot=nu.zeros(self.ndof,float)
        self.thetadotdot=nu.zeros(self.ndof,float)
	
	self.max_slew_rates=self.__get_max_slew_rates_from_config()
    def __init__(self,name):
	M3Component.__init__(self,name,type='m3tactile_pps22_ec')
	self.status=mec.M3TactilePPS22EcStatus()
	self.command=mec.M3TactilePPS22EcCommand()
	self.param=mec.M3TactilePPS22EcParam()
	self.taxels=nu.zeros(22,nu.Float32)
	self.read_config()
Esempio n. 4
0
 def __init__(self, name):
     M3Component.__init__(self, name, type='m3loadx6')
     self.status = mrt.M3LoadX6Status()
     self.command = mrt.M3LoadX6Command()
     self.param = mrt.M3LoadX6Param()
     self.wrench = nu.zeros(6, float)
     self.read_config()
Esempio n. 5
0
 def __init__(self, name):
     M3Component.__init__(self, name, type='m3tactile_pps22_ec')
     self.status = mec.M3TactilePPS22EcStatus()
     self.command = mec.M3TactilePPS22EcCommand()
     self.param = mec.M3TactilePPS22EcParam()
     self.taxels = nu.zeros(22, nu.Float32)
     self.read_config()
Esempio n. 6
0
 def read_config(self):
     M3Component.read_config(self)
     
     try:
         f=file(self.config_name,'r')
         self.config= yaml.safe_load(f.read())
     except (IOError, EOFError):
         print 'Config file not present:',self.config_name
         return
 
     if self.config.has_key('volt_components'):
         for k in self.config['volt_components']:
             self.param.volt_comp.add()
             self.param.volt_comp[-1].component_name = k
             self.param.volt_comp[-1].max_val_warn = self.config['volt_components'][k]['max_warn']
             self.param.volt_comp[-1].min_val_warn = self.config['volt_components'][k]['min_warn']
             self.param.volt_comp[-1].max_val_err = self.config['volt_components'][k]['max_err']
             self.param.volt_comp[-1].min_val_err = self.config['volt_components'][k]['min_err']
             
     if self.config.has_key('temp_components'):
         for k in self.config['temp_components']:
             self.param.temp_comp.add()
             self.param.temp_comp[-1].component_name = k
             self.param.temp_comp[-1].max_val_warn = self.config['temp_components'][k]['max_warn']
             self.param.temp_comp[-1].min_val_warn = self.config['temp_components'][k]['min_warn']
             self.param.temp_comp[-1].max_val_err = self.config['temp_components'][k]['max_err']
             self.param.temp_comp[-1].min_val_err = self.config['temp_components'][k]['min_err']
Esempio n. 7
0
 def __init__(self,name):
     M3Component.__init__(self,name,type='m3robot_monitor')
     
     self.status=mrm.M3RobotMonitorStatus()
     self.command=mrm.M3RobotMonitorCommand()
     self.param=mrm.M3RobotMonitorParam()
     self.read_config()
Esempio n. 8
0
    def __init__(self, name, type='m3dynamatics'):
        M3Component.__init__(self, name, type=type)
        self.status = mrt.M3DynamaticsStatus()
        self.command = mrt.M3DynamaticsCommand()
        self.param = mrt.M3DynamaticsParam()

        for i in range(3):
            self.param.payload_com.append(0)
        for i in range(6):
            self.param.payload_inertia.append(0)

        self.read_config()

        self.T80 = nu.zeros([4, 4],
                            nu.float32)  #Transform from end to base frame
        self.T08 = nu.zeros([4, 4],
                            nu.float32)  #Transform from base to end frame
        self.G = nu.zeros(self.ndof + 1, nu.float32)  #Gravity vector on joints
        self.C = nu.zeros(self.ndof + 1,
                          nu.float32)  #Coriolis vector on joints
        self.J = nu.zeros(
            [6, self.ndof],
            nu.float32)  #Jacobian from joint torques to end torques
        self.Jt = nu.zeros([self.ndof, 6],
                           nu.float32)  #Transform end wrench to joint torques.
        self.end_twist = nu.zeros(6, nu.float32)
        self.end_pos = nu.zeros(3, nu.float32)
        self.end_rot = nu.zeros([3, 3], nu.float32)
Esempio n. 9
0
    def __init__(self,name):
	M3Component.__init__(self,name,type='m3loadx6')
	self.status=mrt.M3LoadX6Status()
	self.command=mrt.M3LoadX6Command()
	self.param=mrt.M3LoadX6Param()
	self.wrench=nu.zeros(6,float)
	self.read_config()	
Esempio n. 10
0
    def set_slew_rate_proportion(self,v,ind=None):
	slew_rates = []
	if ind is not None:
	    for i in range(len(ind)):
	    	slew_rates.append(self.max_slew_rates[ind[i]]*max(0.0,min(1.0,v[i])))
	else:
	    for i in range(len(v)):
		slew_rates.append(self.max_slew_rates[i]*max(0.0,min(1.0,v[i])))	
	M3Component.set_float_array(self,self.command.q_slew_rate,slew_rates,ind)
Esempio n. 11
0
 def __init__(self, name, type='m3head_s2csp_ctrl'):
     M3Component.__init__(self, name, type=type)
     self.status = hpb.M3HeadS2CSPCtrlStatus()
     self.command = hpb.M3HeadS2CSPCtrlCommand()
     self.param = hpb.M3HeadS2CSPCtrlParam()
     self.read_config()
     for i in range(3):
         self.command.target.append(0)
         self.status.xe.append(0)
	def __init__(self,name,type='m3head_s2csp_ctrl'):
		M3Component.__init__(self,name,type=type)
		self.status=hpb.M3HeadS2CSPCtrlStatus()
		self.command=hpb.M3HeadS2CSPCtrlCommand()
		self.param=hpb.M3HeadS2CSPCtrlParam()
		self.read_config()
		for i in range(3):
			self.command.target.append(0)
			self.status.xe.append(0)
Esempio n. 13
0
    def read_config(self):
        M3Component.read_config(self)

        try:
            f = file(self.config_name, "r")
            config = yaml.safe_load(f.read())
        except (IOError, EOFError):
            print "Config file not present:", self.config_name
            return

        self.ndof = config["ndof"]
Esempio n. 14
0
    def read_config(self):
        M3Component.read_config(self)

        try:
            f = file(self.config_name, 'r')
            config = yaml.safe_load(f.read())
        except (IOError, EOFError):
            print 'Config file not present:', self.config_name
            return

        self.ndof = config['ndof']
Esempio n. 15
0
    def __init__(self, name):
        M3Component.__init__(self, name, type='m3ledx2xn_ec')
        self.status = mec.M3LedX2XNEcStatus()
        self.command = mec.M3LedX2XNEcCommand()
        self.param = mec.M3LedX2XNEcParam()
        self.read_config()
        self.slew = {'branch_a': [], 'branch_b': []}
        self.nled = {
            'branch_a': self.config['param']['n_branch_a'],
            'branch_b': self.config['param']['n_branch_b']
        }
        self.phase = {'branch_a': [], 'branch_b': []}
        for i in range(self.nled['branch_a']):
            self.command.branch_a.r.append(0)
            self.command.branch_a.g.append(0)
            self.command.branch_a.b.append(0)
            self.slew['branch_a'].append(
                [m3t.M3Slew(), m3t.M3Slew(),
                 m3t.M3Slew()])
            self.phase['branch_a'].append(math.pi * i / (math.pi * 2))
        for i in range(self.nled['branch_b']):
            self.command.branch_b.r.append(0)
            self.command.branch_b.g.append(0)
            self.command.branch_b.b.append(0)
            self.slew['branch_b'].append(
                [m3t.M3Slew(), m3t.M3Slew(),
                 m3t.M3Slew()])
            self.phase['branch_b'].append(math.pi * i / (math.pi * 2))

        self.circ_slew = {'branch_a': [], 'branch_b': []}
        for i in range(6):
            for b in ['branch_a', 'branch_b']:
                self.circ_slew[b].append(m3t.M3Slew())

        self.command_branch = {
            'branch_a': self.command.branch_a,
            'branch_b': self.command.branch_b
        }
        self.mode = {
            'branch_a': mode_ledx2xn_off,
            'branch_b': mode_ledx2xn_off
        }
        self.rgb = {
            'branch_a': [[0, 0, 0]] * self.nled['branch_a'],
            'branch_b': [[0, 0, 0]] * self.nled['branch_b']
        }
        self.slew_rate = {'branch_a': 0, 'branch_b': 0}
        self.circ_rate = {'branch_a': 0, 'branch_b': 0}
        self.circ_slew_rate = {'branch_a': 0, 'branch_b': 0}
        self.circ_rgb_1 = {'branch_a': None, 'branch_b': None}
        self.circ_rgb_2 = {'branch_a': None, 'branch_b': None}
        self.step = {'branch_a': 0, 'branch_b': 0}
        self.disable_leds()
Esempio n. 16
0
 def set_slew_rate_proportion(self, v, ind=None):
     slew_rates = []
     if ind is not None:
         for i in range(len(ind)):
             slew_rates.append(self.max_slew_rates[ind[i]] *
                               max(0.0, min(1.0, v[i])))
     else:
         for i in range(len(v)):
             slew_rates.append(self.max_slew_rates[i] *
                               max(0.0, min(1.0, v[i])))
     M3Component.set_float_array(self, self.command.q_slew_rate, slew_rates,
                                 ind)
Esempio n. 17
0
 def set_mode_caster_off(self,caster_idx):
         """
         Turns off controller for specified caster and places omnibase in 'caster_mode'.
                 
         :param caster_idx: Index of caster.
         :type caster_idx: array_like, shape < ncasters, optional
         
         :See Also: 	   
                 :meth:`M3OmniBase.set_mode_caster_torque`
                 :meth:`M3OmniBase.set_mode_caster`
         """
         self.command.ctrl_mode=mob.OMNIBASE_CTRL_CASTER
         M3Component.set_int_array(self,self.command.caster_mode,mob.OMNIBASE_CASTER_OFF,caster_idx)        
Esempio n. 18
0
 def set_mode_caster_torque(self,caster_idx):
         """
         Allows specified caster to be controlled with torque commands and places omnibase in 'caster_mode'.
                 
         :param caster_idx: Index of caster.
         :type caster_idx: array_like, shape < ncasters, optional
         
         :See Also: 	   
                 :meth:`M3OmniBase.set_mode_caster_off`
                 :meth:`M3OmniBase.set_mode_caster`
         """
         self.command.ctrl_mode=mob.OMNIBASE_CTRL_CASTER
         M3Component.set_int_array(self,self.command.caster_mode,mob.OMNIBASE_CASTER_TORQUE,caster_idx)        
Esempio n. 19
0
 def set_mode_caster_off(self, caster_idx):
     """
             Turns off controller for specified caster and places omnibase in 'caster_mode'.
                     
             :param caster_idx: Index of caster.
             :type caster_idx: array_like, shape < ncasters, optional
             
             :See Also: 	   
                     :meth:`M3OmniBase.set_mode_caster_torque`
                     :meth:`M3OmniBase.set_mode_caster`
             """
     self.command.ctrl_mode = mob.OMNIBASE_CTRL_CASTER
     M3Component.set_int_array(self, self.command.caster_mode,
                               mob.OMNIBASE_CASTER_OFF, caster_idx)
Esempio n. 20
0
 def set_mode_caster_torque(self, caster_idx):
     """
             Allows specified caster to be controlled with torque commands and places omnibase in 'caster_mode'.
                     
             :param caster_idx: Index of caster.
             :type caster_idx: array_like, shape < ncasters, optional
             
             :See Also: 	   
                     :meth:`M3OmniBase.set_mode_caster_off`
                     :meth:`M3OmniBase.set_mode_caster`
             """
     self.command.ctrl_mode = mob.OMNIBASE_CTRL_CASTER
     M3Component.set_int_array(self, self.command.caster_mode,
                               mob.OMNIBASE_CASTER_TORQUE, caster_idx)
Esempio n. 21
0
 def set_steer_torques(self, tq, ind=None):
         """
         Sets steer torque values for selected casters.  A list of caster indexes can be supplied
         to set specific caster torques, or the index
         can be omitted if the length of tq is equal to the number of degrees of casters.
                         
         :param tq: Steer torque values in Nm.
         :type tq: array_like
         :param ind: Index of casters.
         :type ind: array_like, shape(len(tq)), optional
                         
                 
         :See Also: 
                 :meth:`M3OmniBase.set_mode_caster_torque`
                 :meth:`M3OmniBase.set_roll_torques`                        
         """
         M3Component.set_float_array(self,self.command.steer_torque_desired,tq,ind)
Esempio n. 22
0
    def __init__(self,name):
	M3Component.__init__(self,name,type='m3ledx2_ec')
	self.status=mec.M3LedX2EcStatus()
	self.command=mec.M3LedX2EcCommand()
	self.param=mec.M3LedX2EcParam()
	self.read_config()
	self.slew_aa_r=m3t.M3Slew()
	self.slew_aa_g=m3t.M3Slew()
	self.slew_aa_b=m3t.M3Slew()
	self.slew_ab_r=m3t.M3Slew()
	self.slew_ab_g=m3t.M3Slew()
	self.slew_ab_b=m3t.M3Slew()
	self.slew_ba_r=m3t.M3Slew()
	self.slew_ba_g=m3t.M3Slew()
	self.slew_ba_b=m3t.M3Slew()
	self.slew_bb_r=m3t.M3Slew()
	self.slew_bb_g=m3t.M3Slew()
	self.slew_bb_b=m3t.M3Slew()
Esempio n. 23
0
 def __init__(self, name):
     M3Component.__init__(self, name, type='m3ledx2_ec')
     self.status = mec.M3LedX2EcStatus()
     self.command = mec.M3LedX2EcCommand()
     self.param = mec.M3LedX2EcParam()
     self.read_config()
     self.slew_aa_r = m3t.M3Slew()
     self.slew_aa_g = m3t.M3Slew()
     self.slew_aa_b = m3t.M3Slew()
     self.slew_ab_r = m3t.M3Slew()
     self.slew_ab_g = m3t.M3Slew()
     self.slew_ab_b = m3t.M3Slew()
     self.slew_ba_r = m3t.M3Slew()
     self.slew_ba_g = m3t.M3Slew()
     self.slew_ba_b = m3t.M3Slew()
     self.slew_bb_r = m3t.M3Slew()
     self.slew_bb_g = m3t.M3Slew()
     self.slew_bb_b = m3t.M3Slew()
Esempio n. 24
0
 def set_steer_torques(self, tq, ind=None):
     """
             Sets steer torque values for selected casters.  A list of caster indexes can be supplied
             to set specific caster torques, or the index
             can be omitted if the length of tq is equal to the number of degrees of casters.
                             
             :param tq: Steer torque values in Nm.
             :type tq: array_like
             :param ind: Index of casters.
             :type ind: array_like, shape(len(tq)), optional
                             
                     
             :See Also: 
                     :meth:`M3OmniBase.set_mode_caster_torque`
                     :meth:`M3OmniBase.set_roll_torques`                        
             """
     M3Component.set_float_array(self, self.command.steer_torque_desired,
                                 tq, ind)
    def __init__(self, name, type):
        M3Component.__init__(self, name, type)

        # TODO: Figure this out from config.
        self.num_casters = 4

        self.command = mob.MekaOmnibaseControlCommand()
        self.status  = mob.MekaOmnibaseControlStatus()
        self.param   = mob.MekaOmnibaseControlParam()

        self.read_config()

        for i in range(3):
            self.command.xd_des.append(0.0)
        for i in range(self.num_casters):
            self.command.betad_des.append(0.0)
            self.command.phid_des.append(0.0)
            self.command.tqr.append(0.0)

        self.command.ctrl_mode = mob.MEKA_OMNIBASE_CONTROL_OFF
Esempio n. 26
0
    def __init__(self,name):
	M3Component.__init__(self,name,type='m3led_matrix_ec')
	self.status=mec.M3LedMatrixEcStatus()
	self.command=mec.M3LedMatrixEcCommand()
	self.param=mec.M3LedMatrixEcParam()
	self.read_config()
	self.num_row=self.config['num_rows']
	self.num_col=self.config['num_cols']
	self.ra=0
	if self.config['invert_image']:
	    self.ra=self.num_row-1

	for i in range(self.num_row):
	    self.command.row.add()
	    for j in range(self.num_col):
		self.command.row[i].column.add()
	#Setup animations
	self.seq_id=0
	self.animations={}
	self.anim_name=None
Esempio n. 27
0
    def __init__(self, name, type="m3dynamatics"):
        M3Component.__init__(self, name, type=type)
        self.status = mrt.M3DynamaticsStatus()
        self.command = mrt.M3DynamaticsCommand()
        self.param = mrt.M3DynamaticsParam()

        for i in range(3):
            self.param.payload_com.append(0)
        for i in range(6):
            self.param.payload_inertia.append(0)

        self.read_config()

        self.T80 = nu.zeros([4, 4], nu.float32)  # Transform from end to base frame
        self.T08 = nu.zeros([4, 4], nu.float32)  # Transform from base to end frame
        self.G = nu.zeros(self.ndof + 1, nu.float32)  # Gravity vector on joints
        self.C = nu.zeros(self.ndof + 1, nu.float32)  # Coriolis vector on joints
        self.J = nu.zeros([6, self.ndof], nu.float32)  # Jacobian from joint torques to end torques
        self.Jt = nu.zeros([self.ndof, 6], nu.float32)  # Transform end wrench to joint torques.
        self.end_twist = nu.zeros(6, nu.float32)
        self.end_pos = nu.zeros(3, nu.float32)
        self.end_rot = nu.zeros([3, 3], nu.float32)
Esempio n. 28
0
 def __init__(self,name):
     M3Component.__init__(self,name,type='m3ledx2xn_ec')
     self.status=mec.M3LedX2XNEcStatus()
     self.command=mec.M3LedX2XNEcCommand()
     self.param=mec.M3LedX2XNEcParam()
     self.read_config()
     self.slew={'branch_a':[],'branch_b':[]}
     self.nled={'branch_a':self.config['param']['n_branch_a'],'branch_b':self.config['param']['n_branch_b']}
     self.phase={'branch_a':[],'branch_b':[]}
     for i in range(self.nled['branch_a']):
         self.command.branch_a.r.append(0)
         self.command.branch_a.g.append(0)
         self.command.branch_a.b.append(0)
         self.slew['branch_a'].append([m3t.M3Slew(),m3t.M3Slew(),m3t.M3Slew()])
         self.phase['branch_a'].append(math.pi*i/(math.pi*2))
     for i in range(self.nled['branch_b']):
         self.command.branch_b.r.append(0)
         self.command.branch_b.g.append(0)
         self.command.branch_b.b.append(0)
         self.slew['branch_b'].append([m3t.M3Slew(),m3t.M3Slew(),m3t.M3Slew()])
         self.phase['branch_b'].append(math.pi*i/(math.pi*2))
         
     self.circ_slew={'branch_a':[],'branch_b':[]}
     for i in range(6):
         for b in ['branch_a','branch_b']:
             self.circ_slew[b].append(m3t.M3Slew())
             
     self.command_branch={'branch_a':self.command.branch_a,'branch_b':self.command.branch_b}
     self.mode={'branch_a':mode_ledx2xn_off,'branch_b':mode_ledx2xn_off}
     self.rgb={'branch_a':[[0,0,0]]*self.nled['branch_a'],'branch_b':[[0,0,0]]*self.nled['branch_b']}
     self.slew_rate={'branch_a':0,'branch_b':0}
     self.circ_rate={'branch_a':0,'branch_b':0}
     self.circ_slew_rate={'branch_a':0,'branch_b':0}
     self.circ_rgb_1={'branch_a':None,'branch_b':None}
     self.circ_rgb_2={'branch_a':None,'branch_b':None}
     self.step={'branch_a':0,'branch_b':0}
     self.disable_leds()
Esempio n. 29
0
 def set_steer_theta(self, th, ind=None):
     M3Component.set_float_array(self, self.command.steer_theta_desired, th,
                                 ind)
Esempio n. 30
0
 def __init__(self,name):
     M3Component.__init__(self,name,type='m3pwr')
     self.status=mrt.M3PwrStatus()
     self.command=mrt.M3PwrCommand()
     self.param=mrt.M3PwrParam()
     self.read_config()
Esempio n. 31
0
 def set_mode_theta_gc_mj(self,ind=None):
     M3Component.set_int_array(self,self.command.ctrl_mode,mam.JOINT_ARRAY_MODE_THETA_GC_MJ,ind)
Esempio n. 32
0
    def set_mode_caster(self, mode, caster_idx=None):

        M3Component.set_int_array(self, self.command.caster_mode, mode,
                                  caster_idx)
Esempio n. 33
0
 def __init__(self, name, type="m3actuator"):
     M3Component.__init__(self, name, type=type)
     self.status = m3.actuator_pb2.M3ActuatorStatus()
     self.command = m3.actuator_pb2.M3ActuatorCommand()
     self.param = m3.actuator_pb2.M3ActuatorParam()
     self.read_config()
Esempio n. 34
0
 def set_mode_caster_velocity(self, caster_idx):
     self.command.ctrl_mode = mob.OMNIBASE_CTRL_CASTER
     M3Component.set_int_array(self, self.command.caster_mode,
                               mob.OMNIBASE_CASTER_VELOCITY, caster_idx)
Esempio n. 35
0
 def set_mode_torque_gc(self, ind=None):
     M3Component.set_int_array(self, self.command.ctrl_mode,
                               mam.JOINT_ARRAY_MODE_TORQUE_GC, ind)
Esempio n. 36
0
    def __init__(self,name,type):
	M3Component.__init__(self,name,type)
Esempio n. 37
0
 def set_mode(self, v, ind=None):
     M3Component.set_int_array(self, self.command.ctrl_mode, v, ind)
Esempio n. 38
0
 def set_mode_pwm(self, ind=None):
     M3Component.set_int_array(self, self.command.ctrl_mode,
                               mam.JOINT_ARRAY_MODE_PWM, ind)
Esempio n. 39
0
	def __init__(self,name,type='m3ctrl_simple'):
		M3Component.__init__(self,name,type=type)
		self.status		= m3.ctrl_simple_pb2.M3CtrlSimpleStatus()
		self.command	= m3.ctrl_simple_pb2.M3CtrlSimpleCommand()
		self.param		= m3.ctrl_simple_pb2.M3CtrlSimpleParam()
		self.read_config()
Esempio n. 40
0
 def set_slew_rate(self, v):
     M3Component.set_float_array(self, self.command.q_slew_rate, v, ind)
Esempio n. 41
0
 def set_stiffness(self, v, ind=None):
     M3Component.set_float_array(self, self.command.q_stiffness, v, ind)
Esempio n. 42
0
    def read_config(self):
	       M3Component.read_config(self)
Esempio n. 43
0
 def set_mode_thetadot_gc(self, ind=None):
     M3Component.set_int_array(self, self.command.ctrl_mode,
                               mam.JOINT_ARRAY_MODE_THETADOT_GC, ind)
Esempio n. 44
0
 def __init__(self, name, type='m3loadx1'):
     M3Component.__init__(self, name, type=type)
     self.status = m3.loadx1_pb2.M3LoadX1Status()
     self.command = m3.loadx1_pb2.M3LoadX1Command()
     self.param = m3.loadx1_pb2.M3LoadX1Param()
     self.read_config()
Esempio n. 45
0
 def set_mode_theta_gc_mj(self, ind=None):
     M3Component.set_int_array(self, self.command.ctrl_mode,
                               mam.JOINT_ARRAY_MODE_THETA_GC_MJ, ind)
Esempio n. 46
0
 def __init__(self,name,type='m3loadx1_ec'):
     M3Component.__init__(self,name,type=type)
     self.status=mec.M3LoadX1EcStatus()
     self.command=mec.M3LoadX1EcCommand()
     self.param=mec.M3LoadX1EcParam()
     self.read_config()
Esempio n. 47
0
 def set_mode_splined_traj_gc(self, ind=None):
     M3Component.set_int_array(self, self.command.ctrl_mode,
                               mam.JOINT_ARRAY_MODE_SPLINED_TRAJ_GC, ind)
Esempio n. 48
0
 def __init__(self, name):
     M3Component.__init__(self, name, type='m3pwr')
     self.status = mrt.M3PwrStatus()
     self.command = mrt.M3PwrCommand()
     self.param = mrt.M3PwrParam()
     self.read_config()
Esempio n. 49
0
 def __init__(self,name):
     M3Component.__init__(self,name,type='m3haptic_demo')
     self.status=mrt.M3HapticDemoStatus()
     self.command=mrt.M3HapticDemoCommand()
     self.param=mrt.M3HapticDemoParam()
     self.read_config()
Esempio n. 50
0
 def set_mode_caster_theta(self, caster_idx):
     self.command.ctrl_mode = mob.OMNIBASE_CTRL_CASTER
     M3Component.set_int_array(self, self.command.caster_mode,
                               mob.OMNIBASE_CASTER_THETA, caster_idx)
Esempio n. 51
0
    def __init__(self,name,ctype='m3async_io'):
        M3Component.__init__(self,name,type=ctype)
	self.read_config()
        self.status=mab.M3AsyncIOStatus()
        self.command=mab.M3AsyncIOCommand()
        self.param=mab.M3AsyncIOParam()
Esempio n. 52
0
 def set_mode_thetadot_gc(self,ind=None):
     M3Component.set_int_array(self,self.command.ctrl_mode,mam.JOINT_ARRAY_MODE_THETADOT_GC,ind)
Esempio n. 53
0
 def __init__(self,name,type='m3actuator_ec'):
     M3Component.__init__(self,name,type=type)
     self.status=mec.M3ActuatorEcStatus()
     self.command=mec.M3ActuatorEcCommand()
     self.param=mec.M3ActuatorEcParam()
     self.read_config()
Esempio n. 54
0
 def set_mode_torque_gc(self,ind=None):
     M3Component.set_int_array(self,self.command.ctrl_mode,mam.JOINT_ARRAY_MODE_TORQUE_GC,ind)
Esempio n. 55
0
 def set_mode_splined_traj_gc(self,ind=None):
     M3Component.set_int_array(self,self.command.ctrl_mode,mam.JOINT_ARRAY_MODE_SPLINED_TRAJ_GC,ind)
Esempio n. 56
0
 def set_roll_velocities(self, v, ind=None):
     M3Component.set_float_array(self, self.command.roll_velocity_desired,
                                 v, ind)
Esempio n. 57
0
 def __init__(self,name):
     M3Component.__init__(self,name,type='m3pwr_ec')
     self.status=mec.M3PwrEcStatus()
     self.command=mec.M3PwrEcCommand()
     self.param=mec.M3PwrEcParam()
     self.read_config()