Skip to content

Commit

Permalink
Automated Protos Update (#282)
Browse files Browse the repository at this point in the history
* [WORKFLOW] Updating protos from viamrobotics/api, commit: e67ef68fae6334f85b2c3a10e6c973ced0fec6d5

* Add unimplemented

---------

Co-authored-by: viambot <[email protected]>
Co-authored-by: Naveed Jooma <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2024
1 parent 5cf05dc commit a57b31e
Show file tree
Hide file tree
Showing 14 changed files with 742 additions and 7 deletions.
6 changes: 6 additions & 0 deletions lib/src/components/arm/service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,10 @@ class ArmService extends ArmServiceBase {
// TODO: implement getKinematics
throw UnimplementedError();
}

@override
Future<MoveThroughJointPositionsResponse> moveThroughJointPositions(ServiceCall call, MoveThroughJointPositionsRequest request) {
// TODO: implement moveThroughJointPositions
throw UnimplementedError();
}
}
11 changes: 11 additions & 0 deletions lib/src/gen/app/v1/app.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9753,6 +9753,7 @@ class ModuleFileInfo extends $pb.GeneratedMessage {
$core.String? moduleId,
$core.String? version,
$core.String? platform,
$core.Iterable<$core.String>? platformTags,
}) {
final $result = create();
if (moduleId != null) {
Expand All @@ -9764,6 +9765,9 @@ class ModuleFileInfo extends $pb.GeneratedMessage {
if (platform != null) {
$result.platform = platform;
}
if (platformTags != null) {
$result.platformTags.addAll(platformTags);
}
return $result;
}
ModuleFileInfo._() : super();
Expand All @@ -9774,6 +9778,7 @@ class ModuleFileInfo extends $pb.GeneratedMessage {
..aOS(1, _omitFieldNames ? '' : 'moduleId')
..aOS(2, _omitFieldNames ? '' : 'version')
..aOS(3, _omitFieldNames ? '' : 'platform')
..pPS(5, _omitFieldNames ? '' : 'platformTags')
..hasRequiredFields = false
;

Expand Down Expand Up @@ -9827,6 +9832,12 @@ class ModuleFileInfo extends $pb.GeneratedMessage {
$core.bool hasPlatform() => $_has(2);
@$pb.TagNumber(3)
void clearPlatform() => clearField(3);

/// Platform tag constraints. When a robot requests its config, it uploads a platform and a list of
/// platform tags. The platform is checked against `platform` above, and the tags are checked against
/// this list.
@$pb.TagNumber(5)
$core.List<$core.String> get platformTags => $_getList(3);
}

enum UploadModuleFileRequest_ModuleFile {
Expand Down
4 changes: 3 additions & 1 deletion lib/src/gen/app/v1/app.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2356,13 +2356,15 @@ const ModuleFileInfo$json = {
{'1': 'module_id', '3': 1, '4': 1, '5': 9, '10': 'moduleId'},
{'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'},
{'1': 'platform', '3': 3, '4': 1, '5': 9, '10': 'platform'},
{'1': 'platform_tags', '3': 5, '4': 3, '5': 9, '10': 'platformTags'},
],
};

/// Descriptor for `ModuleFileInfo`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List moduleFileInfoDescriptor = $convert.base64Decode(
'Cg5Nb2R1bGVGaWxlSW5mbxIbCgltb2R1bGVfaWQYASABKAlSCG1vZHVsZUlkEhgKB3ZlcnNpb2'
'4YAiABKAlSB3ZlcnNpb24SGgoIcGxhdGZvcm0YAyABKAlSCHBsYXRmb3Jt');
'4YAiABKAlSB3ZlcnNpb24SGgoIcGxhdGZvcm0YAyABKAlSCHBsYXRmb3JtEiMKDXBsYXRmb3Jt'
'X3RhZ3MYBSADKAlSDHBsYXRmb3JtVGFncw==');

@$core.Deprecated('Use uploadModuleFileRequestDescriptor instead')
const UploadModuleFileRequest$json = {
Expand Down
9 changes: 9 additions & 0 deletions lib/src/gen/app/v1/robot.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2787,6 +2787,7 @@ class AgentInfo extends $pb.GeneratedMessage {
$core.String? version,
$core.String? gitRevision,
$core.String? platform,
$core.Iterable<$core.String>? platformTags,
}) {
final $result = create();
if (host != null) {
Expand All @@ -2807,6 +2808,9 @@ class AgentInfo extends $pb.GeneratedMessage {
if (platform != null) {
$result.platform = platform;
}
if (platformTags != null) {
$result.platformTags.addAll(platformTags);
}
return $result;
}
AgentInfo._() : super();
Expand All @@ -2820,6 +2824,7 @@ class AgentInfo extends $pb.GeneratedMessage {
..aOS(4, _omitFieldNames ? '' : 'version')
..aOS(5, _omitFieldNames ? '' : 'gitRevision')
..aOS(6, _omitFieldNames ? '' : 'platform')
..pPS(7, _omitFieldNames ? '' : 'platformTags')
..hasRequiredFields = false
;

Expand Down Expand Up @@ -2894,6 +2899,10 @@ class AgentInfo extends $pb.GeneratedMessage {
$core.bool hasPlatform() => $_has(5);
@$pb.TagNumber(6)
void clearPlatform() => clearField(6);

/// Optional tags to further constrain which artifact is returned for modules.
@$pb.TagNumber(7)
$core.List<$core.String> get platformTags => $_getList(6);
}

class ConfigRequest extends $pb.GeneratedMessage {
Expand Down
5 changes: 3 additions & 2 deletions lib/src/gen/app/v1/robot.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ const AgentInfo$json = {
{'1': 'version', '3': 4, '4': 1, '5': 9, '10': 'version'},
{'1': 'git_revision', '3': 5, '4': 1, '5': 9, '10': 'gitRevision'},
{'1': 'platform', '3': 6, '4': 1, '5': 9, '9': 0, '10': 'platform', '17': true},
{'1': 'platform_tags', '3': 7, '4': 3, '5': 9, '10': 'platformTags'},
],
'8': [
{'1': '_platform'},
Expand All @@ -579,8 +580,8 @@ const AgentInfo$json = {
final $typed_data.Uint8List agentInfoDescriptor = $convert.base64Decode(
'CglBZ2VudEluZm8SEgoEaG9zdBgBIAEoCVIEaG9zdBIOCgJvcxgCIAEoCVICb3MSEAoDaXBzGA'
'MgAygJUgNpcHMSGAoHdmVyc2lvbhgEIAEoCVIHdmVyc2lvbhIhCgxnaXRfcmV2aXNpb24YBSAB'
'KAlSC2dpdFJldmlzaW9uEh8KCHBsYXRmb3JtGAYgASgJSABSCHBsYXRmb3JtiAEBQgsKCV9wbG'
'F0Zm9ybQ==');
'KAlSC2dpdFJldmlzaW9uEh8KCHBsYXRmb3JtGAYgASgJSABSCHBsYXRmb3JtiAEBEiMKDXBsYX'
'Rmb3JtX3RhZ3MYByADKAlSDHBsYXRmb3JtVGFnc0ILCglfcGxhdGZvcm0=');

@$core.Deprecated('Use configRequestDescriptor instead')
const ConfigRequest$json = {
Expand Down
195 changes: 193 additions & 2 deletions lib/src/gen/component/arm/v1/arm.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ class JointPositions extends $pb.GeneratedMessage {
static JointPositions? _defaultInstance;

/// A list of joint positions. Rotations values are in degrees, translational values in mm.
/// The numbers are ordered spatially from the base toward the end effector
/// This is used in GetJointPositionsResponse and MoveToJointPositionsRequest
/// There should be 1 entry in the list per joint DOF, ordered spatially from the base toward the end effector of the arm
@$pb.TagNumber(1)
$core.List<$core.double> get values => $_getList(0);
}
Expand Down Expand Up @@ -544,6 +543,132 @@ class MoveToJointPositionsResponse extends $pb.GeneratedMessage {
static MoveToJointPositionsResponse? _defaultInstance;
}

class MoveThroughJointPositionsRequest extends $pb.GeneratedMessage {
factory MoveThroughJointPositionsRequest({
$core.String? name,
$core.Iterable<JointPositions>? positions,
MoveOptions? options,
$43.Struct? extra,
}) {
final $result = create();
if (name != null) {
$result.name = name;
}
if (positions != null) {
$result.positions.addAll(positions);
}
if (options != null) {
$result.options = options;
}
if (extra != null) {
$result.extra = extra;
}
return $result;
}
MoveThroughJointPositionsRequest._() : super();
factory MoveThroughJointPositionsRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory MoveThroughJointPositionsRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MoveThroughJointPositionsRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.component.arm.v1'), createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'name')
..pc<JointPositions>(2, _omitFieldNames ? '' : 'positions', $pb.PbFieldType.PM, subBuilder: JointPositions.create)
..aOM<MoveOptions>(3, _omitFieldNames ? '' : 'options', subBuilder: MoveOptions.create)
..aOM<$43.Struct>(99, _omitFieldNames ? '' : 'extra', subBuilder: $43.Struct.create)
..hasRequiredFields = false
;

@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
MoveThroughJointPositionsRequest clone() => MoveThroughJointPositionsRequest()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
MoveThroughJointPositionsRequest copyWith(void Function(MoveThroughJointPositionsRequest) updates) => super.copyWith((message) => updates(message as MoveThroughJointPositionsRequest)) as MoveThroughJointPositionsRequest;

$pb.BuilderInfo get info_ => _i;

@$core.pragma('dart2js:noInline')
static MoveThroughJointPositionsRequest create() => MoveThroughJointPositionsRequest._();
MoveThroughJointPositionsRequest createEmptyInstance() => create();
static $pb.PbList<MoveThroughJointPositionsRequest> createRepeated() => $pb.PbList<MoveThroughJointPositionsRequest>();
@$core.pragma('dart2js:noInline')
static MoveThroughJointPositionsRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<MoveThroughJointPositionsRequest>(create);
static MoveThroughJointPositionsRequest? _defaultInstance;

/// Name of an arm
@$pb.TagNumber(1)
$core.String get name => $_getSZ(0);
@$pb.TagNumber(1)
set name($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasName() => $_has(0);
@$pb.TagNumber(1)
void clearName() => clearField(1);

/// A list of joint positions which will be moved to in the order they are specified
@$pb.TagNumber(2)
$core.List<JointPositions> get positions => $_getList(1);

/// optional specifications to be obeyed during the motion
@$pb.TagNumber(3)
MoveOptions get options => $_getN(2);
@$pb.TagNumber(3)
set options(MoveOptions v) { setField(3, v); }
@$pb.TagNumber(3)
$core.bool hasOptions() => $_has(2);
@$pb.TagNumber(3)
void clearOptions() => clearField(3);
@$pb.TagNumber(3)
MoveOptions ensureOptions() => $_ensure(2);

/// Additional arguments to the method
@$pb.TagNumber(99)
$43.Struct get extra => $_getN(3);
@$pb.TagNumber(99)
set extra($43.Struct v) { setField(99, v); }
@$pb.TagNumber(99)
$core.bool hasExtra() => $_has(3);
@$pb.TagNumber(99)
void clearExtra() => clearField(99);
@$pb.TagNumber(99)
$43.Struct ensureExtra() => $_ensure(3);
}

class MoveThroughJointPositionsResponse extends $pb.GeneratedMessage {
factory MoveThroughJointPositionsResponse() => create();
MoveThroughJointPositionsResponse._() : super();
factory MoveThroughJointPositionsResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory MoveThroughJointPositionsResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MoveThroughJointPositionsResponse', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.component.arm.v1'), createEmptyInstance: create)
..hasRequiredFields = false
;

@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
MoveThroughJointPositionsResponse clone() => MoveThroughJointPositionsResponse()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
MoveThroughJointPositionsResponse copyWith(void Function(MoveThroughJointPositionsResponse) updates) => super.copyWith((message) => updates(message as MoveThroughJointPositionsResponse)) as MoveThroughJointPositionsResponse;

$pb.BuilderInfo get info_ => _i;

@$core.pragma('dart2js:noInline')
static MoveThroughJointPositionsResponse create() => MoveThroughJointPositionsResponse._();
MoveThroughJointPositionsResponse createEmptyInstance() => create();
static $pb.PbList<MoveThroughJointPositionsResponse> createRepeated() => $pb.PbList<MoveThroughJointPositionsResponse>();
@$core.pragma('dart2js:noInline')
static MoveThroughJointPositionsResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<MoveThroughJointPositionsResponse>(create);
static MoveThroughJointPositionsResponse? _defaultInstance;
}

class StopRequest extends $pb.GeneratedMessage {
factory StopRequest({
$core.String? name,
Expand Down Expand Up @@ -826,6 +951,72 @@ class IsMovingResponse extends $pb.GeneratedMessage {
void clearIsMoving() => clearField(1);
}

class MoveOptions extends $pb.GeneratedMessage {
factory MoveOptions({
$core.double? maxVelDegsPerSec,
$core.double? maxAccDegsPerSec2,
}) {
final $result = create();
if (maxVelDegsPerSec != null) {
$result.maxVelDegsPerSec = maxVelDegsPerSec;
}
if (maxAccDegsPerSec2 != null) {
$result.maxAccDegsPerSec2 = maxAccDegsPerSec2;
}
return $result;
}
MoveOptions._() : super();
factory MoveOptions.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory MoveOptions.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);

static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'MoveOptions', package: const $pb.PackageName(_omitMessageNames ? '' : 'viam.component.arm.v1'), createEmptyInstance: create)
..a<$core.double>(1, _omitFieldNames ? '' : 'maxVelDegsPerSec', $pb.PbFieldType.OD)
..a<$core.double>(2, _omitFieldNames ? '' : 'maxAccDegsPerSec2', $pb.PbFieldType.OD)
..hasRequiredFields = false
;

@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
MoveOptions clone() => MoveOptions()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
MoveOptions copyWith(void Function(MoveOptions) updates) => super.copyWith((message) => updates(message as MoveOptions)) as MoveOptions;

$pb.BuilderInfo get info_ => _i;

@$core.pragma('dart2js:noInline')
static MoveOptions create() => MoveOptions._();
MoveOptions createEmptyInstance() => create();
static $pb.PbList<MoveOptions> createRepeated() => $pb.PbList<MoveOptions>();
@$core.pragma('dart2js:noInline')
static MoveOptions getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<MoveOptions>(create);
static MoveOptions? _defaultInstance;

/// Maximum allowable velocity of an arm joint, in degrees per second
@$pb.TagNumber(1)
$core.double get maxVelDegsPerSec => $_getN(0);
@$pb.TagNumber(1)
set maxVelDegsPerSec($core.double v) { $_setDouble(0, v); }
@$pb.TagNumber(1)
$core.bool hasMaxVelDegsPerSec() => $_has(0);
@$pb.TagNumber(1)
void clearMaxVelDegsPerSec() => clearField(1);

/// Maximum allowable acceleration of an arm joint, in degrees per second squared
@$pb.TagNumber(2)
$core.double get maxAccDegsPerSec2 => $_getN(1);
@$pb.TagNumber(2)
set maxAccDegsPerSec2($core.double v) { $_setDouble(1, v); }
@$pb.TagNumber(2)
$core.bool hasMaxAccDegsPerSec2() => $_has(1);
@$pb.TagNumber(2)
void clearMaxAccDegsPerSec2() => clearField(2);
}


const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
20 changes: 20 additions & 0 deletions lib/src/gen/component/arm/v1/arm.pbgrpc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class ArmServiceClient extends $grpc.Client {
'/viam.component.arm.v1.ArmService/MoveToJointPositions',
($13.MoveToJointPositionsRequest value) => value.writeToBuffer(),
($core.List<$core.int> value) => $13.MoveToJointPositionsResponse.fromBuffer(value));
static final _$moveThroughJointPositions = $grpc.ClientMethod<$13.MoveThroughJointPositionsRequest, $13.MoveThroughJointPositionsResponse>(
'/viam.component.arm.v1.ArmService/MoveThroughJointPositions',
($13.MoveThroughJointPositionsRequest value) => value.writeToBuffer(),
($core.List<$core.int> value) => $13.MoveThroughJointPositionsResponse.fromBuffer(value));
static final _$stop = $grpc.ClientMethod<$13.StopRequest, $13.StopResponse>(
'/viam.component.arm.v1.ArmService/Stop',
($13.StopRequest value) => value.writeToBuffer(),
Expand Down Expand Up @@ -81,6 +85,10 @@ class ArmServiceClient extends $grpc.Client {
return $createUnaryCall(_$moveToJointPositions, request, options: options);
}

$grpc.ResponseFuture<$13.MoveThroughJointPositionsResponse> moveThroughJointPositions($13.MoveThroughJointPositionsRequest request, {$grpc.CallOptions? options}) {
return $createUnaryCall(_$moveThroughJointPositions, request, options: options);
}

$grpc.ResponseFuture<$13.StopResponse> stop($13.StopRequest request, {$grpc.CallOptions? options}) {
return $createUnaryCall(_$stop, request, options: options);
}
Expand Down Expand Up @@ -135,6 +143,13 @@ abstract class ArmServiceBase extends $grpc.Service {
false,
($core.List<$core.int> value) => $13.MoveToJointPositionsRequest.fromBuffer(value),
($13.MoveToJointPositionsResponse value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$13.MoveThroughJointPositionsRequest, $13.MoveThroughJointPositionsResponse>(
'MoveThroughJointPositions',
moveThroughJointPositions_Pre,
false,
false,
($core.List<$core.int> value) => $13.MoveThroughJointPositionsRequest.fromBuffer(value),
($13.MoveThroughJointPositionsResponse value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$13.StopRequest, $13.StopResponse>(
'Stop',
stop_Pre,
Expand Down Expand Up @@ -188,6 +203,10 @@ abstract class ArmServiceBase extends $grpc.Service {
return moveToJointPositions(call, await request);
}

$async.Future<$13.MoveThroughJointPositionsResponse> moveThroughJointPositions_Pre($grpc.ServiceCall call, $async.Future<$13.MoveThroughJointPositionsRequest> request) async {
return moveThroughJointPositions(call, await request);
}

$async.Future<$13.StopResponse> stop_Pre($grpc.ServiceCall call, $async.Future<$13.StopRequest> request) async {
return stop(call, await request);
}
Expand All @@ -212,6 +231,7 @@ abstract class ArmServiceBase extends $grpc.Service {
$async.Future<$13.MoveToPositionResponse> moveToPosition($grpc.ServiceCall call, $13.MoveToPositionRequest request);
$async.Future<$13.GetJointPositionsResponse> getJointPositions($grpc.ServiceCall call, $13.GetJointPositionsRequest request);
$async.Future<$13.MoveToJointPositionsResponse> moveToJointPositions($grpc.ServiceCall call, $13.MoveToJointPositionsRequest request);
$async.Future<$13.MoveThroughJointPositionsResponse> moveThroughJointPositions($grpc.ServiceCall call, $13.MoveThroughJointPositionsRequest request);
$async.Future<$13.StopResponse> stop($grpc.ServiceCall call, $13.StopRequest request);
$async.Future<$13.IsMovingResponse> isMoving($grpc.ServiceCall call, $13.IsMovingRequest request);
$async.Future<$14.DoCommandResponse> doCommand($grpc.ServiceCall call, $14.DoCommandRequest request);
Expand Down
Loading

0 comments on commit a57b31e

Please sign in to comment.