3 roslib.load_manifest(
'mini_maxwell')
10 rospack = rospkg.RosPack()
11 sys.path.append(rospack.get_path(
'mini_maxwell') +
"/scripts")
13 from mm2client
import *
14 from dynamic_reconfigure.server
import Server
as DynamicReconfigureServer
15 from mini_maxwell.cfg
import RosClientConfig
as ConfigType
30 self.
mm2name = rospy.get_param(
'~ip',
'192.168.0.5')
32 self.
rate_limit = rospy.get_param(
'~rate_limit', 100000000)
37 rospy.loginfo(
'mm2 hostname or ip = %s', self.
mm2name)
56 if random.randint(0, 1):
58 rospy.loginfo(
'A: Connected')
61 rospy.loginfo(
'A: Not connected')
63 if random.randint(0, 1):
65 rospy.loginfo(
'B: Connected')
68 rospy.loginfo(
'B: Not connected')
86 self.bnds.SetRateLimit(self.
band_number,
True, rate_limit_A)
87 self.bnds.SetRateLimit(self.
band_number,
False, rate_limit_B)
88 self.bnds.SetDelayReorder(self.
band_number,
True,
False)
89 self.bnds.SetDelayReorder(self.
band_number,
False,
False)
91 rospy.loginfo(
'round_trip = %s', self.
round_trip)
92 rospy.loginfo(
'rate_limit_A = %s', rate_limit_A)
93 rospy.loginfo(
'rate_limit_B = %s', rate_limit_B)
98 if __name__ ==
'__main__':
99 rospy.init_node(
'mini_maxwell_rondom_connection')
103 except rospy.ROSInterruptException:
pass def changeConnection(self, event)
def ChangeBandsOnMM(bandsobj, mm2host)
def GetCurrentBands(mm2name)
def reconfigure(self, config, level)