34 import roslib; roslib.load_manifest(
'calibration_launch')
42 import message_filters
46 def __init__(self, chain_id, callback, *cb_args):
54 self.
_chain_sub = rospy.Subscriber(chain_id +
"/chain_state", sensor_msgs.msg.JointState, self.
callback)
58 if self.
_mode is "on":
60 m_msg = ChainMeasurement()
61 m_msg.header.stamp = msg.header.stamp
63 m_msg.chain_state = msg
78 def __init__(self, cam_id, callback, *cb_args):
98 if self.
_mode is "verbose":
100 msg = CameraMeasurement()
101 msg.header.stamp = cam_info.header.stamp
103 msg.image_points = features.image_points
104 msg.cam_info = cam_info
107 msg.image_rect = image_rect
108 msg.features = features
114 if self.
_mode is "minimal":
116 msg = CameraMeasurement()
117 msg.header.stamp = cam_info.header.stamp
119 msg.image_points = features.image_points
120 msg.cam_info = cam_info
128 self.
_mode =
"verbose" 130 self.
_mode =
"minimal" 165 def verbose_callback(self, snapshot, laser_image, image_features, joint_features, laser_duration):
167 if self.
_mode is "verbose":
169 msg = LaserMeasurement()
171 msg.joint_points = joint_features.joint_points
173 msg.snapshot = snapshot
174 msg.laser_image = laser_image
175 msg.image_features = image_features
176 msg.joint_features = joint_features
182 if self.
_mode is "minimal":
184 msg = LaserMeasurement()
186 msg.joint_points = joint_features.joint_points
194 self.
_mode =
"verbose" 196 self.
_mode =
"minimal"
def minimal_callback(self, joint_features, laser_duration)
def __init__(self, laser_id, callback, cb_args)
def minimal_callback(self, cam_info, features)
def verbose_callback(self, snapshot, laser_image, image_features, joint_features, laser_duration)
def __init__(self, cam_id, callback, cb_args)
def enable(self, verbose=False)
def verbose_callback(self, cam_info, features, image, image_rect)
def __init__(self, chain_id, callback, cb_args)
def enable(self, verbose=False)