def callback(self, cmd_msg): pos = cmd_msg.data if (pos > 100): pos = 100 elif (pos < 0): pos = 0 Setter.callback(self, pos)
def callback(self, cmd_msg): # callback function - extends the setter.callback functionality # formats data to be passed to mindprobe pos = cmd_msg.data if (pos > 100): pos = 100 elif (pos < 0): pos = 0 Setter.callback(self, pos)
def set_right(self,cmd_msg): # callback to set the right wheel vel = cmd_msg.data Setter.callback(self,[0,vel])
def set_left(self,cmd_msg): # callback to set the left wheel vel = cmd_msg.data Setter.callback(self,[vel,0])
def callback(self, cmd_msg): # differential drive callback. vel = twist_to_vel(cmd_msg) Setter.callback(self,vel)
def set_right(self, cmd_msg): vel = cmd_msg.data Setter.callback(self, [0, vel])
def set_left(self, cmd_msg): vel = cmd_msg.data Setter.callback(self, [vel, 0])
def callback(self, cmd_msg): vel = twist_to_vel(cmd_msg) Setter.callback(self, vel)