def saved(): blobstore = Blobstore() config = ProgramdConfig() blobstore.read_protobuf_from_json_file( os.path.join(blobstore.bucket_relative_path(BUCKET_CONFIGURATIONS), 'programs.json'), config, ) return config
def saved(): blobstore = Blobstore() config = CameraPipelineConfig() blobstore.read_protobuf_from_json_file( os.path.join(blobstore.bucket_relative_path(BUCKET_CONFIGURATIONS), 'camera.json'), config, ) return config
def App(): parser = argparse.ArgumentParser() parser.add_argument('--result') args = parser.parse_args() result = CalibrateMultiViewApriltagRigResult() store = Blobstore() store.read_protobuf_from_json_file(args.result, result) model = MultiViewApriltagRigModel() store.read_protobuf_from_binary_file(result.multi_view_apriltag_rig_solved.path, model) print(json_format.MessageToJson(model.camera_rig))
from google.protobuf.timestamp_pb2 import Timestamp from farm_ng.core.blobstore import Blobstore from farm_ng.core.io_pb2 import Event from farm_ng.core.io_pb2 import LoggingCommand from farm_ng.core.ipc import get_event_bus from farm_ng.core.ipc import make_event from farm_ng.core.resource_pb2 import BUCKET_LOGS event_bus = get_event_bus('ipc-publisher') event_bus.add_subscriptions(['.*']) N_MESSAGES = 5 MESSAGE_NAME_PREFIX = 'ipc-publisher/status' ARCHIVE_NAME = 'default' BLOBSTORE = Blobstore() def start_logging(): event_bus.send( make_event( 'logger/command', LoggingCommand(record_start=LoggingCommand.RecordStart( archive_path=os.path.join( BLOBSTORE.bucket_relative_path(BUCKET_LOGS), ARCHIVE_NAME), ), ), ), ) async def run(): # TODO(isherman): WaitForServices instead