def __init__(self, channel='KINECT_FRAME', scale=1., extract_rgb=True, extract_depth=True, extract_X=True, bgr=True, every_k_frames=1): Decoder.__init__(self, channel=channel, every_k_frames=every_k_frames) self.skip = int(1.0 / scale); assert (self.skip >= 1) self.extract_rgb = extract_rgb self.extract_depth = extract_depth self.extract_X = extract_X self.bgr = bgr from kinect.frame_msg_t import frame_msg_t from kinect.image_msg_t import image_msg_t from kinect.depth_msg_t import depth_msg_t self.frame_msg_t_ = frame_msg_t self.image_msg_t_ = image_msg_t self.depth_msg_t_ = depth_msg_t # from openni.frame_msg_t import frame_msg_t as self.frame_msg_t_ # from openni.image_msg_t import image_msg_t as self.image_msg_t_ # from openni.depth_msg_t import depth_msg_t as self.depth_msg_t_ if self.extract_X: K = construct_K(**KinectDecoder.kinect_params) self.camera = DepthCamera(K=K, shape=(480,640), skip=self.skip)
def __init__(self, channel='/camera/rgb/image_raw', every_k_frames=1, scale=1., encoding='bgr8', compressed=False): Decoder.__init__(self, channel=channel, every_k_frames=every_k_frames) self.scale = scale self.encoding = encoding self.bridge = CvBridge() self.compressed = compressed
def __init__(self, channel='/scan', every_k_frames=1, range_min=0.0, range_max=np.inf): Decoder.__init__(self, channel=channel, every_k_frames=every_k_frames) self.angle_min_ = 0.0 self.angle_max_ = 0.0 self.range_min_ = range_min self.range_max_ = range_max self.cos_sin_map_ = np.array([[]])
def PoseStampedMsgDecoder(channel, every_k_frames=1): def odom_decode(data): tvec, ori = data.pose.position, data.pose.orientation return RigidTransform(xyzw=[ori.x, ori.y, ori.z, ori.w], tvec=[tvec.x, tvec.y, tvec.z]) return Decoder(channel=channel, every_k_frames=every_k_frames, decode_cb=lambda data: odom_decode(data))
def __init__(self, channel='CAMERA', scale=1., every_k_frames=1): Decoder.__init__(self, channel=channel, every_k_frames=every_k_frames) self.scale = scale
def __init__(self, channel='POSE', every_k_frames=1): Decoder.__init__(self, channel=channel, every_k_frames=every_k_frames)
def __init__(self, channel='MICROSTRAIN_INS'): Decoder.__init__(self, channel=channel) from microstrain import ins_t self.ins_t_decode_ = lambda data : ins_t.decode(data)
def __init__(self, channel='PARAM_UPDATE', every_k_frames=1): Decoder.__init__(self, channel=channel, every_k_frames=every_k_frames)
def __init__(self, channel='/camera/rgb/camera_info'): Decoder.__init__(self, channel=channel)
def __init__(self, every_k_frames=1): Decoder.__init__(self, channel='/gazebo/model_states', every_k_frames=every_k_frames) self.__gazebo_index = None
def __init__(self, channel='/tf', every_k_frames=1): Decoder.__init__(self, channel=channel, every_k_frames=every_k_frames) self.pub_ = None
def __init__(self, channel='/vehicle/sonar_cloud', every_k_frames=1, remove_nans=True): Decoder.__init__(self, channel=channel, every_k_frames=every_k_frames) self.remove_nans_ = remove_nans