Skip to content

Commit 843c7b2

Browse files
committed
track unity as well
1 parent 29e6cc0 commit 843c7b2

File tree

268 files changed

+29685
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+29685
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.resS filter=lfs diff=lfs merge=lfs -text

Protobuf/UnityStreamer.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
syntax = "proto3";
2+
3+
package unitystreamer;
4+
5+
service UnityStreamer{
6+
rpc StreamData(stream UnityData) returns (Received){}
7+
}
8+
9+
message UnityData {
10+
int32 width = 1;
11+
int32 height = 2;
12+
bytes image_data = 3;
13+
bytes depth_data = 4;
14+
int64 timestamp = 5;
15+
repeated int32 params =6;
16+
}
17+
18+
message Received{
19+
int64 timestamp = 1;
20+
}

Protobuf/notes.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
------------------------------
3+
1. build protobuf files in unity
4+
------------------------------
5+
cd /home/turgibot/UnityRoboticArmProject/Assets/Grpc/Protobuf
6+
./protoc -I . --csharp_out=. --grpc_out=. --plugin=protoc-gen-grpc=grpc_csharp_plugin UnityStreamer.proto
7+
------------------------------
8+
9+
10+
------------------------------
11+
2. build protobuf files for server in python
12+
------------------------------
13+
cd to UnityStreamer.proto location
14+
python -m grpc_tools.protoc -I . --python_out=. --grpc_python_out=. UnityStreamer.proto
15+
------------------------------

RoboticArm.py

Lines changed: 487 additions & 0 deletions
Large diffs are not rendered by default.

UnityStreamer_pb2.py

Lines changed: 171 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnityStreamer_pb2_grpc.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2+
"""Client and server classes corresponding to protobuf-defined services."""
3+
import grpc
4+
5+
import UnityStreamer_pb2 as UnityStreamer__pb2
6+
7+
8+
class UnityStreamerStub(object):
9+
"""Missing associated documentation comment in .proto file."""
10+
11+
def __init__(self, channel):
12+
"""Constructor.
13+
14+
Args:
15+
channel: A grpc.Channel.
16+
"""
17+
self.StreamData = channel.stream_unary(
18+
'/unitystreamer.UnityStreamer/StreamData',
19+
request_serializer=UnityStreamer__pb2.UnityData.SerializeToString,
20+
response_deserializer=UnityStreamer__pb2.Received.FromString,
21+
)
22+
23+
24+
class UnityStreamerServicer(object):
25+
"""Missing associated documentation comment in .proto file."""
26+
27+
def StreamData(self, request_iterator, context):
28+
"""Missing associated documentation comment in .proto file."""
29+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
30+
context.set_details('Method not implemented!')
31+
raise NotImplementedError('Method not implemented!')
32+
33+
34+
def add_UnityStreamerServicer_to_server(servicer, server):
35+
rpc_method_handlers = {
36+
'StreamData': grpc.stream_unary_rpc_method_handler(
37+
servicer.StreamData,
38+
request_deserializer=UnityStreamer__pb2.UnityData.FromString,
39+
response_serializer=UnityStreamer__pb2.Received.SerializeToString,
40+
),
41+
}
42+
generic_handler = grpc.method_handlers_generic_handler(
43+
'unitystreamer.UnityStreamer', rpc_method_handlers)
44+
server.add_generic_rpc_handlers((generic_handler,))
45+
46+
47+
# This class is part of an EXPERIMENTAL API.
48+
class UnityStreamer(object):
49+
"""Missing associated documentation comment in .proto file."""
50+
51+
@staticmethod
52+
def StreamData(request_iterator,
53+
target,
54+
options=(),
55+
channel_credentials=None,
56+
call_credentials=None,
57+
insecure=False,
58+
compression=None,
59+
wait_for_ready=None,
60+
timeout=None,
61+
metadata=None):
62+
return grpc.experimental.stream_unary(request_iterator, target, '/unitystreamer.UnityStreamer/StreamData',
63+
UnityStreamer__pb2.UnityData.SerializeToString,
64+
UnityStreamer__pb2.Received.FromString,
65+
options, channel_credentials,
66+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
11.7 KB
Binary file not shown.
11.6 KB
Binary file not shown.
3.13 KB
Binary file not shown.
2.99 KB
Binary file not shown.

0 commit comments

Comments
 (0)