diff --git a/csharp/Mujoco.cs b/csharp/Mujoco.cs new file mode 100644 index 0000000..fad3ad3 --- /dev/null +++ b/csharp/Mujoco.cs @@ -0,0 +1,463 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: mujoco.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Reachy.Mujoco { + + /// Holder for reflection information generated from mujoco.proto + public static partial class MujocoReflection { + + #region Descriptor + /// File descriptor for mujoco.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MujocoReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CgxtdWpvY28ucHJvdG8SDXJlYWNoeS5tdWpvY28aG2dvb2dsZS9wcm90b2J1", + "Zi9lbXB0eS5wcm90bxoQa2luZW1hdGljcy5wcm90byJMChBNdWpvY29PYmpl", + "Y3RQb3NlEgwKBG5hbWUYASABKAkSKgoEcG9zZRgCIAEoCzIcLnJlYWNoeS5r", + "aW5lbWF0aWNzLk1hdHJpeDR4NCJEChJNdWpvY29PYmplY3RzUG9zZXMSLgoF", + "cG9zZXMYASADKAsyHy5yZWFjaHkubXVqb2NvLk11am9jb09iamVjdFBvc2Uy", + "XQoNTXVqb2NvU2VydmljZRJMCg9HZXRPYmplY3RzUG9zZXMSFi5nb29nbGUu", + "cHJvdG9idWYuRW1wdHkaIS5yZWFjaHkubXVqb2NvLk11am9jb09iamVjdHNQ", + "b3Nlc2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Reachy.Kinematics.KinematicsReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Reachy.Mujoco.MujocoObjectPose), global::Reachy.Mujoco.MujocoObjectPose.Parser, new[]{ "Name", "Pose" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Reachy.Mujoco.MujocoObjectsPoses), global::Reachy.Mujoco.MujocoObjectsPoses.Parser, new[]{ "Poses" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class MujocoObjectPose : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MujocoObjectPose()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Reachy.Mujoco.MujocoReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MujocoObjectPose() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MujocoObjectPose(MujocoObjectPose other) : this() { + name_ = other.name_; + pose_ = other.pose_ != null ? other.pose_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MujocoObjectPose Clone() { + return new MujocoObjectPose(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "pose" field. + public const int PoseFieldNumber = 2; + private global::Reachy.Kinematics.Matrix4x4 pose_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Reachy.Kinematics.Matrix4x4 Pose { + get { return pose_; } + set { + pose_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MujocoObjectPose); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MujocoObjectPose other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (!object.Equals(Pose, other.Pose)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (pose_ != null) hash ^= Pose.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (pose_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Pose); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (pose_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Pose); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (pose_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Pose); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MujocoObjectPose other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.pose_ != null) { + if (pose_ == null) { + Pose = new global::Reachy.Kinematics.Matrix4x4(); + } + Pose.MergeFrom(other.Pose); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (pose_ == null) { + Pose = new global::Reachy.Kinematics.Matrix4x4(); + } + input.ReadMessage(Pose); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (pose_ == null) { + Pose = new global::Reachy.Kinematics.Matrix4x4(); + } + input.ReadMessage(Pose); + break; + } + } + } + } + #endif + + } + + public sealed partial class MujocoObjectsPoses : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MujocoObjectsPoses()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Reachy.Mujoco.MujocoReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MujocoObjectsPoses() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MujocoObjectsPoses(MujocoObjectsPoses other) : this() { + poses_ = other.poses_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MujocoObjectsPoses Clone() { + return new MujocoObjectsPoses(this); + } + + /// Field number for the "poses" field. + public const int PosesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_poses_codec + = pb::FieldCodec.ForMessage(10, global::Reachy.Mujoco.MujocoObjectPose.Parser); + private readonly pbc::RepeatedField poses_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Poses { + get { return poses_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MujocoObjectsPoses); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MujocoObjectsPoses other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!poses_.Equals(other.poses_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= poses_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + poses_.WriteTo(output, _repeated_poses_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + poses_.WriteTo(ref output, _repeated_poses_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += poses_.CalculateSize(_repeated_poses_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MujocoObjectsPoses other) { + if (other == null) { + return; + } + poses_.Add(other.poses_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + poses_.AddEntriesFrom(input, _repeated_poses_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + poses_.AddEntriesFrom(ref input, _repeated_poses_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/protos/mujoco.proto b/protos/mujoco.proto new file mode 100644 index 0000000..f136c01 --- /dev/null +++ b/protos/mujoco.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +import "google/protobuf/empty.proto"; +import "kinematics.proto"; + +package reachy.mujoco; + +message MujocoObjectPose { + string name = 1; + kinematics.Matrix4x4 pose = 2; +} + +message MujocoObjectsPoses { + repeated MujocoObjectPose poses = 1; +} + +service MujocoService { + rpc GetObjectsPoses(google.protobuf.Empty) returns (MujocoObjectsPoses); +} diff --git a/python/reachy2_sdk_api/__init__.py b/python/reachy2_sdk_api/__init__.py index efbb7db..a52553c 100644 --- a/python/reachy2_sdk_api/__init__.py +++ b/python/reachy2_sdk_api/__init__.py @@ -4,4 +4,4 @@ sys.path.append(str(Path(__file__).parent)) -__version__ = "1.0.20" +__version__ = "1.0.21" diff --git a/python/reachy2_sdk_api/mujoco_pb2.py b/python/reachy2_sdk_api/mujoco_pb2.py new file mode 100644 index 0000000..3edbe83 --- /dev/null +++ b/python/reachy2_sdk_api/mujoco_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: mujoco.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +import kinematics_pb2 as kinematics__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cmujoco.proto\x12\rreachy.mujoco\x1a\x1bgoogle/protobuf/empty.proto\x1a\x10kinematics.proto\"L\n\x10MujocoObjectPose\x12\x0c\n\x04name\x18\x01 \x01(\t\x12*\n\x04pose\x18\x02 \x01(\x0b\x32\x1c.reachy.kinematics.Matrix4x4\"D\n\x12MujocoObjectsPoses\x12.\n\x05poses\x18\x01 \x03(\x0b\x32\x1f.reachy.mujoco.MujocoObjectPose2]\n\rMujocoService\x12L\n\x0fGetObjectsPoses\x12\x16.google.protobuf.Empty\x1a!.reachy.mujoco.MujocoObjectsPosesb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mujoco_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + _globals['_MUJOCOOBJECTPOSE']._serialized_start=78 + _globals['_MUJOCOOBJECTPOSE']._serialized_end=154 + _globals['_MUJOCOOBJECTSPOSES']._serialized_start=156 + _globals['_MUJOCOOBJECTSPOSES']._serialized_end=224 + _globals['_MUJOCOSERVICE']._serialized_start=226 + _globals['_MUJOCOSERVICE']._serialized_end=319 +# @@protoc_insertion_point(module_scope) diff --git a/python/reachy2_sdk_api/mujoco_pb2.pyi b/python/reachy2_sdk_api/mujoco_pb2.pyi new file mode 100644 index 0000000..239c030 --- /dev/null +++ b/python/reachy2_sdk_api/mujoco_pb2.pyi @@ -0,0 +1,54 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.message +import kinematics_pb2 +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing_extensions.final +class MujocoObjectPose(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + POSE_FIELD_NUMBER: builtins.int + name: builtins.str + @property + def pose(self) -> kinematics_pb2.Matrix4x4: ... + def __init__( + self, + *, + name: builtins.str = ..., + pose: kinematics_pb2.Matrix4x4 | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["pose", b"pose"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["name", b"name", "pose", b"pose"]) -> None: ... + +global___MujocoObjectPose = MujocoObjectPose + +@typing_extensions.final +class MujocoObjectsPoses(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + POSES_FIELD_NUMBER: builtins.int + @property + def poses(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MujocoObjectPose]: ... + def __init__( + self, + *, + poses: collections.abc.Iterable[global___MujocoObjectPose] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["poses", b"poses"]) -> None: ... + +global___MujocoObjectsPoses = MujocoObjectsPoses diff --git a/python/reachy2_sdk_api/mujoco_pb2_grpc.py b/python/reachy2_sdk_api/mujoco_pb2_grpc.py new file mode 100644 index 0000000..8fc455e --- /dev/null +++ b/python/reachy2_sdk_api/mujoco_pb2_grpc.py @@ -0,0 +1,67 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +import mujoco_pb2 as mujoco__pb2 + + +class MujocoServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetObjectsPoses = channel.unary_unary( + '/reachy.mujoco.MujocoService/GetObjectsPoses', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=mujoco__pb2.MujocoObjectsPoses.FromString, + ) + + +class MujocoServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetObjectsPoses(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_MujocoServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetObjectsPoses': grpc.unary_unary_rpc_method_handler( + servicer.GetObjectsPoses, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=mujoco__pb2.MujocoObjectsPoses.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'reachy.mujoco.MujocoService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class MujocoService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetObjectsPoses(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/reachy.mujoco.MujocoService/GetObjectsPoses', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + mujoco__pb2.MujocoObjectsPoses.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/python/reachy2_sdk_api/mujoco_pb2_grpc.pyi b/python/reachy2_sdk_api/mujoco_pb2_grpc.pyi new file mode 100644 index 0000000..d64dba0 --- /dev/null +++ b/python/reachy2_sdk_api/mujoco_pb2_grpc.pyi @@ -0,0 +1,42 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import abc +import collections.abc +import google.protobuf.empty_pb2 +import grpc +import grpc.aio +import mujoco_pb2 +import typing + +_T = typing.TypeVar('_T') + +class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): + ... + +class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore + ... + +class MujocoServiceStub: + def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ... + GetObjectsPoses: grpc.UnaryUnaryMultiCallable[ + google.protobuf.empty_pb2.Empty, + mujoco_pb2.MujocoObjectsPoses, + ] + +class MujocoServiceAsyncStub: + GetObjectsPoses: grpc.aio.UnaryUnaryMultiCallable[ + google.protobuf.empty_pb2.Empty, + mujoco_pb2.MujocoObjectsPoses, + ] + +class MujocoServiceServicer(metaclass=abc.ABCMeta): + @abc.abstractmethod + def GetObjectsPoses( + self, + request: google.protobuf.empty_pb2.Empty, + context: _ServicerContext, + ) -> typing.Union[mujoco_pb2.MujocoObjectsPoses, collections.abc.Awaitable[mujoco_pb2.MujocoObjectsPoses]]: ... + +def add_MujocoServiceServicer_to_server(servicer: MujocoServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...