Initial commit

This commit is contained in:
lgv 2025-11-13 03:01:00 +08:00
commit 05d98f7417
110 changed files with 7482 additions and 0 deletions

3
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

10
.idea/grpc_client.iml generated Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.10" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.8 (grpc_client)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/grpc_client.iml" filepath="$PROJECT_DIR$/.idea/grpc_client.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

Binary file not shown.

43
clients/base_client.py Normal file
View File

@ -0,0 +1,43 @@
import grpc
import time
import sys
sys.path.append("/home/lgv/cmvr/0-workspace/grpc_client/generated") # 指向 generated
sys.path.append("/home/lgv/cmvr/0-workspace/grpc_client/generated/cmvr") # 指向 cmvr 顶层
from cmvr.api import humanoid_robot_service_pb2_grpc
from cmvr.api import dexhand_service_pb2_grpc
class RobotClientBase:
def __init__(self, address="192.168.0.222:50052", timeout=2, retries=1):
self.address = address
self.timeout = timeout
self.retries = retries
self.channel = None
self.stub = None
print(f"Attempting to connect to gRPC server: {self.address}")
self._connect_with_retry()
def _connect_with_retry(self):
attempt = 0
while attempt <= self.retries:
print(f"Connecting... (Attempt {attempt + 1})")
try:
self.channel = grpc.insecure_channel(self.address)
grpc.channel_ready_future(self.channel).result(timeout=self.timeout)
self.stub = humanoid_robot_service_pb2_grpc.HumanoidRobotServiceStub(self.channel)
self.stub_hand = dexhand_service_pb2_grpc.DexHandServiceStub(self.channel)
print(f"Successfully connected to gRPC server: {self.address}")
return
except grpc.FutureTimeoutError:
attempt += 1
print(f"Connection timed out, attempt {attempt} failed")
if attempt > self.retries:
raise ConnectionError(
f"Failed to connect to gRPC server {self.address} after {self.retries} retries."
)
print(f"Waiting {self.timeout}s before retrying...")
time.sleep(self.timeout)
def close(self):
if self.channel:
self.channel.close()
print(f"Closed connection to gRPC server {self.address}")

165
clients/cal.py Normal file
View File

@ -0,0 +1,165 @@
import csv
import math
import sys
from google.protobuf import timestamp_pb2
sys.path.append("../generated")
import math
from typing import List, Dict, Literal
from generated.cmvr.api import humanoid_robot_command_pb2 as pb
from generated.cmvr.api import common_pb2
from generated.cmvr.api import humanoid_robot_service_pb2_grpc as rpc
from clients.base_client import RobotClientBase
class MoveJClient(RobotClientBase):
"""Client to send MoveJ commands to the robot"""
def send(self, joint_list, vel=1.0, acc=0.5, device_id="hc01"):
"""
joint_list: list of dicts, e.g.,
[
{"joint_name": "L_SHOULDER_P", "rad": 0.0},
{"joint_name": "L_SHOULDER_R", "rad": -1.31873},
...
]
vel: velocity
acc: acceleration
device_id: device ID
"""
# Construct JointCmd list
cmds = [pb.JointCmd(joint_name=j["joint_name"], rad=j["rad"], vel=vel) for j in joint_list]
# Construct request header
header = common_pb2.CommandHeader.Request()
header.device_id = device_id
ts = timestamp_pb2.Timestamp()
ts.GetCurrentTime()
header.timestamp.CopyFrom(ts)
# Construct MoveJ request
req = pb.MoveJ.Request(
header=header,
vel=vel,
acc=acc,
cmds=cmds
)
# Call RPC
try:
resp = self.stub.moveJ(req, timeout=10)
success = getattr(resp.header, "success", None)
error_msg = getattr(resp.header, "error_message", "")
timestamp_sec = getattr(resp.header.timestamp, "seconds", 0)
print("MoveJ RPC call succeeded")
print(f"Success: {success}")
print(f"Error message: {error_msg}")
print(f"Timestamp: {timestamp_sec}")
except Exception as e:
print("MoveJ RPC call failed:", e)
def read_joint_from_csv(self, file_name, row_num):
"""Read joint data from a CSV file and return joint list for the specified row."""
joint_order = [
'R_SHOULDER_P', 'R_SHOULDER_R', 'R_SHOULDER_Y',
'R_ELBOW_R', 'R_WRIST_P', 'R_WRIST_Y', 'R_WRIST_R'
]
try:
with open(file_name, newline='') as csvfile:
reader = csv.reader(csvfile)
# Skip header row
next(reader)
# Read specific row
for i, row in enumerate(reader, start=1):
if i == row_num:
# Assign joint values to the list
joint_list = [
{'joint_name': joint_order[j], 'rad': round(float(row[j]) * math.pi / 180, 10)}
for j in range(len(joint_order))
]
return joint_list
print(f"Row {row_num} not found.")
return []
except Exception as e:
print(f"Error reading CSV: {e}")
return []
def apply_joint_offsets(self,
joint_list: List[Dict[str, float]],
on_missing: Literal["ignore", "error", "warn"] = "ignore",
) -> List[Dict[str, float]]:
"""
将零偏置 joint_zero_offset 叠加到 joint_list joint_name 对齐
参数
joint_list: [{'joint_name': str, 'rad': float}, ...] 原始指令
joint_zero_offset: [{'joint_name': str, 'rad': float}, ...] 零偏置
on_missing: joint_list 中出现 zero_offset 里没有的关节名时的处理
- "ignore": 当作偏置为 0默认
- "warn": 打印警告再当作 0
- "error": 抛出 KeyError
返回
joint_list 顺序一致已叠加偏置的新列表
"""
# 构造偏置表,并检查是否有重复关节名
deg_to_rad = math.pi / 180.0
joint_zero_offset = [
{'joint_name': 'R_SHOULDER_P', 'rad': 0},
{'joint_name': 'R_SHOULDER_R', 'rad': 0 * deg_to_rad},
{'joint_name': 'R_SHOULDER_Y', 'rad': 0.2 * deg_to_rad},
{'joint_name': 'R_ELBOW_R', 'rad': 0.2 * deg_to_rad},
{'joint_name': 'R_WRIST_P', 'rad': 0.6 * deg_to_rad},
{'joint_name': 'R_WRIST_Y', 'rad': 2.5 * deg_to_rad},
{'joint_name': 'R_WRIST_R', 'rad': 0},
]
offset_map: Dict[str, float] = {}
for j in joint_zero_offset:
name = j["joint_name"]
if name in offset_map:
raise ValueError(f"Duplicated joint in zero_offset: {name}")
offset_map[name] = float(j["rad"])
joint_cmd: List[Dict[str, float]] = []
for j in joint_list:
name = j["joint_name"]
base = float(j["rad"])
if name not in offset_map:
if on_missing == "error":
raise KeyError(f"Missing zero offset for joint: {name}")
elif on_missing == "warn":
print(f"[apply_joint_offsets] WARN: Missing zero offset for {name}, using 0.0")
off = 0.0
else:
off = offset_map[name]
joint_cmd.append({"joint_name": name, "rad": base + off})
return joint_cmd
if __name__ == "__main__":
# Initialize client
client = MoveJClient()
# Specify CSV file and row number to read from
file_name = 'joint_states.csv'
row_num = 2 # Row number you want to read (e.g., 2 for the second row)
# Read joint data from CSV
joint_list = client.read_joint_from_csv(file_name, 8)
joint_list = client.apply_joint_offsets(joint_list)
print(joint_list)
if joint_list:
# Send MoveJ command with the read joint data
client.send(joint_list, vel=0.8, acc=0.8)
# Close client
client.close()

View File

@ -0,0 +1,80 @@
import sys
import time
from google.protobuf import timestamp_pb2
sys.path.append("../generated")
from generated.cmvr.api import humanoid_robot_service_pb2_grpc as rpc
from generated.cmvr.api import humanoid_robot_command_pb2 as pb
from clients.base_client import RobotClientBase
class GetJointStateClient(RobotClientBase):
"""Continuous client to fetch robot joint states"""
def send(self, interval=0.5, device_id="hc01"):
"""Continuously fetch joint states and print in fixed order"""
try:
while True:
# Construct request
req = pb.JointRequest()
req.header.device_id = device_id
timestamp = timestamp_pb2.Timestamp()
timestamp.GetCurrentTime()
req.header.timestamp.CopyFrom(timestamp)
# Call RPC with timeout
try:
resp = self.stub.getJointState(req, timeout=10)
except Exception as e:
print(f"RPC call failed: {e}")
time.sleep(interval)
continue
# Fixed order for printing
joint_order = [
"L_SHOULDER_P", "L_SHOULDER_R", "L_SHOULDER_Y",
"L_ELBOW_R", "L_WRIST_P", "L_WRIST_Y", "L_WRIST_R",
"R_SHOULDER_P", "R_SHOULDER_R", "R_SHOULDER_Y",
"R_ELBOW_R", "R_WRIST_P", "R_WRIST_Y", "R_WRIST_R",
"HEAD_P", "HEAD_Y","HEAD_R"
]
joint_order = [
"L_SHOULDER_P", "L_SHOULDER_R", "L_SHOULDER_Y",
"L_ELBOW_R", "L_WRIST_P", "L_WRIST_Y", "L_WRIST_R",
"R_WRIST_R","R_WRIST_Y", "R_WRIST_P", "R_ELBOW_R", "R_SHOULDER_Y","R_SHOULDER_R", "R_SHOULDER_P",
"HEAD_P", "HEAD_Y","HEAD_R"
]
# Map response to dictionary
joint_dict = {}
for state in resp.state:
for name, pos in zip(state.name, state.position):
joint_dict[name] = round(pos, 12)
joint_list = [{"joint_name": name, "rad": joint_dict.get(name, 0.0)}
for name in joint_order]
# Print timestamp
print(f"[{time.strftime('%H:%M:%S')}]")
# Print each joint, last one without comma
for i, j in enumerate(joint_list):
if i < len(joint_list) - 1:
print(f"{j},")
else:
print(f"{j}")
time.sleep(interval)
except KeyboardInterrupt:
print("\nStopped fetching joint states.")
if __name__ == "__main__":
client = GetJointStateClient()
try:
client.send(interval=0.5)
finally:
client.close()

View File

@ -0,0 +1,62 @@
import sys
import time
from google.protobuf import timestamp_pb2
sys.path.append("../generated")
from generated.cmvr.api import humanoid_robot_service_pb2_grpc as rpc
from generated.cmvr.api import humanoid_robot_command_pb2 as pb
from clients.base_client import RobotClientBase
class GetPoseClient(RobotClientBase):
"""Continuous client to fetch robot pose"""
def send(self, interval=0.5, device_id="hc01", base_link="PELVIS_S", ee_link="R_FINGER_TIP"):
"""Continuously fetch pose and print in a fixed order"""
try:
while True:
# Construct request
req = pb.GetPose.Request()
req.header.device_id = device_id
req.base_link = base_link
req.ee_link = ee_link
timestamp = timestamp_pb2.Timestamp()
timestamp.GetCurrentTime()
req.header.timestamp.CopyFrom(timestamp)
# Call RPC with timeout
try:
resp = self.stub.getPose(req, timeout=10)
except Exception as e:
print(f"RPC call failed: {e}")
time.sleep(interval)
continue
# Extract the pose information from the response
pose = resp.pose
pose_data = {
"x": round(pose.x, 6),
"y": round(pose.y, 6),
"z": round(pose.z, 6),
"rx": round(pose.rx, 6),
"ry": round(pose.ry, 6),
"rz": round(pose.rz, 6),
}
# Print timestamp
print(f"[{time.strftime('%H:%M:%S')}]")
# Print pose information
print(f"Pose: {pose_data}")
time.sleep(interval)
except KeyboardInterrupt:
print("\nStopped fetching pose.")
if __name__ == "__main__":
client = GetPoseClient()
try:
client.send(interval=0.5)
finally:
client.close()

111
clients/hand_client.py Normal file
View File

@ -0,0 +1,111 @@
import sys
from google.protobuf import timestamp_pb2
sys.path.append("../generated")
from generated.cmvr.api import dexhand_command_pb2 as pb
from generated.cmvr.api import common_pb2
from clients.base_client import RobotClientBase
handshake = [
{"id": 0, "value": 0.0},
{"id": 1, "value": 0.0},
{"id": 2, "value": 0.0},
{"id": 3, "value": 0.0},
{"id": 4, "value": 0.1},
{"id": 5, "value": 0.0},
]
hand_open = [
{"id": 0, "value": 0.8},
{"id": 1, "value": 0.8},
{"id": 2, "value": 0.8},
{"id": 3, "value": 0.8},
{"id": 4, "value": 0.8},
{"id": 5, "value": 1.0},
]
handshake_1 = [
{"id": 0, "value": 0.0},
{"id": 1, "value": 0.0},
{"id": 2, "value": 0.0},
{"id": 3, "value": 0.0},
]
hand_touch = [
{"id": 0, "value": 0},
{"id": 1, "value": 0},
{"id": 2, "value": 0},
{"id": 3, "value": 1.0},
{"id": 4, "value": 0.3},
{"id": 5, "value": 0.3},
]
class DexHandClient(RobotClientBase):
"""DexHand control client"""
def set_angles(self, angles: list, device_id="hc01"):
"""
angles: list of dicts, e.g.,
[
{"id": 0, "value": 0.5},
{"id": 1, "value": 0.8},
...
]
device_id: device ID
"""
# Construct request header
header = common_pb2.CommandHeader.Request()
header.device_id = device_id
ts = timestamp_pb2.Timestamp()
ts.GetCurrentTime()
header.timestamp.CopyFrom(ts)
# Construct FreedomValue list
values = [pb.FreedomValue(id=a["id"], value=a["value"]) for a in angles]
# Construct request
req = pb.SetDexHandAnglesCommand.Request(
header=header,
values=values
)
# Call RPC
try:
resp = self.stub_hand.SetDexHandAngle(req, timeout=10)
print("SetDexHandAngle RPC call succeeded")
print(f"Success: {resp.header.success}")
print(f"Error message: {resp.header.error_message}")
print(f"Timestamp: {resp.header.timestamp.seconds}")
except Exception as e:
print("SetDexHandAngle RPC call failed:", e)
if __name__ == "__main__":
# Initialize client
client = DexHandClient()
# Example: set finger angles
angles = [
{"id": 0, "value": 0.0},
{"id": 1, "value": 0.0},
{"id": 2, "value": 0.0},
{"id": 3, "value": 1.0},
]
# angles = [
#
# {"id": 4, "value": 0.0},
# {"id": 5, "value": 1.0},
#
# ]
# client.set_angles(hand_open, device_id="hand2")
client.set_angles(angles, device_id="hand2")
# client.set_angles(handshake, device_id="hand1")
# Close client
client.close()

51
clients/joint_states.csv Normal file
View File

@ -0,0 +1,51 @@
R_SHOULDER_P,R_SHOULDER_R,R_SHOULDER_Y,R_ELBOW_R,R_WRIST_P,R_WRIST_Y,R_WRIST_R
42.3871312049,94.4262521308,-69.8990748368,-35.2088867644,-16.7676098745,-5.0042133827,1.9505775177
38.4358423623,74.7161029078,-69.9082421615,-35.1792075506,-16.7656045222,16.3947289414,-3.6198327581
74.883406584,73.4828685496,-69.8867562442,-5.0052447067,-15.4131949426,15.065925223,14.4940560476
61.7429060315,50.3894035464,-69.9068670628,-20.3281415008,-15.3997877302,35.9769366887,1.1899187489
59.4242031304,67.0953058663,-69.8938609209,-21.9081872124,-15.423221704,19.7719713691,4.0812929663
90.7017399835,66.3198647864,-69.8943765829,7.3872594442,-15.469745877,18.6678816978,20.4932679373
43.3590395128,62.9293297379,-73.6622043394,-35.8108362239,-15.1957001636,20.2325721406,0
40.5923409116,88.5308028978,-73.6077160531,-31.2608064855,-11.9376329573,-4.7227192179,-12.7598273933
23.8609419698,84.6395600321,-73.65269324,-33.7536312605,-15.2801541426,-3.2523949241,-33.0631025258
17.1967552631,63.8605007466,-76.6419286488,-33.6005942334,-26.570975045,1.7080444831,-40.4801557753
112.3846401909,69.7356099778,-80.6124115775,39.6581332267,-8.4428768859,-0.4859828018,9.1025231955
-5.7770761525,76.506481426,-80.5607307844,-61.0971825964,0.409550232,5.9197426435,-25.0002685454
-8.8597036819,77.9207131517,-80.5670906159,-33.145436561,0.2532473454,5.9258159961,-61.5692425238
-36.6110290806,76.1685509185,-80.3678158947,-72.2165745265,11.1447166646,-0.0391903132,-52.2577616205
-35.3651323551,36.5073237197,-79.0065827651,-73.8037822106,52.7478124227,12.1613156805,-32.3100640957
-5.3251270437,44.1961881472,-81.8030751716,-71.2213468364,52.7241492657,10.7124200082,-8.0924558984
2.8886240199,76.6163747311,-84.1251585237,-69.7672372481,74.4535163503,7.928589969,-1.7550270223
10.4090961515,84.9616196088,-84.1484779059,-60.456730373,-18.5233817419,-21.8610327859,0
54.5989244672,82.6571833568,-84.1363312007,-15.5816445344,-18.5294550945,-10.4057729963,-7.731091417
81.1793533158,80.2358637145,-84.1327788623,11.5328382751,-18.4099360985,-10.3396536667,-3.3667000042
38.2612048264,74.9317069261,-84.1652082735,-34.3789573981,-32.3599687196,0,0
45.9865093697,73.6787628197,-42.7689502796,-25.1068959911,21.0002209945,17.5849341693,12.4229855056
22.7002440684,64.4069878916,-62.7950857265,-31.455039178,7.9418825899,33.6965073683,-22.0264457013
-7.8064353671,69.4039247102,-64.5624886372,-46.9387079294,5.7706590252,20.9282574954,-42.2467565451
-2.1254442368,74.2813998286,-71.1825002979,-13.416838097,-4.5865844458,22.1780503339,-61.8393921242
5.4559906041,77.0098821448,-71.1713849167,-48.8421310206,0.1305770815,11.0492046002,-28.0768227221
8.1414437899,69.7912441798,-109.3110080989,-62.2787361616,26.0631052554,-26.4386790901,-18.1101072843
8.1236820983,39.0906758264,-91.0631617607,-54.527763109,26.2233042549,12.5954458019,-19.292806765
11.0263435842,28.5577634954,-91.6200194418,-56.0312616592,24.2097586755,5.6390506197,0
36.628332406,62.8089513052,-98.8949218623,-43.4181687572,24.2570276936,2.887306217,-1.8566697351
24.7188316764,87.9824822878,-99.1789943371,-41.2523309958,-8.5307113159,-24.3634832519,-10.7646737591
72.4000929083,79.991210736,-99.1548155182,0.9364995161,-8.3708560911,-10.9260186742,-2.1646918458
23.3924916765,86.2120999966,-73.4446522646,-46.4581109308,6.0181194969,8.9699407617,-2.1167925741
30.0970719078,53.0039818529,-97.8485290411,-46.4597152127,5.9310872079,8.2670934344,-8.9634663386
29.1964395496,32.4169207245,-113.7501132082,-48.2284359262,0.5494665255,3.410932346,-18.0847825497
47.142795496,53.1601701478,-116.6299136781,-33.5294328753,-21.6354593019,-0.8102196181,-14.3094490461
52.5930565222,86.0146587404,-67.4882403222,-27.2043225917,-5.4967279034,-0.6699022541,-2.348095636
5.689127131,79.3010830718,-87.5470343635,-64.8126993063,-6.6456228742,-13.3742673328,-10.9887575528
-36.490879831,85.2079914607,-76.8147327198,-59.0912000599,3.7261737249,-13.9641273829,-40.7579257144
-43.7821688445,66.2628554858,-75.3971778389,-55.7114939138,2.5531572309,-13.9655024816,-48.4137304772
-18.0355654751,62.0254315203,-77.0001418623,-56.2921293434,-15.9961794991,-23.3165747686,-20.1152876799
-25.9848392206,67.5677668642,-69.5084322121,-71.3935206538,20.9554156949,11.0399799797,-15.5277865016
-34.3248128865,59.3506353495,-64.9300983585,-78.7725868015,26.2126472399,7.4840320158,-12.2919500578
-26.2237053253,93.5622317757,-72.0755123174,-77.1128999564,26.2140796344,12.1362201291,-17.8720433204
43.6226573943,57.1218295265,-87.7357093655,-23.230974874,23.3228773044,17.0774654501,-0.0433729051
20.543000674,69.8960954563,-85.5268997694,-25.9198658066,77.8772256551,22.5696096911,-8.9078321367
-0.940166446,22.5041779109,-94.648101389,-58.6892701666,70.7468231905,20.9154232408,-8.9639247048
0.1180293058,33.0162345782,-92.8632805614,-67.671758704,61.8440903782,13.0295759233,0
41.6477291703,62.5570217627,-96.0662292278,-22.0864916783,52.5155926283,11.0115039773,-3.3080864217
-9.3205909323,58.9835412902,-86.0922372259,-65.5880830905,52.532036517,11.5678459964,-14.0276111066
1 R_SHOULDER_P R_SHOULDER_R R_SHOULDER_Y R_ELBOW_R R_WRIST_P R_WRIST_Y R_WRIST_R
2 42.3871312049 94.4262521308 -69.8990748368 -35.2088867644 -16.7676098745 -5.0042133827 1.9505775177
3 38.4358423623 74.7161029078 -69.9082421615 -35.1792075506 -16.7656045222 16.3947289414 -3.6198327581
4 74.883406584 73.4828685496 -69.8867562442 -5.0052447067 -15.4131949426 15.065925223 14.4940560476
5 61.7429060315 50.3894035464 -69.9068670628 -20.3281415008 -15.3997877302 35.9769366887 1.1899187489
6 59.4242031304 67.0953058663 -69.8938609209 -21.9081872124 -15.423221704 19.7719713691 4.0812929663
7 90.7017399835 66.3198647864 -69.8943765829 7.3872594442 -15.469745877 18.6678816978 20.4932679373
8 43.3590395128 62.9293297379 -73.6622043394 -35.8108362239 -15.1957001636 20.2325721406 0
9 40.5923409116 88.5308028978 -73.6077160531 -31.2608064855 -11.9376329573 -4.7227192179 -12.7598273933
10 23.8609419698 84.6395600321 -73.65269324 -33.7536312605 -15.2801541426 -3.2523949241 -33.0631025258
11 17.1967552631 63.8605007466 -76.6419286488 -33.6005942334 -26.570975045 1.7080444831 -40.4801557753
12 112.3846401909 69.7356099778 -80.6124115775 39.6581332267 -8.4428768859 -0.4859828018 9.1025231955
13 -5.7770761525 76.506481426 -80.5607307844 -61.0971825964 0.409550232 5.9197426435 -25.0002685454
14 -8.8597036819 77.9207131517 -80.5670906159 -33.145436561 0.2532473454 5.9258159961 -61.5692425238
15 -36.6110290806 76.1685509185 -80.3678158947 -72.2165745265 11.1447166646 -0.0391903132 -52.2577616205
16 -35.3651323551 36.5073237197 -79.0065827651 -73.8037822106 52.7478124227 12.1613156805 -32.3100640957
17 -5.3251270437 44.1961881472 -81.8030751716 -71.2213468364 52.7241492657 10.7124200082 -8.0924558984
18 2.8886240199 76.6163747311 -84.1251585237 -69.7672372481 74.4535163503 7.928589969 -1.7550270223
19 10.4090961515 84.9616196088 -84.1484779059 -60.456730373 -18.5233817419 -21.8610327859 0
20 54.5989244672 82.6571833568 -84.1363312007 -15.5816445344 -18.5294550945 -10.4057729963 -7.731091417
21 81.1793533158 80.2358637145 -84.1327788623 11.5328382751 -18.4099360985 -10.3396536667 -3.3667000042
22 38.2612048264 74.9317069261 -84.1652082735 -34.3789573981 -32.3599687196 0 0
23 45.9865093697 73.6787628197 -42.7689502796 -25.1068959911 21.0002209945 17.5849341693 12.4229855056
24 22.7002440684 64.4069878916 -62.7950857265 -31.455039178 7.9418825899 33.6965073683 -22.0264457013
25 -7.8064353671 69.4039247102 -64.5624886372 -46.9387079294 5.7706590252 20.9282574954 -42.2467565451
26 -2.1254442368 74.2813998286 -71.1825002979 -13.416838097 -4.5865844458 22.1780503339 -61.8393921242
27 5.4559906041 77.0098821448 -71.1713849167 -48.8421310206 0.1305770815 11.0492046002 -28.0768227221
28 8.1414437899 69.7912441798 -109.3110080989 -62.2787361616 26.0631052554 -26.4386790901 -18.1101072843
29 8.1236820983 39.0906758264 -91.0631617607 -54.527763109 26.2233042549 12.5954458019 -19.292806765
30 11.0263435842 28.5577634954 -91.6200194418 -56.0312616592 24.2097586755 5.6390506197 0
31 36.628332406 62.8089513052 -98.8949218623 -43.4181687572 24.2570276936 2.887306217 -1.8566697351
32 24.7188316764 87.9824822878 -99.1789943371 -41.2523309958 -8.5307113159 -24.3634832519 -10.7646737591
33 72.4000929083 79.991210736 -99.1548155182 0.9364995161 -8.3708560911 -10.9260186742 -2.1646918458
34 23.3924916765 86.2120999966 -73.4446522646 -46.4581109308 6.0181194969 8.9699407617 -2.1167925741
35 30.0970719078 53.0039818529 -97.8485290411 -46.4597152127 5.9310872079 8.2670934344 -8.9634663386
36 29.1964395496 32.4169207245 -113.7501132082 -48.2284359262 0.5494665255 3.410932346 -18.0847825497
37 47.142795496 53.1601701478 -116.6299136781 -33.5294328753 -21.6354593019 -0.8102196181 -14.3094490461
38 52.5930565222 86.0146587404 -67.4882403222 -27.2043225917 -5.4967279034 -0.6699022541 -2.348095636
39 5.689127131 79.3010830718 -87.5470343635 -64.8126993063 -6.6456228742 -13.3742673328 -10.9887575528
40 -36.490879831 85.2079914607 -76.8147327198 -59.0912000599 3.7261737249 -13.9641273829 -40.7579257144
41 -43.7821688445 66.2628554858 -75.3971778389 -55.7114939138 2.5531572309 -13.9655024816 -48.4137304772
42 -18.0355654751 62.0254315203 -77.0001418623 -56.2921293434 -15.9961794991 -23.3165747686 -20.1152876799
43 -25.9848392206 67.5677668642 -69.5084322121 -71.3935206538 20.9554156949 11.0399799797 -15.5277865016
44 -34.3248128865 59.3506353495 -64.9300983585 -78.7725868015 26.2126472399 7.4840320158 -12.2919500578
45 -26.2237053253 93.5622317757 -72.0755123174 -77.1128999564 26.2140796344 12.1362201291 -17.8720433204
46 43.6226573943 57.1218295265 -87.7357093655 -23.230974874 23.3228773044 17.0774654501 -0.0433729051
47 20.543000674 69.8960954563 -85.5268997694 -25.9198658066 77.8772256551 22.5696096911 -8.9078321367
48 -0.940166446 22.5041779109 -94.648101389 -58.6892701666 70.7468231905 20.9154232408 -8.9639247048
49 0.1180293058 33.0162345782 -92.8632805614 -67.671758704 61.8440903782 13.0295759233 0
50 41.6477291703 62.5570217627 -96.0662292278 -22.0864916783 52.5155926283 11.0115039773 -3.3080864217
51 -9.3205909323 58.9835412902 -86.0922372259 -65.5880830905 52.532036517 11.5678459964 -14.0276111066

116
clients/movej_client.py Normal file
View File

@ -0,0 +1,116 @@
import sys
from google.protobuf import timestamp_pb2
sys.path.append("../generated")
from generated.cmvr.api import humanoid_robot_command_pb2 as pb
from generated.cmvr.api import common_pb2
from generated.cmvr.api import humanoid_robot_service_pb2_grpc as rpc
from clients.base_client import RobotClientBase
import math
from typing import List, Dict, Literal
class MoveJClient(RobotClientBase):
"""Client to send MoveJ commands to the robot"""
def send(self, joint_list, vel=1.0, acc=0.5, device_id="hc01"):
"""
joint_list: list of dicts, e.g.,
[
{"joint_name": "L_SHOULDER_P", "rad": 0.0},
{"joint_name": "L_SHOULDER_R", "rad": -1.31873},
...
]
vel: velocity
acc: acceleration
device_id: device ID
"""
# Construct JointCmd list
cmds = [pb.JointCmd(joint_name=j["joint_name"], rad=j["rad"], vel=vel) for j in joint_list]
# Construct request header
header = common_pb2.CommandHeader.Request()
header.device_id = device_id
ts = timestamp_pb2.Timestamp()
ts.GetCurrentTime()
header.timestamp.CopyFrom(ts)
# Construct MoveJ request
req = pb.MoveJ.Request(
header=header,
vel=vel,
acc=acc,
cmds=cmds
)
# Call RPC
try:
resp = self.stub.moveJ(req, timeout=10)
success = getattr(resp.header, "success", None)
error_msg = getattr(resp.header, "error_message", "")
timestamp_sec = getattr(resp.header.timestamp, "seconds", 0)
print("MoveJ RPC call succeeded")
print(f"Success: {success}")
print(f"Error message: {error_msg}")
print(f"Timestamp: {timestamp_sec}")
except Exception as e:
print("MoveJ RPC call failed:", e)
if __name__ == "__main__":
# Initialize client
client = MoveJClient()
end_joint_list = [
{'joint_name': 'R_WRIST_R', 'rad': 0.32396421236},
{'joint_name': 'R_WRIST_Y', 'rad': 0.098841140792},
{'joint_name': 'R_WRIST_P', 'rad': -17.626296421526},
{'joint_name': 'R_ELBOW_R', 'rad': 1.502654735917},
{'joint_name': 'R_SHOULDER_Y', 'rad': -4.76186081004},
{'joint_name': 'R_SHOULDER_R', 'rad': -0.484371520195},
{'joint_name': 'R_SHOULDER_P', 'rad': 0.154464081527},
]
start_joint_list = [
{'joint_name': 'R_WRIST_R', 'rad': 0.315772223376},
{'joint_name': 'R_WRIST_Y', 'rad': 0.08855986238},
{'joint_name': 'R_WRIST_P', 'rad': -17.291334250373},
{'joint_name': 'R_ELBOW_R', 'rad': 1.66502982975},
{'joint_name': 'R_SHOULDER_Y', 'rad': -4.758606796339},
{'joint_name': 'R_SHOULDER_R', 'rad': -0.830841394993},
{'joint_name': 'R_SHOULDER_P', 'rad': -0.007418353872},
]
# client.send(start_joint_list, vel=2.0, acc=1.0)
while True:
client.send(start_joint_list, vel=2.0, acc=1.0)
client.send(end_joint_list, vel=1.5, acc=1.5)
# client.send(end_joint_list, vel=1.5, acc=1.5)
# Send MoveJ command
# client.send(start, vel=0.8, acc=0.8)
# client.send(end, vel=0.8, acc=0.8)
# client.send(left_arm, vel=head_speed, acc=0.8)
# while True:
# client.send(action_hello_start, vel=5.0, acc=0.8)
# client.send(action_hello_end, vel=5.0, acc=0.8)
# client.send(action_touch_start, vel=1.5, acc=0.8)
# client.send(action_touch_set, vel=1.5, acc=0.8)
# client.send(action_touch_start, vel=1.5, acc=0.8)
# client.send(head_dd, vel=1.5, acc=0.8)
# client.send(joint_list, vel=1.0, acc=0.8)
# while True:
# client.send(action_hello_start,vel=5.0, acc=0.8)
# client.send(action_hello_end,vel=5.0, acc=0.8)
# client.send(action_hello_start, vel=5.0, acc=0.8)
# Close client
client.close()

53
clients/press_client.py Normal file
View File

@ -0,0 +1,53 @@
import sys
from google.protobuf import timestamp_pb2
sys.path.append("../generated")
from generated.cmvr.api import hlc_command_pb2 as pb
from clients.base_client import RobotClientBase
class TouchClient(RobotClientBase):
"""Client to send Touch commands"""
def send(self, u: int, v: int, max_force: int, device_id="hc01"):
"""
u, v: target coordinates
max_force: maximum touch force
device_id: device ID
"""
# Construct request
req = pb.Touch.Request()
req.header.device_id = device_id
ts = timestamp_pb2.Timestamp()
ts.GetCurrentTime()
req.header.timestamp.CopyFrom(ts)
req.u = u
req.v = v
req.max_force = max_force
# Call RPC
try:
resp = self.stub.touch(req, timeout=self.timeout)
success = getattr(resp.header, "success", None)
error_msg = getattr(resp.header, "error_message", "")
timestamp_sec = getattr(resp.header.timestamp, "seconds", 0)
print("Touch RPC call succeeded")
print(f"Success: {success}")
print(f"Error message: {error_msg}")
print(f"Timestamp: {timestamp_sec}")
except Exception as e:
print("Touch RPC call failed:", e)
if __name__ == "__main__":
# Initialize client
client = TouchClient()
# Send Touch command
client.send(u=12, v=13, max_force=1300, device_id="hc01")
# Close client
client.close()

View File

@ -0,0 +1,71 @@
import sys
import csv
import math
from google.protobuf import timestamp_pb2
sys.path.append("../generated")
from generated.cmvr.api import humanoid_robot_service_pb2_grpc as rpc
from generated.cmvr.api import humanoid_robot_command_pb2 as pb
from clients.base_client import RobotClientBase
class GetJointStateClient(RobotClientBase):
"""客户端获取机械臂关节数据并保存到CSV"""
def fetch_and_save_joint_states(self, device_id="hc01"):
"""获取关节数据一次并保存到CSV文件"""
try:
# 构建请求
req = pb.JointRequest()
req.header.device_id = device_id
timestamp = timestamp_pb2.Timestamp()
timestamp.GetCurrentTime()
req.header.timestamp.CopyFrom(timestamp)
# 调用RPC获取数据
try:
resp = self.stub.getJointState(req, timeout=10)
except Exception as e:
print(f"RPC调用失败: {e}")
return
# 定义需要保存的关节名称
joint_order = [
"R_SHOULDER_P", "R_SHOULDER_R", "R_SHOULDER_Y",
"R_ELBOW_R", "R_WRIST_P", "R_WRIST_Y", "R_WRIST_R"
]
# 将响应数据映射到字典
joint_dict = {}
for state in resp.state:
for name, pos in zip(state.name, state.position):
joint_dict[name] = round(pos, 6)
# 将角度从弧度转换为度
joint_list = [{"joint_name": name, "deg": round(joint_dict.get(name, 0.0) * 180 / math.pi, 10)}
for name in joint_order]
# 准备保存到CSV的数据行
data_row = [joint['deg'] for joint in joint_list]
# 以追加模式打开CSV文件并写入数据
with open("joint_states_10_23.csv", mode="a", newline="") as file:
writer = csv.writer(file)
# 如果文件为空,写入表头
if file.tell() == 0:
writer.writerow(joint_order) # 表头
writer.writerow(data_row) # 写入数据行
print(f"数据已保存: {data_row}")
except KeyboardInterrupt:
print("\n停止获取关节数据。")
if __name__ == "__main__":
client = GetJointStateClient()
try:
client.fetch_and_save_joint_states()
finally:
client.close()

5
clients/test.py Normal file
View File

@ -0,0 +1,5 @@
from google.protobuf import timestamp_pb2
timestamp = timestamp_pb2.Timestamp()
timestamp.GetCurrentTime()
print(timestamp)

View File

@ -0,0 +1,80 @@
import sys
import tty
import termios
from google.protobuf import timestamp_pb2
# sys.path.append("../generated")
sys.path.append("/home/lgv/cmvr/0-workspace/grpc_client/generated") # 指向 generated
sys.path.append("/home/lgv/cmvr/0-workspace/grpc_client/generated/cmvr") # 指向 cmvr 顶层
from cmvr.api import humanoid_robot_service_pb2_grpc as rpc
from cmvr.api import humanoid_robot_command_pb2 as pb
from cmvr.api import common_pb2
from base_client import RobotClientBase
class TorqueClient(RobotClientBase):
"""Client to control torque: on/off"""
def torque_on(self, device_id="hc01"):
req = common_pb2.CommandHeader.Request()
req.device_id = device_id
ts = timestamp_pb2.Timestamp()
ts.GetCurrentTime()
req.timestamp.CopyFrom(ts)
try:
resp = self.stub.torqueOn(req, timeout=self.timeout)
print("TorqueOn RPC call succeeded")
print(f"Success: {resp.success}")
print(f"Error message: {resp.error_message}")
print(f"Timestamp: {resp.timestamp.seconds}")
except Exception as e:
print("TorqueOn RPC call failed:", e)
def torque_off(self, device_id="hc01"):
req = common_pb2.CommandHeader.Request()
req.device_id = device_id
ts = timestamp_pb2.Timestamp()
ts.GetCurrentTime()
req.timestamp.CopyFrom(ts)
try:
resp = self.stub.torqueOff(req, timeout=self.timeout)
print("TorqueOff RPC call succeeded")
print(f"Success: {resp.success}")
print(f"Error message: {resp.error_message}")
print(f"Timestamp: {resp.timestamp.seconds}")
except Exception as e:
print("TorqueOff RPC call failed:", e)
def get_single_key():
"""Read a single key from stdin without Enter"""
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
tty.setraw(fd)
ch = sys.stdin.read(1)
finally:
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
return ch
if __name__ == "__main__":
client = TorqueClient()
print("Press 'o' for TorqueOn, 'p' for TorqueOff, 'q' to quit.")
try:
while True:
key = get_single_key()
if key.lower() == 'o':
client.torque_on()
elif key.lower() == 'p':
client.torque_off()
elif key.lower() == 'q':
print("Exiting.")
break
finally:
client.close()

View File

@ -0,0 +1,42 @@
import sys
from google.protobuf import timestamp_pb2
sys.path.append("../generated")
from generated.cmvr.api import humanoid_robot_service_pb2_grpc as rpc
from generated.cmvr.api import humanoid_robot_command_pb2 as pb
from generated.cmvr.api import common_pb2
from clients.base_client import RobotClientBase
class TorqueOffClient(RobotClientBase):
"""Client to send TorqueOff command"""
def send(self, device_id="hc01"):
# Construct request header
req = common_pb2.CommandHeader.Request()
req.device_id = device_id
ts = timestamp_pb2.Timestamp()
ts.GetCurrentTime()
req.timestamp.CopyFrom(ts)
# Call RPC
try:
resp = self.stub.torqueOff(req, timeout=10)
print("TorqueOff RPC call succeeded")
print(f"Success: {resp.success}")
print(f"Error message: {resp.error_message}")
print(f"Timestamp: {resp.timestamp.seconds}")
except Exception as e:
print("TorqueOff RPC call failed:", e)
if __name__ == "__main__":
# Initialize client
client = TorqueOffClient()
# Send TorqueOff command
client.send(device_id="hc01")
# Close client
client.close()

View File

@ -0,0 +1,42 @@
import sys
from google.protobuf import timestamp_pb2
sys.path.append("../generated")
from generated.cmvr.api import humanoid_robot_service_pb2_grpc as rpc
from generated.cmvr.api import humanoid_robot_command_pb2 as pb
from generated.cmvr.api import common_pb2
from clients.base_client import RobotClientBase
class TorqueOnClient(RobotClientBase):
"""发送 TorqueOn 指令客户端"""
def send(self, device_id="hc01"):
# 构造请求头
req = common_pb2.CommandHeader.Request()
req.device_id = device_id
ts = timestamp_pb2.Timestamp()
ts.GetCurrentTime()
req.timestamp.CopyFrom(ts)
# 调用 RPC
try:
resp = self.stub.torqueOn(req, timeout=10)
print("✅ TorqueOn RPC 调用成功")
print(f"Success: {resp.success}")
print(f"Error message: {resp.error_message}")
print(f"Timestamp: {resp.timestamp.seconds}")
except Exception as e:
print("❌ TorqueOn RPC 调用失败:", e)
if __name__ == "__main__":
# 初始化客户端
client = TorqueOnClient()
# 发送 TorqueOn 指令
client.send(device_id="hc01")
# 关闭客户端
client.close()

0
generated/__init__.py Normal file
View File

Binary file not shown.

View File

View File

Binary file not shown.

View File

View File

View File

@ -0,0 +1,251 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/biohead_command.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x63mvr/api/biohead_command.proto\x12\x08\x63mvr.api\x1a\x15\x63mvr/api/common.proto\"\xdd\x08\n\x10\x46\x61\x63ialExpression\x12\x33\n\x07\x65yebrow\x18\x03 \x01(\x0b\x32\".cmvr.api.FacialExpression.Eyebrow\x12\x31\n\x06\x65yelid\x18\x04 \x01(\x0b\x32!.cmvr.api.FacialExpression.Eyelid\x12\x33\n\x07\x65yeball\x18\x05 \x01(\x0b\x32\".cmvr.api.FacialExpression.Eyeball\x12-\n\x04nose\x18\x06 \x01(\x0b\x32\x1f.cmvr.api.FacialExpression.Nose\x12/\n\x05mouth\x18\x07 \x01(\x0b\x32 .cmvr.api.FacialExpression.Mouth\x12+\n\x03jaw\x18\x08 \x01(\x0b\x32\x1e.cmvr.api.FacialExpression.Jaw\x1ai\n\x07\x45yebrow\x12\x16\n\x0eleft_outside_y\x18\x01 \x01(\x02\x12\x15\n\rleft_inside_y\x18\x02 \x01(\x02\x12\x17\n\x0fright_outside_y\x18\x03 \x01(\x02\x12\x16\n\x0eright_inside_y\x18\x04 \x01(\x02\x1a\x62\n\x06\x45yelid\x12\x14\n\x0cleft_upper_y\x18\x01 \x01(\x02\x12\x14\n\x0cleft_lower_y\x18\x02 \x01(\x02\x12\x15\n\rright_upper_y\x18\x03 \x01(\x02\x12\x15\n\rright_lower_y\x18\x04 \x01(\x02\x1aK\n\x07\x45yeball\x12\x0e\n\x06left_x\x18\x01 \x01(\x02\x12\x0e\n\x06left_y\x18\x02 \x01(\x02\x12\x0f\n\x07right_x\x18\x03 \x01(\x02\x12\x0f\n\x07right_y\x18\x04 \x01(\x02\x1a\'\n\x04Nose\x12\x0e\n\x06left_y\x18\x01 \x01(\x02\x12\x0f\n\x07right_y\x18\x02 \x01(\x02\x1a\xbc\x03\n\x05Mouth\x12\x13\n\x0bupper_lip_y\x18\x01 \x01(\x02\x12\x13\n\x0bupper_lip_z\x18\x02 \x01(\x02\x12\x13\n\x0blower_lip_y\x18\x03 \x01(\x02\x12\x13\n\x0blower_lip_z\x18\x04 \x01(\x02\x12:\n\x08left_lip\x18\x05 \x01(\x0b\x32(.cmvr.api.FacialExpression.Mouth.LeftLip\x12<\n\tright_lip\x18\x06 \x01(\x0b\x32).cmvr.api.FacialExpression.Mouth.RightLip\x1aq\n\x07LeftLip\x12\x0f\n\x07upper_x\x18\x01 \x01(\x02\x12\x0f\n\x07upper_y\x18\x02 \x01(\x02\x12\x10\n\x08\x63orner_x\x18\x03 \x01(\x02\x12\x10\n\x08\x63orner_y\x18\x04 \x01(\x02\x12\x0f\n\x07lower_x\x18\x05 \x01(\x02\x12\x0f\n\x07lower_y\x18\x06 \x01(\x02\x1ar\n\x08RightLip\x12\x0f\n\x07upper_x\x18\x01 \x01(\x02\x12\x0f\n\x07upper_y\x18\x02 \x01(\x02\x12\x10\n\x08\x63orner_x\x18\x03 \x01(\x02\x12\x10\n\x08\x63orner_y\x18\x04 \x01(\x02\x12\x0f\n\x07lower_x\x18\x05 \x01(\x02\x12\x0f\n\x07lower_y\x18\x06 \x01(\x02\x1a\x1b\n\x03Jaw\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"\xf0\x01\n\x13SetFacialExpression\x1aj\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12.\n\nexpression\x18\x02 \x01(\x0b\x32\x1a.cmvr.api.FacialExpression\x1am\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12\x14\n\x0c\x65xecution_id\x18\x02 \x01(\t\x12\x19\n\x11\x65xecution_time_ms\x18\x03 \x01(\x02\"\xf8\x01\n\x16StreamFacialExpression\x1aq\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12(\n\x04\x65xpr\x18\x02 \x01(\x0b\x32\x1a.cmvr.api.FacialExpression\x12\x0b\n\x03\x65of\x18\x03 \x01(\x08\x1ak\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12-\n\texpr_diff\x18\x02 \x01(\x0b\x32\x1a.cmvr.api.FacialExpression\"\x84\x02\n\tGetStatus\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a\xba\x01\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12\x11\n\tis_moving\x18\x02 \x01(\x08\x12\x17\n\x0flast_request_id\x18\x03 \x01(\t\x12\x19\n\x11\x63urrent_positions\x18\x04 \x03(\x02\x12\x18\n\x10\x63\x61mera_recording\x18\x05 \x01(\x08\x12\x1b\n\x13\x61\x63tive_recording_id\x18\x06 \x01(\t\"\xa4\x01\n\rEmergencyStop\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1aW\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12\x19\n\x11stopped_processes\x18\x02 \x01(\tb\x06proto3')
_FACIALEXPRESSION = DESCRIPTOR.message_types_by_name['FacialExpression']
_FACIALEXPRESSION_EYEBROW = _FACIALEXPRESSION.nested_types_by_name['Eyebrow']
_FACIALEXPRESSION_EYELID = _FACIALEXPRESSION.nested_types_by_name['Eyelid']
_FACIALEXPRESSION_EYEBALL = _FACIALEXPRESSION.nested_types_by_name['Eyeball']
_FACIALEXPRESSION_NOSE = _FACIALEXPRESSION.nested_types_by_name['Nose']
_FACIALEXPRESSION_MOUTH = _FACIALEXPRESSION.nested_types_by_name['Mouth']
_FACIALEXPRESSION_MOUTH_LEFTLIP = _FACIALEXPRESSION_MOUTH.nested_types_by_name['LeftLip']
_FACIALEXPRESSION_MOUTH_RIGHTLIP = _FACIALEXPRESSION_MOUTH.nested_types_by_name['RightLip']
_FACIALEXPRESSION_JAW = _FACIALEXPRESSION.nested_types_by_name['Jaw']
_SETFACIALEXPRESSION = DESCRIPTOR.message_types_by_name['SetFacialExpression']
_SETFACIALEXPRESSION_REQUEST = _SETFACIALEXPRESSION.nested_types_by_name['Request']
_SETFACIALEXPRESSION_FEEDBACK = _SETFACIALEXPRESSION.nested_types_by_name['Feedback']
_STREAMFACIALEXPRESSION = DESCRIPTOR.message_types_by_name['StreamFacialExpression']
_STREAMFACIALEXPRESSION_REQUEST = _STREAMFACIALEXPRESSION.nested_types_by_name['Request']
_STREAMFACIALEXPRESSION_FEEDBACK = _STREAMFACIALEXPRESSION.nested_types_by_name['Feedback']
_GETSTATUS = DESCRIPTOR.message_types_by_name['GetStatus']
_GETSTATUS_REQUEST = _GETSTATUS.nested_types_by_name['Request']
_GETSTATUS_FEEDBACK = _GETSTATUS.nested_types_by_name['Feedback']
_EMERGENCYSTOP = DESCRIPTOR.message_types_by_name['EmergencyStop']
_EMERGENCYSTOP_REQUEST = _EMERGENCYSTOP.nested_types_by_name['Request']
_EMERGENCYSTOP_FEEDBACK = _EMERGENCYSTOP.nested_types_by_name['Feedback']
FacialExpression = _reflection.GeneratedProtocolMessageType('FacialExpression', (_message.Message,), {
'Eyebrow' : _reflection.GeneratedProtocolMessageType('Eyebrow', (_message.Message,), {
'DESCRIPTOR' : _FACIALEXPRESSION_EYEBROW,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FacialExpression.Eyebrow)
})
,
'Eyelid' : _reflection.GeneratedProtocolMessageType('Eyelid', (_message.Message,), {
'DESCRIPTOR' : _FACIALEXPRESSION_EYELID,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FacialExpression.Eyelid)
})
,
'Eyeball' : _reflection.GeneratedProtocolMessageType('Eyeball', (_message.Message,), {
'DESCRIPTOR' : _FACIALEXPRESSION_EYEBALL,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FacialExpression.Eyeball)
})
,
'Nose' : _reflection.GeneratedProtocolMessageType('Nose', (_message.Message,), {
'DESCRIPTOR' : _FACIALEXPRESSION_NOSE,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FacialExpression.Nose)
})
,
'Mouth' : _reflection.GeneratedProtocolMessageType('Mouth', (_message.Message,), {
'LeftLip' : _reflection.GeneratedProtocolMessageType('LeftLip', (_message.Message,), {
'DESCRIPTOR' : _FACIALEXPRESSION_MOUTH_LEFTLIP,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FacialExpression.Mouth.LeftLip)
})
,
'RightLip' : _reflection.GeneratedProtocolMessageType('RightLip', (_message.Message,), {
'DESCRIPTOR' : _FACIALEXPRESSION_MOUTH_RIGHTLIP,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FacialExpression.Mouth.RightLip)
})
,
'DESCRIPTOR' : _FACIALEXPRESSION_MOUTH,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FacialExpression.Mouth)
})
,
'Jaw' : _reflection.GeneratedProtocolMessageType('Jaw', (_message.Message,), {
'DESCRIPTOR' : _FACIALEXPRESSION_JAW,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FacialExpression.Jaw)
})
,
'DESCRIPTOR' : _FACIALEXPRESSION,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FacialExpression)
})
_sym_db.RegisterMessage(FacialExpression)
_sym_db.RegisterMessage(FacialExpression.Eyebrow)
_sym_db.RegisterMessage(FacialExpression.Eyelid)
_sym_db.RegisterMessage(FacialExpression.Eyeball)
_sym_db.RegisterMessage(FacialExpression.Nose)
_sym_db.RegisterMessage(FacialExpression.Mouth)
_sym_db.RegisterMessage(FacialExpression.Mouth.LeftLip)
_sym_db.RegisterMessage(FacialExpression.Mouth.RightLip)
_sym_db.RegisterMessage(FacialExpression.Jaw)
SetFacialExpression = _reflection.GeneratedProtocolMessageType('SetFacialExpression', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _SETFACIALEXPRESSION_REQUEST,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetFacialExpression.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _SETFACIALEXPRESSION_FEEDBACK,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetFacialExpression.Feedback)
})
,
'DESCRIPTOR' : _SETFACIALEXPRESSION,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetFacialExpression)
})
_sym_db.RegisterMessage(SetFacialExpression)
_sym_db.RegisterMessage(SetFacialExpression.Request)
_sym_db.RegisterMessage(SetFacialExpression.Feedback)
StreamFacialExpression = _reflection.GeneratedProtocolMessageType('StreamFacialExpression', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _STREAMFACIALEXPRESSION_REQUEST,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StreamFacialExpression.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _STREAMFACIALEXPRESSION_FEEDBACK,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StreamFacialExpression.Feedback)
})
,
'DESCRIPTOR' : _STREAMFACIALEXPRESSION,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StreamFacialExpression)
})
_sym_db.RegisterMessage(StreamFacialExpression)
_sym_db.RegisterMessage(StreamFacialExpression.Request)
_sym_db.RegisterMessage(StreamFacialExpression.Feedback)
GetStatus = _reflection.GeneratedProtocolMessageType('GetStatus', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETSTATUS_REQUEST,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetStatus.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _GETSTATUS_FEEDBACK,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetStatus.Feedback)
})
,
'DESCRIPTOR' : _GETSTATUS,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetStatus)
})
_sym_db.RegisterMessage(GetStatus)
_sym_db.RegisterMessage(GetStatus.Request)
_sym_db.RegisterMessage(GetStatus.Feedback)
EmergencyStop = _reflection.GeneratedProtocolMessageType('EmergencyStop', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _EMERGENCYSTOP_REQUEST,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.EmergencyStop.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _EMERGENCYSTOP_FEEDBACK,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.EmergencyStop.Feedback)
})
,
'DESCRIPTOR' : _EMERGENCYSTOP,
'__module__' : 'cmvr.api.biohead_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.EmergencyStop)
})
_sym_db.RegisterMessage(EmergencyStop)
_sym_db.RegisterMessage(EmergencyStop.Request)
_sym_db.RegisterMessage(EmergencyStop.Feedback)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_FACIALEXPRESSION._serialized_start=68
_FACIALEXPRESSION._serialized_end=1185
_FACIALEXPRESSION_EYEBROW._serialized_start=386
_FACIALEXPRESSION_EYEBROW._serialized_end=491
_FACIALEXPRESSION_EYELID._serialized_start=493
_FACIALEXPRESSION_EYELID._serialized_end=591
_FACIALEXPRESSION_EYEBALL._serialized_start=593
_FACIALEXPRESSION_EYEBALL._serialized_end=668
_FACIALEXPRESSION_NOSE._serialized_start=670
_FACIALEXPRESSION_NOSE._serialized_end=709
_FACIALEXPRESSION_MOUTH._serialized_start=712
_FACIALEXPRESSION_MOUTH._serialized_end=1156
_FACIALEXPRESSION_MOUTH_LEFTLIP._serialized_start=927
_FACIALEXPRESSION_MOUTH_LEFTLIP._serialized_end=1040
_FACIALEXPRESSION_MOUTH_RIGHTLIP._serialized_start=1042
_FACIALEXPRESSION_MOUTH_RIGHTLIP._serialized_end=1156
_FACIALEXPRESSION_JAW._serialized_start=1158
_FACIALEXPRESSION_JAW._serialized_end=1185
_SETFACIALEXPRESSION._serialized_start=1188
_SETFACIALEXPRESSION._serialized_end=1428
_SETFACIALEXPRESSION_REQUEST._serialized_start=1211
_SETFACIALEXPRESSION_REQUEST._serialized_end=1317
_SETFACIALEXPRESSION_FEEDBACK._serialized_start=1319
_SETFACIALEXPRESSION_FEEDBACK._serialized_end=1428
_STREAMFACIALEXPRESSION._serialized_start=1431
_STREAMFACIALEXPRESSION._serialized_end=1679
_STREAMFACIALEXPRESSION_REQUEST._serialized_start=1457
_STREAMFACIALEXPRESSION_REQUEST._serialized_end=1570
_STREAMFACIALEXPRESSION_FEEDBACK._serialized_start=1572
_STREAMFACIALEXPRESSION_FEEDBACK._serialized_end=1679
_GETSTATUS._serialized_start=1682
_GETSTATUS._serialized_end=1942
_GETSTATUS_REQUEST._serialized_start=1211
_GETSTATUS_REQUEST._serialized_end=1269
_GETSTATUS_FEEDBACK._serialized_start=1756
_GETSTATUS_FEEDBACK._serialized_end=1942
_EMERGENCYSTOP._serialized_start=1945
_EMERGENCYSTOP._serialized_end=2109
_EMERGENCYSTOP_REQUEST._serialized_start=1211
_EMERGENCYSTOP_REQUEST._serialized_end=1269
_EMERGENCYSTOP_FEEDBACK._serialized_start=2022
_EMERGENCYSTOP_FEEDBACK._serialized_end=2109
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/biohead_service.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import biohead_command_pb2 as cmvr_dot_api_dot_biohead__command__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x63mvr/api/biohead_service.proto\x12\x08\x63mvr.api\x1a\x1e\x63mvr/api/biohead_command.proto2\x85\x03\n\x0e\x42ioHeadService\x12`\n\rSetExpression\x12%.cmvr.api.SetFacialExpression.Request\x1a&.cmvr.api.SetFacialExpression.Feedback\"\x00\x12k\n\x10StreamExpression\x12(.cmvr.api.StreamFacialExpression.Request\x1a).cmvr.api.StreamFacialExpression.Feedback(\x01\x30\x01\x12N\n\x0fGetSystemStatus\x12\x1b.cmvr.api.GetStatus.Request\x1a\x1c.cmvr.api.GetStatus.Feedback\"\x00\x12T\n\rEmergencyStop\x12\x1f.cmvr.api.EmergencyStop.Request\x1a .cmvr.api.EmergencyStop.Feedback\"\x00\x62\x06proto3')
_BIOHEADSERVICE = DESCRIPTOR.services_by_name['BioHeadService']
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_BIOHEADSERVICE._serialized_start=77
_BIOHEADSERVICE._serialized_end=466
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,174 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from cmvr.api import biohead_command_pb2 as cmvr_dot_api_dot_biohead__command__pb2
class BioHeadServiceStub(object):
"""生物头部机器人服务接口
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.SetExpression = channel.unary_unary(
'/cmvr.api.BioHeadService/SetExpression',
request_serializer=cmvr_dot_api_dot_biohead__command__pb2.SetFacialExpression.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.SetFacialExpression.Feedback.FromString,
)
self.StreamExpression = channel.stream_stream(
'/cmvr.api.BioHeadService/StreamExpression',
request_serializer=cmvr_dot_api_dot_biohead__command__pb2.StreamFacialExpression.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.StreamFacialExpression.Feedback.FromString,
)
self.GetSystemStatus = channel.unary_unary(
'/cmvr.api.BioHeadService/GetSystemStatus',
request_serializer=cmvr_dot_api_dot_biohead__command__pb2.GetStatus.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.GetStatus.Feedback.FromString,
)
self.EmergencyStop = channel.unary_unary(
'/cmvr.api.BioHeadService/EmergencyStop',
request_serializer=cmvr_dot_api_dot_biohead__command__pb2.EmergencyStop.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_biohead__command__pb2.EmergencyStop.Feedback.FromString,
)
class BioHeadServiceServicer(object):
"""生物头部机器人服务接口
"""
def SetExpression(self, request, context):
"""设置面部表情
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def StreamExpression(self, request_iterator, context):
"""流式表情控制
rpc StreamExpression(StreamFacialExpression.Request) returns (StreamFacialExpression.Feedback){};
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetSystemStatus(self, request, context):
"""获取状态
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def EmergencyStop(self, request, context):
"""紧急停止
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_BioHeadServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'SetExpression': grpc.unary_unary_rpc_method_handler(
servicer.SetExpression,
request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.SetFacialExpression.Request.FromString,
response_serializer=cmvr_dot_api_dot_biohead__command__pb2.SetFacialExpression.Feedback.SerializeToString,
),
'StreamExpression': grpc.stream_stream_rpc_method_handler(
servicer.StreamExpression,
request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.StreamFacialExpression.Request.FromString,
response_serializer=cmvr_dot_api_dot_biohead__command__pb2.StreamFacialExpression.Feedback.SerializeToString,
),
'GetSystemStatus': grpc.unary_unary_rpc_method_handler(
servicer.GetSystemStatus,
request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.GetStatus.Request.FromString,
response_serializer=cmvr_dot_api_dot_biohead__command__pb2.GetStatus.Feedback.SerializeToString,
),
'EmergencyStop': grpc.unary_unary_rpc_method_handler(
servicer.EmergencyStop,
request_deserializer=cmvr_dot_api_dot_biohead__command__pb2.EmergencyStop.Request.FromString,
response_serializer=cmvr_dot_api_dot_biohead__command__pb2.EmergencyStop.Feedback.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.BioHeadService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class BioHeadService(object):
"""生物头部机器人服务接口
"""
@staticmethod
def SetExpression(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, '/cmvr.api.BioHeadService/SetExpression',
cmvr_dot_api_dot_biohead__command__pb2.SetFacialExpression.Request.SerializeToString,
cmvr_dot_api_dot_biohead__command__pb2.SetFacialExpression.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def StreamExpression(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(request_iterator, target, '/cmvr.api.BioHeadService/StreamExpression',
cmvr_dot_api_dot_biohead__command__pb2.StreamFacialExpression.Request.SerializeToString,
cmvr_dot_api_dot_biohead__command__pb2.StreamFacialExpression.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetSystemStatus(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, '/cmvr.api.BioHeadService/GetSystemStatus',
cmvr_dot_api_dot_biohead__command__pb2.GetStatus.Request.SerializeToString,
cmvr_dot_api_dot_biohead__command__pb2.GetStatus.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def EmergencyStop(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, '/cmvr.api.BioHeadService/EmergencyStop',
cmvr_dot_api_dot_biohead__command__pb2.EmergencyStop.Request.SerializeToString,
cmvr_dot_api_dot_biohead__command__pb2.EmergencyStop.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/camera_service.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import camera_command_pb2 as cmvr_dot_api_dot_camera__command__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x63mvr/api/camera_service.proto\x12\x08\x63mvr.api\x1a\x1d\x63mvr/api/camera_command.proto2\x9b\t\n\rCameraService\x12`\n\tGetStatus\x12\'.cmvr.api.GetCameraStateCommand.Request\x1a(.cmvr.api.GetCameraStateCommand.Feedback\"\x00\x12\\\n\x0bStartCamera\x12$.cmvr.api.StartCameraCommand.Request\x1a%.cmvr.api.StartCameraCommand.Feedback\"\x00\x12Y\n\nStopCamera\x12#.cmvr.api.StopCameraCommand.Request\x1a$.cmvr.api.StopCameraCommand.Feedback\"\x00\x12\\\n\x0bGetRGBImage\x12$.cmvr.api.GetRGBImageCommand.Request\x1a%.cmvr.api.GetRGBImageCommand.Feedback\"\x00\x12\x62\n\rGetDepthImage\x12&.cmvr.api.GetDepthImageCommand.Request\x1a\'.cmvr.api.GetDepthImageCommand.Feedback\"\x00\x12\x62\n\rGetRGBDImages\x12&.cmvr.api.GetRGBDImagesCommand.Request\x1a\'.cmvr.api.GetRGBDImagesCommand.Feedback\"\x00\x12q\n\x0eStartRecording\x12-.cmvr.api.StartCameraRecordingCommand.Request\x1a..cmvr.api.StartCameraRecordingCommand.Feedback\"\x00\x12n\n\rStopRecording\x12,.cmvr.api.StopCameraRecordingCommand.Request\x1a-.cmvr.api.StopCameraRecordingCommand.Feedback\"\x00\x12r\n\x11GetRGBImageStream\x12*.cmvr.api.GetRGBImageStreamCommand.Request\x1a+.cmvr.api.GetRGBImageStreamCommand.Feedback\"\x00(\x01\x30\x01\x12x\n\x13GetDepthImageStream\x12,.cmvr.api.GetDepthImageStreamCommand.Request\x1a-.cmvr.api.GetDepthImageStreamCommand.Feedback\"\x00(\x01\x30\x01\x12x\n\x13GetRGBDImagesStream\x12,.cmvr.api.GetRGBDImagesStreamCommand.Request\x1a-.cmvr.api.GetRGBDImagesStreamCommand.Feedback\"\x00(\x01\x30\x01\x62\x06proto3')
_CAMERASERVICE = DESCRIPTOR.services_by_name['CameraService']
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_CAMERASERVICE._serialized_start=75
_CAMERASERVICE._serialized_end=1254
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,396 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from cmvr.api import camera_command_pb2 as cmvr_dot_api_dot_camera__command__pb2
class CameraServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetStatus = channel.unary_unary(
'/cmvr.api.CameraService/GetStatus',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Feedback.FromString,
)
self.StartCamera = channel.unary_unary(
'/cmvr.api.CameraService/StartCamera',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Feedback.FromString,
)
self.StopCamera = channel.unary_unary(
'/cmvr.api.CameraService/StopCamera',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Feedback.FromString,
)
self.GetRGBImage = channel.unary_unary(
'/cmvr.api.CameraService/GetRGBImage',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Feedback.FromString,
)
self.GetDepthImage = channel.unary_unary(
'/cmvr.api.CameraService/GetDepthImage',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Feedback.FromString,
)
self.GetRGBDImages = channel.unary_unary(
'/cmvr.api.CameraService/GetRGBDImages',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Feedback.FromString,
)
self.StartRecording = channel.unary_unary(
'/cmvr.api.CameraService/StartRecording',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Feedback.FromString,
)
self.StopRecording = channel.unary_unary(
'/cmvr.api.CameraService/StopRecording',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Feedback.FromString,
)
self.GetRGBImageStream = channel.stream_stream(
'/cmvr.api.CameraService/GetRGBImageStream',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Feedback.FromString,
)
self.GetDepthImageStream = channel.stream_stream(
'/cmvr.api.CameraService/GetDepthImageStream',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Feedback.FromString,
)
self.GetRGBDImagesStream = channel.stream_stream(
'/cmvr.api.CameraService/GetRGBDImagesStream',
request_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Feedback.FromString,
)
class CameraServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def GetStatus(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 StartCamera(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 StopCamera(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 GetRGBImage(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 GetDepthImage(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 GetRGBDImages(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 StartRecording(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 StopRecording(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 GetRGBImageStream(self, request_iterator, 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 GetDepthImageStream(self, request_iterator, 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 GetRGBDImagesStream(self, request_iterator, 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_CameraServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetStatus': grpc.unary_unary_rpc_method_handler(
servicer.GetStatus,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Feedback.SerializeToString,
),
'StartCamera': grpc.unary_unary_rpc_method_handler(
servicer.StartCamera,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Feedback.SerializeToString,
),
'StopCamera': grpc.unary_unary_rpc_method_handler(
servicer.StopCamera,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Feedback.SerializeToString,
),
'GetRGBImage': grpc.unary_unary_rpc_method_handler(
servicer.GetRGBImage,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Feedback.SerializeToString,
),
'GetDepthImage': grpc.unary_unary_rpc_method_handler(
servicer.GetDepthImage,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Feedback.SerializeToString,
),
'GetRGBDImages': grpc.unary_unary_rpc_method_handler(
servicer.GetRGBDImages,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Feedback.SerializeToString,
),
'StartRecording': grpc.unary_unary_rpc_method_handler(
servicer.StartRecording,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Feedback.SerializeToString,
),
'StopRecording': grpc.unary_unary_rpc_method_handler(
servicer.StopRecording,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Feedback.SerializeToString,
),
'GetRGBImageStream': grpc.stream_stream_rpc_method_handler(
servicer.GetRGBImageStream,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Feedback.SerializeToString,
),
'GetDepthImageStream': grpc.stream_stream_rpc_method_handler(
servicer.GetDepthImageStream,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Feedback.SerializeToString,
),
'GetRGBDImagesStream': grpc.stream_stream_rpc_method_handler(
servicer.GetRGBDImagesStream,
request_deserializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Feedback.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.CameraService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class CameraService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def GetStatus(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, '/cmvr.api.CameraService/GetStatus',
cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetCameraStateCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def StartCamera(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, '/cmvr.api.CameraService/StartCamera',
cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.StartCameraCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def StopCamera(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, '/cmvr.api.CameraService/StopCamera',
cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.StopCameraCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetRGBImage(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, '/cmvr.api.CameraService/GetRGBImage',
cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetRGBImageCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetDepthImage(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, '/cmvr.api.CameraService/GetDepthImage',
cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetDepthImageCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetRGBDImages(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, '/cmvr.api.CameraService/GetRGBDImages',
cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def StartRecording(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, '/cmvr.api.CameraService/StartRecording',
cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.StartCameraRecordingCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def StopRecording(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, '/cmvr.api.CameraService/StopRecording',
cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.StopCameraRecordingCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetRGBImageStream(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(request_iterator, target, '/cmvr.api.CameraService/GetRGBImageStream',
cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetRGBImageStreamCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetDepthImageStream(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(request_iterator, target, '/cmvr.api.CameraService/GetDepthImageStream',
cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetDepthImageStreamCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetRGBDImagesStream(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(request_iterator, target, '/cmvr.api.CameraService/GetRGBDImagesStream',
cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Request.SerializeToString,
cmvr_dot_api_dot_camera__command__pb2.GetRGBDImagesStreamCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

View File

@ -0,0 +1,80 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/common.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x63mvr/api/common.proto\x12\x08\x63mvr.api\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb8\x01\n\x0f\x44\x65viceLifecycle\x12\x32\n\x05state\x18\x01 \x01(\x0e\x32#.cmvr.api.DeviceLifecycle.Lifecycle\"q\n\tLifecycle\x12\x0e\n\nSTATE_INIT\x10\x00\x12\x0f\n\x0bSTATE_READY\x10\x01\x12\x11\n\rSTATE_RUNNING\x10\x02\x12\x0f\n\x0bSTATE_ERROR\x10\x03\x12\x0f\n\x0bSTATE_ESTOP\x10\x04\x12\x0e\n\nSTATE_STOP\x10\x05\"\xbf\x01\n\rCommandHeader\x1aK\n\x07Request\x12\x11\n\tdevice_id\x18\x01 \x01(\t\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x61\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa2\x01\n\x0b\x43onfigParam\x12\x12\n\nparam_name\x18\x01 \x01(\t\x12\x13\n\tint_value\x18\x02 \x01(\x05H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x05 \x01(\x08H\x00\x12\x15\n\x0b\x62ytes_value\x18\x06 \x01(\x0cH\x00\x42\r\n\x0bparam_valueb\x06proto3')
_DEVICELIFECYCLE = DESCRIPTOR.message_types_by_name['DeviceLifecycle']
_COMMANDHEADER = DESCRIPTOR.message_types_by_name['CommandHeader']
_COMMANDHEADER_REQUEST = _COMMANDHEADER.nested_types_by_name['Request']
_COMMANDHEADER_FEEDBACK = _COMMANDHEADER.nested_types_by_name['Feedback']
_CONFIGPARAM = DESCRIPTOR.message_types_by_name['ConfigParam']
_DEVICELIFECYCLE_LIFECYCLE = _DEVICELIFECYCLE.enum_types_by_name['Lifecycle']
DeviceLifecycle = _reflection.GeneratedProtocolMessageType('DeviceLifecycle', (_message.Message,), {
'DESCRIPTOR' : _DEVICELIFECYCLE,
'__module__' : 'cmvr.api.common_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.DeviceLifecycle)
})
_sym_db.RegisterMessage(DeviceLifecycle)
CommandHeader = _reflection.GeneratedProtocolMessageType('CommandHeader', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _COMMANDHEADER_REQUEST,
'__module__' : 'cmvr.api.common_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.CommandHeader.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _COMMANDHEADER_FEEDBACK,
'__module__' : 'cmvr.api.common_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.CommandHeader.Feedback)
})
,
'DESCRIPTOR' : _COMMANDHEADER,
'__module__' : 'cmvr.api.common_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.CommandHeader)
})
_sym_db.RegisterMessage(CommandHeader)
_sym_db.RegisterMessage(CommandHeader.Request)
_sym_db.RegisterMessage(CommandHeader.Feedback)
ConfigParam = _reflection.GeneratedProtocolMessageType('ConfigParam', (_message.Message,), {
'DESCRIPTOR' : _CONFIGPARAM,
'__module__' : 'cmvr.api.common_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.ConfigParam)
})
_sym_db.RegisterMessage(ConfigParam)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_DEVICELIFECYCLE._serialized_start=69
_DEVICELIFECYCLE._serialized_end=253
_DEVICELIFECYCLE_LIFECYCLE._serialized_start=140
_DEVICELIFECYCLE_LIFECYCLE._serialized_end=253
_COMMANDHEADER._serialized_start=256
_COMMANDHEADER._serialized_end=447
_COMMANDHEADER_REQUEST._serialized_start=273
_COMMANDHEADER_REQUEST._serialized_end=348
_COMMANDHEADER_FEEDBACK._serialized_start=350
_COMMANDHEADER_FEEDBACK._serialized_end=447
_CONFIGPARAM._serialized_start=450
_CONFIGPARAM._serialized_end=612
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,340 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/dexhand_command.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x63mvr/api/dexhand_command.proto\x12\x08\x63mvr.api\x1a\x15\x63mvr/api/common.proto\")\n\x0c\x46reedomValue\x12\n\n\x02id\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x02\"\xa9\x01\n\x0c\x46reedomState\x12\x0e\n\x06\x64of_id\x18\x01 \x01(\x05\x12\r\n\x05\x61ngle\x18\x02 \x01(\x05\x12\r\n\x05speed\x18\x03 \x01(\x05\x12\r\n\x05\x66orce\x18\x04 \x01(\x05\x12\x10\n\x08position\x18\x05 \x01(\x05\x12\x0f\n\x07\x63urrent\x18\x06 \x01(\x05\x12\x13\n\x0btemperature\x18\x07 \x01(\x05\x12\r\n\x05\x65rror\x18\x08 \x01(\x05\x12\x15\n\rerror_message\x18\t \x03(\t\"\x90\x03\n\nSensorData\x12\x34\n\x0b\x66inger_type\x18\x04 \x01(\x0e\x32\x1f.cmvr.api.SensorData.FingerType\x12\x30\n\tpart_type\x18\x05 \x01(\x0e\x32\x1d.cmvr.api.SensorData.PartType\x12\x13\n\x0bsensor_name\x18\x06 \x01(\t\x12*\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x1c.cmvr.api.SensorData.RowData\x12\x0c\n\x04rows\x18\x02 \x01(\x05\x12\x0c\n\x04\x63ols\x18\x03 \x01(\x05\x1a\x1d\n\x07RowData\x12\x12\n\x06values\x18\x01 \x03(\x05\x42\x02\x10\x01\"T\n\nFingerType\x12\t\n\x05PINKY\x10\x00\x12\x08\n\x04RING\x10\x01\x12\x11\n\rMIDDLE_FINGER\x10\x02\x12\t\n\x05INDEX\x10\x03\x12\t\n\x05THUMB\x10\x04\x12\x08\n\x04PALM\x10\x05\"H\n\x08PartType\x12\x07\n\x03TIP\x10\x00\x12\n\n\x06\x46INGER\x10\x01\x12\x07\n\x03PAD\x10\x02\x12\x10\n\x0cTHUMB_MIDDLE\x10\x03\x12\x0c\n\x08PALM_PAD\x10\x04\"M\n\x0c\x44\x65xHandState\x12\x16\n\x0eis_initialized\x18\x01 \x01(\x08\x12%\n\x05hands\x18\x02 \x03(\x0b\x32\x16.cmvr.api.FreedomState\"\xb9\x01\n\x16GetDexHandStateCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a\x63\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12%\n\x05state\x18\x02 \x01(\x0b\x32\x16.cmvr.api.DexHandState\"\xbe\x01\n\x1aSetDexHandPositionsCommand\x1a\x62\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12&\n\x06values\x18\x02 \x03(\x0b\x32\x16.cmvr.api.FreedomValue\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xbb\x01\n\x17SetDexHandAnglesCommand\x1a\x62\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12&\n\x06values\x18\x02 \x03(\x0b\x32\x16.cmvr.api.FreedomValue\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xba\x01\n\x16SetDexHandForceCommand\x1a\x62\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12&\n\x06values\x18\x02 \x03(\x0b\x32\x16.cmvr.api.FreedomValue\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xba\x01\n\x16SetDexHandSpeedCommand\x1a\x62\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12&\n\x06values\x18\x02 \x03(\x0b\x32\x16.cmvr.api.FreedomValue\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xab\x01\n\x1aSetDexHandPresetActCommand\x1aO\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12\x13\n\x0bpresetActId\x18\x02 \x01(\x05\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xb6\x01\n\x14GetSensorDataCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a\x62\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12$\n\x06sensor\x18\x02 \x03(\x0b\x32\x14.cmvr.api.SensorData\"\xbc\x01\n\x1aGetSensorDataStreamCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a\x62\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12$\n\x06sensor\x18\x02 \x03(\x0b\x32\x14.cmvr.api.SensorDatab\x06proto3')
_FREEDOMVALUE = DESCRIPTOR.message_types_by_name['FreedomValue']
_FREEDOMSTATE = DESCRIPTOR.message_types_by_name['FreedomState']
_SENSORDATA = DESCRIPTOR.message_types_by_name['SensorData']
_SENSORDATA_ROWDATA = _SENSORDATA.nested_types_by_name['RowData']
_DEXHANDSTATE = DESCRIPTOR.message_types_by_name['DexHandState']
_GETDEXHANDSTATECOMMAND = DESCRIPTOR.message_types_by_name['GetDexHandStateCommand']
_GETDEXHANDSTATECOMMAND_REQUEST = _GETDEXHANDSTATECOMMAND.nested_types_by_name['Request']
_GETDEXHANDSTATECOMMAND_FEEDBACK = _GETDEXHANDSTATECOMMAND.nested_types_by_name['Feedback']
_SETDEXHANDPOSITIONSCOMMAND = DESCRIPTOR.message_types_by_name['SetDexHandPositionsCommand']
_SETDEXHANDPOSITIONSCOMMAND_REQUEST = _SETDEXHANDPOSITIONSCOMMAND.nested_types_by_name['Request']
_SETDEXHANDPOSITIONSCOMMAND_FEEDBACK = _SETDEXHANDPOSITIONSCOMMAND.nested_types_by_name['Feedback']
_SETDEXHANDANGLESCOMMAND = DESCRIPTOR.message_types_by_name['SetDexHandAnglesCommand']
_SETDEXHANDANGLESCOMMAND_REQUEST = _SETDEXHANDANGLESCOMMAND.nested_types_by_name['Request']
_SETDEXHANDANGLESCOMMAND_FEEDBACK = _SETDEXHANDANGLESCOMMAND.nested_types_by_name['Feedback']
_SETDEXHANDFORCECOMMAND = DESCRIPTOR.message_types_by_name['SetDexHandForceCommand']
_SETDEXHANDFORCECOMMAND_REQUEST = _SETDEXHANDFORCECOMMAND.nested_types_by_name['Request']
_SETDEXHANDFORCECOMMAND_FEEDBACK = _SETDEXHANDFORCECOMMAND.nested_types_by_name['Feedback']
_SETDEXHANDSPEEDCOMMAND = DESCRIPTOR.message_types_by_name['SetDexHandSpeedCommand']
_SETDEXHANDSPEEDCOMMAND_REQUEST = _SETDEXHANDSPEEDCOMMAND.nested_types_by_name['Request']
_SETDEXHANDSPEEDCOMMAND_FEEDBACK = _SETDEXHANDSPEEDCOMMAND.nested_types_by_name['Feedback']
_SETDEXHANDPRESETACTCOMMAND = DESCRIPTOR.message_types_by_name['SetDexHandPresetActCommand']
_SETDEXHANDPRESETACTCOMMAND_REQUEST = _SETDEXHANDPRESETACTCOMMAND.nested_types_by_name['Request']
_SETDEXHANDPRESETACTCOMMAND_FEEDBACK = _SETDEXHANDPRESETACTCOMMAND.nested_types_by_name['Feedback']
_GETSENSORDATACOMMAND = DESCRIPTOR.message_types_by_name['GetSensorDataCommand']
_GETSENSORDATACOMMAND_REQUEST = _GETSENSORDATACOMMAND.nested_types_by_name['Request']
_GETSENSORDATACOMMAND_FEEDBACK = _GETSENSORDATACOMMAND.nested_types_by_name['Feedback']
_GETSENSORDATASTREAMCOMMAND = DESCRIPTOR.message_types_by_name['GetSensorDataStreamCommand']
_GETSENSORDATASTREAMCOMMAND_REQUEST = _GETSENSORDATASTREAMCOMMAND.nested_types_by_name['Request']
_GETSENSORDATASTREAMCOMMAND_FEEDBACK = _GETSENSORDATASTREAMCOMMAND.nested_types_by_name['Feedback']
_SENSORDATA_FINGERTYPE = _SENSORDATA.enum_types_by_name['FingerType']
_SENSORDATA_PARTTYPE = _SENSORDATA.enum_types_by_name['PartType']
FreedomValue = _reflection.GeneratedProtocolMessageType('FreedomValue', (_message.Message,), {
'DESCRIPTOR' : _FREEDOMVALUE,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FreedomValue)
})
_sym_db.RegisterMessage(FreedomValue)
FreedomState = _reflection.GeneratedProtocolMessageType('FreedomState', (_message.Message,), {
'DESCRIPTOR' : _FREEDOMSTATE,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.FreedomState)
})
_sym_db.RegisterMessage(FreedomState)
SensorData = _reflection.GeneratedProtocolMessageType('SensorData', (_message.Message,), {
'RowData' : _reflection.GeneratedProtocolMessageType('RowData', (_message.Message,), {
'DESCRIPTOR' : _SENSORDATA_ROWDATA,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SensorData.RowData)
})
,
'DESCRIPTOR' : _SENSORDATA,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SensorData)
})
_sym_db.RegisterMessage(SensorData)
_sym_db.RegisterMessage(SensorData.RowData)
DexHandState = _reflection.GeneratedProtocolMessageType('DexHandState', (_message.Message,), {
'DESCRIPTOR' : _DEXHANDSTATE,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.DexHandState)
})
_sym_db.RegisterMessage(DexHandState)
GetDexHandStateCommand = _reflection.GeneratedProtocolMessageType('GetDexHandStateCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETDEXHANDSTATECOMMAND_REQUEST,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetDexHandStateCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _GETDEXHANDSTATECOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetDexHandStateCommand.Feedback)
})
,
'DESCRIPTOR' : _GETDEXHANDSTATECOMMAND,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetDexHandStateCommand)
})
_sym_db.RegisterMessage(GetDexHandStateCommand)
_sym_db.RegisterMessage(GetDexHandStateCommand.Request)
_sym_db.RegisterMessage(GetDexHandStateCommand.Feedback)
SetDexHandPositionsCommand = _reflection.GeneratedProtocolMessageType('SetDexHandPositionsCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _SETDEXHANDPOSITIONSCOMMAND_REQUEST,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandPositionsCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _SETDEXHANDPOSITIONSCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandPositionsCommand.Feedback)
})
,
'DESCRIPTOR' : _SETDEXHANDPOSITIONSCOMMAND,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandPositionsCommand)
})
_sym_db.RegisterMessage(SetDexHandPositionsCommand)
_sym_db.RegisterMessage(SetDexHandPositionsCommand.Request)
_sym_db.RegisterMessage(SetDexHandPositionsCommand.Feedback)
SetDexHandAnglesCommand = _reflection.GeneratedProtocolMessageType('SetDexHandAnglesCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _SETDEXHANDANGLESCOMMAND_REQUEST,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandAnglesCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _SETDEXHANDANGLESCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandAnglesCommand.Feedback)
})
,
'DESCRIPTOR' : _SETDEXHANDANGLESCOMMAND,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandAnglesCommand)
})
_sym_db.RegisterMessage(SetDexHandAnglesCommand)
_sym_db.RegisterMessage(SetDexHandAnglesCommand.Request)
_sym_db.RegisterMessage(SetDexHandAnglesCommand.Feedback)
SetDexHandForceCommand = _reflection.GeneratedProtocolMessageType('SetDexHandForceCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _SETDEXHANDFORCECOMMAND_REQUEST,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandForceCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _SETDEXHANDFORCECOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandForceCommand.Feedback)
})
,
'DESCRIPTOR' : _SETDEXHANDFORCECOMMAND,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandForceCommand)
})
_sym_db.RegisterMessage(SetDexHandForceCommand)
_sym_db.RegisterMessage(SetDexHandForceCommand.Request)
_sym_db.RegisterMessage(SetDexHandForceCommand.Feedback)
SetDexHandSpeedCommand = _reflection.GeneratedProtocolMessageType('SetDexHandSpeedCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _SETDEXHANDSPEEDCOMMAND_REQUEST,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandSpeedCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _SETDEXHANDSPEEDCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandSpeedCommand.Feedback)
})
,
'DESCRIPTOR' : _SETDEXHANDSPEEDCOMMAND,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandSpeedCommand)
})
_sym_db.RegisterMessage(SetDexHandSpeedCommand)
_sym_db.RegisterMessage(SetDexHandSpeedCommand.Request)
_sym_db.RegisterMessage(SetDexHandSpeedCommand.Feedback)
SetDexHandPresetActCommand = _reflection.GeneratedProtocolMessageType('SetDexHandPresetActCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _SETDEXHANDPRESETACTCOMMAND_REQUEST,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandPresetActCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _SETDEXHANDPRESETACTCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandPresetActCommand.Feedback)
})
,
'DESCRIPTOR' : _SETDEXHANDPRESETACTCOMMAND,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetDexHandPresetActCommand)
})
_sym_db.RegisterMessage(SetDexHandPresetActCommand)
_sym_db.RegisterMessage(SetDexHandPresetActCommand.Request)
_sym_db.RegisterMessage(SetDexHandPresetActCommand.Feedback)
GetSensorDataCommand = _reflection.GeneratedProtocolMessageType('GetSensorDataCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETSENSORDATACOMMAND_REQUEST,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSensorDataCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _GETSENSORDATACOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSensorDataCommand.Feedback)
})
,
'DESCRIPTOR' : _GETSENSORDATACOMMAND,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSensorDataCommand)
})
_sym_db.RegisterMessage(GetSensorDataCommand)
_sym_db.RegisterMessage(GetSensorDataCommand.Request)
_sym_db.RegisterMessage(GetSensorDataCommand.Feedback)
GetSensorDataStreamCommand = _reflection.GeneratedProtocolMessageType('GetSensorDataStreamCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETSENSORDATASTREAMCOMMAND_REQUEST,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSensorDataStreamCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _GETSENSORDATASTREAMCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSensorDataStreamCommand.Feedback)
})
,
'DESCRIPTOR' : _GETSENSORDATASTREAMCOMMAND,
'__module__' : 'cmvr.api.dexhand_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSensorDataStreamCommand)
})
_sym_db.RegisterMessage(GetSensorDataStreamCommand)
_sym_db.RegisterMessage(GetSensorDataStreamCommand.Request)
_sym_db.RegisterMessage(GetSensorDataStreamCommand.Feedback)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_SENSORDATA_ROWDATA.fields_by_name['values']._options = None
_SENSORDATA_ROWDATA.fields_by_name['values']._serialized_options = b'\020\001'
_FREEDOMVALUE._serialized_start=67
_FREEDOMVALUE._serialized_end=108
_FREEDOMSTATE._serialized_start=111
_FREEDOMSTATE._serialized_end=280
_SENSORDATA._serialized_start=283
_SENSORDATA._serialized_end=683
_SENSORDATA_ROWDATA._serialized_start=494
_SENSORDATA_ROWDATA._serialized_end=523
_SENSORDATA_FINGERTYPE._serialized_start=525
_SENSORDATA_FINGERTYPE._serialized_end=609
_SENSORDATA_PARTTYPE._serialized_start=611
_SENSORDATA_PARTTYPE._serialized_end=683
_DEXHANDSTATE._serialized_start=685
_DEXHANDSTATE._serialized_end=762
_GETDEXHANDSTATECOMMAND._serialized_start=765
_GETDEXHANDSTATECOMMAND._serialized_end=950
_GETDEXHANDSTATECOMMAND_REQUEST._serialized_start=791
_GETDEXHANDSTATECOMMAND_REQUEST._serialized_end=849
_GETDEXHANDSTATECOMMAND_FEEDBACK._serialized_start=851
_GETDEXHANDSTATECOMMAND_FEEDBACK._serialized_end=950
_SETDEXHANDPOSITIONSCOMMAND._serialized_start=953
_SETDEXHANDPOSITIONSCOMMAND._serialized_end=1143
_SETDEXHANDPOSITIONSCOMMAND_REQUEST._serialized_start=983
_SETDEXHANDPOSITIONSCOMMAND_REQUEST._serialized_end=1081
_SETDEXHANDPOSITIONSCOMMAND_FEEDBACK._serialized_start=851
_SETDEXHANDPOSITIONSCOMMAND_FEEDBACK._serialized_end=911
_SETDEXHANDANGLESCOMMAND._serialized_start=1146
_SETDEXHANDANGLESCOMMAND._serialized_end=1333
_SETDEXHANDANGLESCOMMAND_REQUEST._serialized_start=983
_SETDEXHANDANGLESCOMMAND_REQUEST._serialized_end=1081
_SETDEXHANDANGLESCOMMAND_FEEDBACK._serialized_start=851
_SETDEXHANDANGLESCOMMAND_FEEDBACK._serialized_end=911
_SETDEXHANDFORCECOMMAND._serialized_start=1336
_SETDEXHANDFORCECOMMAND._serialized_end=1522
_SETDEXHANDFORCECOMMAND_REQUEST._serialized_start=983
_SETDEXHANDFORCECOMMAND_REQUEST._serialized_end=1081
_SETDEXHANDFORCECOMMAND_FEEDBACK._serialized_start=851
_SETDEXHANDFORCECOMMAND_FEEDBACK._serialized_end=911
_SETDEXHANDSPEEDCOMMAND._serialized_start=1525
_SETDEXHANDSPEEDCOMMAND._serialized_end=1711
_SETDEXHANDSPEEDCOMMAND_REQUEST._serialized_start=983
_SETDEXHANDSPEEDCOMMAND_REQUEST._serialized_end=1081
_SETDEXHANDSPEEDCOMMAND_FEEDBACK._serialized_start=851
_SETDEXHANDSPEEDCOMMAND_FEEDBACK._serialized_end=911
_SETDEXHANDPRESETACTCOMMAND._serialized_start=1714
_SETDEXHANDPRESETACTCOMMAND._serialized_end=1885
_SETDEXHANDPRESETACTCOMMAND_REQUEST._serialized_start=1744
_SETDEXHANDPRESETACTCOMMAND_REQUEST._serialized_end=1823
_SETDEXHANDPRESETACTCOMMAND_FEEDBACK._serialized_start=851
_SETDEXHANDPRESETACTCOMMAND_FEEDBACK._serialized_end=911
_GETSENSORDATACOMMAND._serialized_start=1888
_GETSENSORDATACOMMAND._serialized_end=2070
_GETSENSORDATACOMMAND_REQUEST._serialized_start=791
_GETSENSORDATACOMMAND_REQUEST._serialized_end=849
_GETSENSORDATACOMMAND_FEEDBACK._serialized_start=1972
_GETSENSORDATACOMMAND_FEEDBACK._serialized_end=2070
_GETSENSORDATASTREAMCOMMAND._serialized_start=2073
_GETSENSORDATASTREAMCOMMAND._serialized_end=2261
_GETSENSORDATASTREAMCOMMAND_REQUEST._serialized_start=791
_GETSENSORDATASTREAMCOMMAND_REQUEST._serialized_end=849
_GETSENSORDATASTREAMCOMMAND_FEEDBACK._serialized_start=1972
_GETSENSORDATASTREAMCOMMAND_FEEDBACK._serialized_end=2070
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/dexhand_service.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import dexhand_command_pb2 as cmvr_dot_api_dot_dexhand__command__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x63mvr/api/dexhand_service.proto\x12\x08\x63mvr.api\x1a\x1e\x63mvr/api/dexhand_command.proto2\xe8\x06\n\x0e\x44\x65xHandService\x12`\n\tGetStatus\x12(.cmvr.api.GetDexHandStateCommand.Request\x1a).cmvr.api.GetDexHandStateCommand.Feedback\x12l\n\rSetDexHandPos\x12,.cmvr.api.SetDexHandPositionsCommand.Request\x1a-.cmvr.api.SetDexHandPositionsCommand.Feedback\x12h\n\x0fSetDexHandAngle\x12).cmvr.api.SetDexHandAnglesCommand.Request\x1a*.cmvr.api.SetDexHandAnglesCommand.Feedback\x12\x66\n\x0fSetDexHandForce\x12(.cmvr.api.SetDexHandForceCommand.Request\x1a).cmvr.api.SetDexHandForceCommand.Feedback\x12\x66\n\x0fSetDexHandSpeed\x12(.cmvr.api.SetDexHandSpeedCommand.Request\x1a).cmvr.api.SetDexHandSpeedCommand.Feedback\x12r\n\x13SetDexHandPresetAct\x12,.cmvr.api.SetDexHandPresetActCommand.Request\x1a-.cmvr.api.SetDexHandPresetActCommand.Feedback\x12`\n\rGetSensorData\x12&.cmvr.api.GetSensorDataCommand.Request\x1a\'.cmvr.api.GetSensorDataCommand.Feedback\x12v\n\x13GetSensorDataStream\x12,.cmvr.api.GetSensorDataStreamCommand.Request\x1a-.cmvr.api.GetSensorDataStreamCommand.Feedback(\x01\x30\x01\x62\x06proto3')
_DEXHANDSERVICE = DESCRIPTOR.services_by_name['DexHandService']
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_DEXHANDSERVICE._serialized_start=77
_DEXHANDSERVICE._serialized_end=949
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,298 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from cmvr.api import dexhand_command_pb2 as cmvr_dot_api_dot_dexhand__command__pb2
class DexHandServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetStatus = channel.unary_unary(
'/cmvr.api.DexHandService/GetStatus',
request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Feedback.FromString,
)
self.SetDexHandPos = channel.unary_unary(
'/cmvr.api.DexHandService/SetDexHandPos',
request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Feedback.FromString,
)
self.SetDexHandAngle = channel.unary_unary(
'/cmvr.api.DexHandService/SetDexHandAngle',
request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Feedback.FromString,
)
self.SetDexHandForce = channel.unary_unary(
'/cmvr.api.DexHandService/SetDexHandForce',
request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Feedback.FromString,
)
self.SetDexHandSpeed = channel.unary_unary(
'/cmvr.api.DexHandService/SetDexHandSpeed',
request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Feedback.FromString,
)
self.SetDexHandPresetAct = channel.unary_unary(
'/cmvr.api.DexHandService/SetDexHandPresetAct',
request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Feedback.FromString,
)
self.GetSensorData = channel.unary_unary(
'/cmvr.api.DexHandService/GetSensorData',
request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Feedback.FromString,
)
self.GetSensorDataStream = channel.stream_stream(
'/cmvr.api.DexHandService/GetSensorDataStream',
request_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Feedback.FromString,
)
class DexHandServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def GetStatus(self, request, context):
"""基本控制
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetDexHandPos(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 SetDexHandAngle(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 SetDexHandForce(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 SetDexHandSpeed(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 SetDexHandPresetAct(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 GetSensorData(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 GetSensorDataStream(self, request_iterator, 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_DexHandServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetStatus': grpc.unary_unary_rpc_method_handler(
servicer.GetStatus,
request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Feedback.SerializeToString,
),
'SetDexHandPos': grpc.unary_unary_rpc_method_handler(
servicer.SetDexHandPos,
request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Feedback.SerializeToString,
),
'SetDexHandAngle': grpc.unary_unary_rpc_method_handler(
servicer.SetDexHandAngle,
request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Feedback.SerializeToString,
),
'SetDexHandForce': grpc.unary_unary_rpc_method_handler(
servicer.SetDexHandForce,
request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Feedback.SerializeToString,
),
'SetDexHandSpeed': grpc.unary_unary_rpc_method_handler(
servicer.SetDexHandSpeed,
request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Feedback.SerializeToString,
),
'SetDexHandPresetAct': grpc.unary_unary_rpc_method_handler(
servicer.SetDexHandPresetAct,
request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Feedback.SerializeToString,
),
'GetSensorData': grpc.unary_unary_rpc_method_handler(
servicer.GetSensorData,
request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Feedback.SerializeToString,
),
'GetSensorDataStream': grpc.stream_stream_rpc_method_handler(
servicer.GetSensorDataStream,
request_deserializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Feedback.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.DexHandService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class DexHandService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def GetStatus(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, '/cmvr.api.DexHandService/GetStatus',
cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Request.SerializeToString,
cmvr_dot_api_dot_dexhand__command__pb2.GetDexHandStateCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SetDexHandPos(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, '/cmvr.api.DexHandService/SetDexHandPos',
cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Request.SerializeToString,
cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPositionsCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SetDexHandAngle(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, '/cmvr.api.DexHandService/SetDexHandAngle',
cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Request.SerializeToString,
cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandAnglesCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SetDexHandForce(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, '/cmvr.api.DexHandService/SetDexHandForce',
cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Request.SerializeToString,
cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandForceCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SetDexHandSpeed(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, '/cmvr.api.DexHandService/SetDexHandSpeed',
cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Request.SerializeToString,
cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandSpeedCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SetDexHandPresetAct(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, '/cmvr.api.DexHandService/SetDexHandPresetAct',
cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Request.SerializeToString,
cmvr_dot_api_dot_dexhand__command__pb2.SetDexHandPresetActCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetSensorData(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, '/cmvr.api.DexHandService/GetSensorData',
cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Request.SerializeToString,
cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetSensorDataStream(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(request_iterator, target, '/cmvr.api.DexHandService/GetSensorDataStream',
cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Request.SerializeToString,
cmvr_dot_api_dot_dexhand__command__pb2.GetSensorDataStreamCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

View File

@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/hlc_command.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x63mvr/api/hlc_command.proto\x12\x08\x63mvr.api\x1a\x15\x63mvr/api/common.proto\"\xaa\x01\n\x05Touch\x1a\x63\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12\t\n\x01u\x18\x02 \x01(\x05\x12\t\n\x01v\x18\x03 \x01(\x05\x12\x11\n\tmax_force\x18\x04 \x01(\x01\x1a<\n\x08Response\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedbackb\x06proto3')
_TOUCH = DESCRIPTOR.message_types_by_name['Touch']
_TOUCH_REQUEST = _TOUCH.nested_types_by_name['Request']
_TOUCH_RESPONSE = _TOUCH.nested_types_by_name['Response']
Touch = _reflection.GeneratedProtocolMessageType('Touch', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _TOUCH_REQUEST,
'__module__' : 'cmvr.api.hlc_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.Touch.Request)
})
,
'Response' : _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), {
'DESCRIPTOR' : _TOUCH_RESPONSE,
'__module__' : 'cmvr.api.hlc_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.Touch.Response)
})
,
'DESCRIPTOR' : _TOUCH,
'__module__' : 'cmvr.api.hlc_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.Touch)
})
_sym_db.RegisterMessage(Touch)
_sym_db.RegisterMessage(Touch.Request)
_sym_db.RegisterMessage(Touch.Response)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_TOUCH._serialized_start=64
_TOUCH._serialized_end=234
_TOUCH_REQUEST._serialized_start=73
_TOUCH_REQUEST._serialized_end=172
_TOUCH_RESPONSE._serialized_start=174
_TOUCH_RESPONSE._serialized_end=234
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/hlc_service.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import hlc_command_pb2 as cmvr_dot_api_dot_hlc__command__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x63mvr/api/hlc_service.proto\x12\x08\x63mvr.api\x1a\x1a\x63mvr/api/hlc_command.proto2H\n\nHlcService\x12:\n\x05touch\x12\x17.cmvr.api.Touch.Request\x1a\x18.cmvr.api.Touch.Responseb\x06proto3')
_HLCSERVICE = DESCRIPTOR.services_by_name['HlcService']
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_HLCSERVICE._serialized_start=68
_HLCSERVICE._serialized_end=140
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,66 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from cmvr.api import hlc_command_pb2 as cmvr_dot_api_dot_hlc__command__pb2
class HlcServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.touch = channel.unary_unary(
'/cmvr.api.HlcService/touch',
request_serializer=cmvr_dot_api_dot_hlc__command__pb2.Touch.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_hlc__command__pb2.Touch.Response.FromString,
)
class HlcServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def touch(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_HlcServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'touch': grpc.unary_unary_rpc_method_handler(
servicer.touch,
request_deserializer=cmvr_dot_api_dot_hlc__command__pb2.Touch.Request.FromString,
response_serializer=cmvr_dot_api_dot_hlc__command__pb2.Touch.Response.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.HlcService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class HlcService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def touch(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, '/cmvr.api.HlcService/touch',
cmvr_dot_api_dot_hlc__command__pb2.Touch.Request.SerializeToString,
cmvr_dot_api_dot_hlc__command__pb2.Touch.Response.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

View File

@ -0,0 +1,261 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/humanoid_robot_command.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%cmvr/api/humanoid_robot_command.proto\x12\x08\x63mvr.api\x1a\x15\x63mvr/api/common.proto\"8\n\x08JointCmd\x12\x12\n\njoint_name\x18\x01 \x01(\t\x12\x0b\n\x03rad\x18\x02 \x01(\x01\x12\x0b\n\x03vel\x18\x03 \x01(\x01\"M\n\x06Pose3D\x12\t\n\x01x\x18\x01 \x01(\x01\x12\t\n\x01y\x18\x02 \x01(\x01\x12\t\n\x01z\x18\x03 \x01(\x01\x12\n\n\x02rx\x18\x04 \x01(\x01\x12\n\n\x02ry\x18\x05 \x01(\x01\x12\n\n\x02rz\x18\x06 \x01(\x01\"\xbd\x01\n\x05MoveJ\x1av\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12 \n\x04\x63mds\x18\x02 \x03(\x0b\x32\x12.cmvr.api.JointCmd\x12\x0b\n\x03vel\x18\x03 \x01(\x01\x12\x0b\n\x03\x61\x63\x63\x18\x04 \x01(\x01\x1a<\n\x08Response\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xd3\x01\n\x05MoveL\x1a\x8b\x01\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12\x0f\n\x07\x65\x65_link\x18\x02 \x01(\t\x12$\n\ntargetPose\x18\x03 \x01(\x0b\x32\x10.cmvr.api.Pose3D\x12\x0b\n\x03vel\x18\x04 \x01(\x01\x12\x0b\n\x03\x61\x63\x63\x18\x05 \x01(\x01\x1a<\n\x08Response\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xe2\x01\n\x06SpeedJ\x1a\x99\x01\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12\x12\n\njoint_name\x18\x02 \x01(\t\x12\x0b\n\x03vel\x18\x03 \x01(\x01\x12\x0b\n\x03\x61\x63\x63\x18\x04 \x01(\x01\x12/\n\x03\x64ir\x18\x05 \x01(\x0e\x32\".cmvr.api.RobotJointIndexDirection\x1a<\n\x08Response\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\x87\x02\n\x06SpeedL\x1a\xbe\x01\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12\x0f\n\x07\x65\x65_link\x18\x02 \x01(\t\x12\x0b\n\x03vel\x18\x03 \x01(\x01\x12\x0b\n\x03\x61\x63\x63\x18\x04 \x01(\x01\x12/\n\x03\x64ir\x18\x05 \x01(\x0e\x32\".cmvr.api.RobotJointIndexDirection\x12&\n\x04\x63\x61rt\x18\x06 \x01(\x0e\x32\x18.cmvr.api.RobotCartesian\x1a<\n\x08Response\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"a\n\nJointState\x12\x0c\n\x04name\x18\x01 \x03(\t\x12\x10\n\x08position\x18\x02 \x03(\x01\x12\x10\n\x08velocity\x18\x03 \x03(\x01\x12\x0e\n\x06\x65\x66\x66ort\x18\x04 \x03(\x01\x12\x11\n\ttimestamp\x18\x05 \x01(\x01\"f\n\rJointResponse\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12#\n\x05state\x18\x02 \x03(\x0b\x32\x14.cmvr.api.JointState\"?\n\x0cJointRequest\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\"\xc7\x01\n\x07GetPose\x1a^\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12\x11\n\tbase_link\x18\x02 \x01(\t\x12\x0f\n\x07\x65\x65_link\x18\x03 \x01(\t\x1a\\\n\x08Response\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12\x1e\n\x04pose\x18\x02 \x01(\x0b\x32\x10.cmvr.api.Pose3D*=\n\x0eRobotCartesian\x12\x05\n\x01X\x10\x00\x12\x05\n\x01Y\x10\x01\x12\x05\n\x01Z\x10\x02\x12\x06\n\x02RX\x10\x03\x12\x06\n\x02RY\x10\x04\x12\x06\n\x02RZ\x10\x05*\xbf\x01\n\x18RobotJointIndexDirection\x12\x0b\n\x07\x46ORWARD\x10\x00\x12\x0c\n\x08\x42\x41\x43KWARD\x10\x01\x12\x0e\n\nX_POSITIVE\x10\x02\x12\x0e\n\nX_NEGATIVE\x10\x03\x12\x0e\n\nY_POSITIVE\x10\x04\x12\x0e\n\nY_NEGATIVE\x10\x05\x12\x0e\n\nZ_POSITIVE\x10\x06\x12\x0e\n\nZ_NEGATIVE\x10\x07\x12\x0c\n\x08ROTATE_X\x10\x08\x12\x0c\n\x08ROTATE_Y\x10\t\x12\x0c\n\x08ROTATE_Z\x10\nb\x06proto3')
_ROBOTCARTESIAN = DESCRIPTOR.enum_types_by_name['RobotCartesian']
RobotCartesian = enum_type_wrapper.EnumTypeWrapper(_ROBOTCARTESIAN)
_ROBOTJOINTINDEXDIRECTION = DESCRIPTOR.enum_types_by_name['RobotJointIndexDirection']
RobotJointIndexDirection = enum_type_wrapper.EnumTypeWrapper(_ROBOTJOINTINDEXDIRECTION)
X = 0
Y = 1
Z = 2
RX = 3
RY = 4
RZ = 5
FORWARD = 0
BACKWARD = 1
X_POSITIVE = 2
X_NEGATIVE = 3
Y_POSITIVE = 4
Y_NEGATIVE = 5
Z_POSITIVE = 6
Z_NEGATIVE = 7
ROTATE_X = 8
ROTATE_Y = 9
ROTATE_Z = 10
_JOINTCMD = DESCRIPTOR.message_types_by_name['JointCmd']
_POSE3D = DESCRIPTOR.message_types_by_name['Pose3D']
_MOVEJ = DESCRIPTOR.message_types_by_name['MoveJ']
_MOVEJ_REQUEST = _MOVEJ.nested_types_by_name['Request']
_MOVEJ_RESPONSE = _MOVEJ.nested_types_by_name['Response']
_MOVEL = DESCRIPTOR.message_types_by_name['MoveL']
_MOVEL_REQUEST = _MOVEL.nested_types_by_name['Request']
_MOVEL_RESPONSE = _MOVEL.nested_types_by_name['Response']
_SPEEDJ = DESCRIPTOR.message_types_by_name['SpeedJ']
_SPEEDJ_REQUEST = _SPEEDJ.nested_types_by_name['Request']
_SPEEDJ_RESPONSE = _SPEEDJ.nested_types_by_name['Response']
_SPEEDL = DESCRIPTOR.message_types_by_name['SpeedL']
_SPEEDL_REQUEST = _SPEEDL.nested_types_by_name['Request']
_SPEEDL_RESPONSE = _SPEEDL.nested_types_by_name['Response']
_JOINTSTATE = DESCRIPTOR.message_types_by_name['JointState']
_JOINTRESPONSE = DESCRIPTOR.message_types_by_name['JointResponse']
_JOINTREQUEST = DESCRIPTOR.message_types_by_name['JointRequest']
_GETPOSE = DESCRIPTOR.message_types_by_name['GetPose']
_GETPOSE_REQUEST = _GETPOSE.nested_types_by_name['Request']
_GETPOSE_RESPONSE = _GETPOSE.nested_types_by_name['Response']
JointCmd = _reflection.GeneratedProtocolMessageType('JointCmd', (_message.Message,), {
'DESCRIPTOR' : _JOINTCMD,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.JointCmd)
})
_sym_db.RegisterMessage(JointCmd)
Pose3D = _reflection.GeneratedProtocolMessageType('Pose3D', (_message.Message,), {
'DESCRIPTOR' : _POSE3D,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.Pose3D)
})
_sym_db.RegisterMessage(Pose3D)
MoveJ = _reflection.GeneratedProtocolMessageType('MoveJ', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _MOVEJ_REQUEST,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.MoveJ.Request)
})
,
'Response' : _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), {
'DESCRIPTOR' : _MOVEJ_RESPONSE,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.MoveJ.Response)
})
,
'DESCRIPTOR' : _MOVEJ,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.MoveJ)
})
_sym_db.RegisterMessage(MoveJ)
_sym_db.RegisterMessage(MoveJ.Request)
_sym_db.RegisterMessage(MoveJ.Response)
MoveL = _reflection.GeneratedProtocolMessageType('MoveL', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _MOVEL_REQUEST,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.MoveL.Request)
})
,
'Response' : _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), {
'DESCRIPTOR' : _MOVEL_RESPONSE,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.MoveL.Response)
})
,
'DESCRIPTOR' : _MOVEL,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.MoveL)
})
_sym_db.RegisterMessage(MoveL)
_sym_db.RegisterMessage(MoveL.Request)
_sym_db.RegisterMessage(MoveL.Response)
SpeedJ = _reflection.GeneratedProtocolMessageType('SpeedJ', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _SPEEDJ_REQUEST,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SpeedJ.Request)
})
,
'Response' : _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), {
'DESCRIPTOR' : _SPEEDJ_RESPONSE,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SpeedJ.Response)
})
,
'DESCRIPTOR' : _SPEEDJ,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SpeedJ)
})
_sym_db.RegisterMessage(SpeedJ)
_sym_db.RegisterMessage(SpeedJ.Request)
_sym_db.RegisterMessage(SpeedJ.Response)
SpeedL = _reflection.GeneratedProtocolMessageType('SpeedL', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _SPEEDL_REQUEST,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SpeedL.Request)
})
,
'Response' : _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), {
'DESCRIPTOR' : _SPEEDL_RESPONSE,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SpeedL.Response)
})
,
'DESCRIPTOR' : _SPEEDL,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SpeedL)
})
_sym_db.RegisterMessage(SpeedL)
_sym_db.RegisterMessage(SpeedL.Request)
_sym_db.RegisterMessage(SpeedL.Response)
JointState = _reflection.GeneratedProtocolMessageType('JointState', (_message.Message,), {
'DESCRIPTOR' : _JOINTSTATE,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.JointState)
})
_sym_db.RegisterMessage(JointState)
JointResponse = _reflection.GeneratedProtocolMessageType('JointResponse', (_message.Message,), {
'DESCRIPTOR' : _JOINTRESPONSE,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.JointResponse)
})
_sym_db.RegisterMessage(JointResponse)
JointRequest = _reflection.GeneratedProtocolMessageType('JointRequest', (_message.Message,), {
'DESCRIPTOR' : _JOINTREQUEST,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.JointRequest)
})
_sym_db.RegisterMessage(JointRequest)
GetPose = _reflection.GeneratedProtocolMessageType('GetPose', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETPOSE_REQUEST,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetPose.Request)
})
,
'Response' : _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), {
'DESCRIPTOR' : _GETPOSE_RESPONSE,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetPose.Response)
})
,
'DESCRIPTOR' : _GETPOSE,
'__module__' : 'cmvr.api.humanoid_robot_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetPose)
})
_sym_db.RegisterMessage(GetPose)
_sym_db.RegisterMessage(GetPose.Request)
_sym_db.RegisterMessage(GetPose.Response)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_ROBOTCARTESIAN._serialized_start=1582
_ROBOTCARTESIAN._serialized_end=1643
_ROBOTJOINTINDEXDIRECTION._serialized_start=1646
_ROBOTJOINTINDEXDIRECTION._serialized_end=1837
_JOINTCMD._serialized_start=74
_JOINTCMD._serialized_end=130
_POSE3D._serialized_start=132
_POSE3D._serialized_end=209
_MOVEJ._serialized_start=212
_MOVEJ._serialized_end=401
_MOVEJ_REQUEST._serialized_start=221
_MOVEJ_REQUEST._serialized_end=339
_MOVEJ_RESPONSE._serialized_start=341
_MOVEJ_RESPONSE._serialized_end=401
_MOVEL._serialized_start=404
_MOVEL._serialized_end=615
_MOVEL_REQUEST._serialized_start=414
_MOVEL_REQUEST._serialized_end=553
_MOVEL_RESPONSE._serialized_start=341
_MOVEL_RESPONSE._serialized_end=401
_SPEEDJ._serialized_start=618
_SPEEDJ._serialized_end=844
_SPEEDJ_REQUEST._serialized_start=629
_SPEEDJ_REQUEST._serialized_end=782
_SPEEDJ_RESPONSE._serialized_start=341
_SPEEDJ_RESPONSE._serialized_end=401
_SPEEDL._serialized_start=847
_SPEEDL._serialized_end=1110
_SPEEDL_REQUEST._serialized_start=858
_SPEEDL_REQUEST._serialized_end=1048
_SPEEDL_RESPONSE._serialized_start=341
_SPEEDL_RESPONSE._serialized_end=401
_JOINTSTATE._serialized_start=1112
_JOINTSTATE._serialized_end=1209
_JOINTRESPONSE._serialized_start=1211
_JOINTRESPONSE._serialized_end=1313
_JOINTREQUEST._serialized_start=1315
_JOINTREQUEST._serialized_end=1378
_GETPOSE._serialized_start=1381
_GETPOSE._serialized_end=1580
_GETPOSE_REQUEST._serialized_start=1392
_GETPOSE_REQUEST._serialized_end=1486
_GETPOSE_RESPONSE._serialized_start=1488
_GETPOSE_RESPONSE._serialized_end=1580
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/humanoid_robot_service.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__pb2
from cmvr.api import humanoid_robot_command_pb2 as cmvr_dot_api_dot_humanoid__robot__command__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%cmvr/api/humanoid_robot_service.proto\x12\x08\x63mvr.api\x1a\x15\x63mvr/api/common.proto\x1a%cmvr/api/humanoid_robot_command.proto2\xaf\x04\n\x14HumanoidRobotService\x12N\n\ttorqueOff\x12\x1f.cmvr.api.CommandHeader.Request\x1a .cmvr.api.CommandHeader.Feedback\x12M\n\x08torqueOn\x12\x1f.cmvr.api.CommandHeader.Request\x1a .cmvr.api.CommandHeader.Feedback\x12:\n\x05moveJ\x12\x17.cmvr.api.MoveJ.Request\x1a\x18.cmvr.api.MoveJ.Response\x12:\n\x05moveL\x12\x17.cmvr.api.MoveL.Request\x1a\x18.cmvr.api.MoveL.Response\x12=\n\x06speedJ\x12\x18.cmvr.api.SpeedJ.Request\x1a\x19.cmvr.api.SpeedJ.Response\x12=\n\x06speedL\x12\x18.cmvr.api.SpeedL.Request\x1a\x19.cmvr.api.SpeedL.Response\x12@\n\rgetJointState\x12\x16.cmvr.api.JointRequest\x1a\x17.cmvr.api.JointResponse\x12@\n\x07getPose\x12\x19.cmvr.api.GetPose.Request\x1a\x1a.cmvr.api.GetPose.Responseb\x06proto3')
_HUMANOIDROBOTSERVICE = DESCRIPTOR.services_by_name['HumanoidRobotService']
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_HUMANOIDROBOTSERVICE._serialized_start=114
_HUMANOIDROBOTSERVICE._serialized_end=673
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,298 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__pb2
from cmvr.api import humanoid_robot_command_pb2 as cmvr_dot_api_dot_humanoid__robot__command__pb2
class HumanoidRobotServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.torqueOff = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/torqueOff',
request_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
)
self.torqueOn = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/torqueOn',
request_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
)
self.moveJ = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/moveJ',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Response.FromString,
)
self.moveL = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/moveL',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Response.FromString,
)
self.speedJ = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/speedJ',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Response.FromString,
)
self.speedL = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/speedL',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Response.FromString,
)
self.getJointState = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/getJointState',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.JointRequest.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.JointResponse.FromString,
)
self.getPose = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/getPose',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Response.FromString,
)
class HumanoidRobotServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def torqueOff(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 torqueOn(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 moveJ(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 moveL(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 speedJ(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 speedL(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 getJointState(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 getPose(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_HumanoidRobotServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'torqueOff': grpc.unary_unary_rpc_method_handler(
servicer.torqueOff,
request_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.FromString,
response_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.SerializeToString,
),
'torqueOn': grpc.unary_unary_rpc_method_handler(
servicer.torqueOn,
request_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.FromString,
response_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.SerializeToString,
),
'moveJ': grpc.unary_unary_rpc_method_handler(
servicer.moveJ,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Response.SerializeToString,
),
'moveL': grpc.unary_unary_rpc_method_handler(
servicer.moveL,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Response.SerializeToString,
),
'speedJ': grpc.unary_unary_rpc_method_handler(
servicer.speedJ,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Response.SerializeToString,
),
'speedL': grpc.unary_unary_rpc_method_handler(
servicer.speedL,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Response.SerializeToString,
),
'getJointState': grpc.unary_unary_rpc_method_handler(
servicer.getJointState,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.JointRequest.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.JointResponse.SerializeToString,
),
'getPose': grpc.unary_unary_rpc_method_handler(
servicer.getPose,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Response.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.HumanoidRobotService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class HumanoidRobotService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def torqueOff(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, '/cmvr.api.HumanoidRobotService/torqueOff',
cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def torqueOn(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, '/cmvr.api.HumanoidRobotService/torqueOn',
cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def moveJ(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, '/cmvr.api.HumanoidRobotService/moveJ',
cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Response.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def moveL(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, '/cmvr.api.HumanoidRobotService/moveL',
cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Response.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def speedJ(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, '/cmvr.api.HumanoidRobotService/speedJ',
cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Response.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def speedL(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, '/cmvr.api.HumanoidRobotService/speedL',
cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Response.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def getJointState(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, '/cmvr.api.HumanoidRobotService/getJointState',
cmvr_dot_api_dot_humanoid__robot__command__pb2.JointRequest.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.JointResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def getPose(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, '/cmvr.api.HumanoidRobotService/getPose',
cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Response.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

View File

@ -0,0 +1,259 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/microphone_command.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!cmvr/api/microphone_command.proto\x12\x08\x63mvr.api\x1a\x15\x63mvr/api/common.proto\"s\n\x08MicState\x12\x16\n\x0eis_initialized\x18\x01 \x01(\x08\x12\x12\n\nis_running\x18\x02 \x01(\x08\x12\x14\n\x0cis_recording\x18\x03 \x01(\x08\x12\x0e\n\x06volume\x18\x04 \x01(\x05\x12\x15\n\rerror_message\x18\x05 \x01(\t\"\xb1\x01\n\x12GetMicStateCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a_\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12!\n\x05state\x18\x02 \x01(\x0b\x32\x12.cmvr.api.MicState\"\xa7\x01\n\x18StartMicRecordingCommand\x1aM\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12\x11\n\tfile_path\x18\x02 \x01(\t\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\x93\x01\n\x17StopMicRecordingCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\x94\x01\n\x18PauseMicRecordingCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\x95\x01\n\x19ResumeMicRecordingCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xa4\x01\n\x18SetMicPhoneVolumeCommand\x1aJ\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12\x0e\n\x06volume\x18\x02 \x01(\x05\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xa4\x01\n\x18GetMicPhoneVolumeCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1aL\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12\x0e\n\x06volume\x18\x02 \x01(\x05\x62\x06proto3')
_MICSTATE = DESCRIPTOR.message_types_by_name['MicState']
_GETMICSTATECOMMAND = DESCRIPTOR.message_types_by_name['GetMicStateCommand']
_GETMICSTATECOMMAND_REQUEST = _GETMICSTATECOMMAND.nested_types_by_name['Request']
_GETMICSTATECOMMAND_FEEDBACK = _GETMICSTATECOMMAND.nested_types_by_name['Feedback']
_STARTMICRECORDINGCOMMAND = DESCRIPTOR.message_types_by_name['StartMicRecordingCommand']
_STARTMICRECORDINGCOMMAND_REQUEST = _STARTMICRECORDINGCOMMAND.nested_types_by_name['Request']
_STARTMICRECORDINGCOMMAND_FEEDBACK = _STARTMICRECORDINGCOMMAND.nested_types_by_name['Feedback']
_STOPMICRECORDINGCOMMAND = DESCRIPTOR.message_types_by_name['StopMicRecordingCommand']
_STOPMICRECORDINGCOMMAND_REQUEST = _STOPMICRECORDINGCOMMAND.nested_types_by_name['Request']
_STOPMICRECORDINGCOMMAND_FEEDBACK = _STOPMICRECORDINGCOMMAND.nested_types_by_name['Feedback']
_PAUSEMICRECORDINGCOMMAND = DESCRIPTOR.message_types_by_name['PauseMicRecordingCommand']
_PAUSEMICRECORDINGCOMMAND_REQUEST = _PAUSEMICRECORDINGCOMMAND.nested_types_by_name['Request']
_PAUSEMICRECORDINGCOMMAND_FEEDBACK = _PAUSEMICRECORDINGCOMMAND.nested_types_by_name['Feedback']
_RESUMEMICRECORDINGCOMMAND = DESCRIPTOR.message_types_by_name['ResumeMicRecordingCommand']
_RESUMEMICRECORDINGCOMMAND_REQUEST = _RESUMEMICRECORDINGCOMMAND.nested_types_by_name['Request']
_RESUMEMICRECORDINGCOMMAND_FEEDBACK = _RESUMEMICRECORDINGCOMMAND.nested_types_by_name['Feedback']
_SETMICPHONEVOLUMECOMMAND = DESCRIPTOR.message_types_by_name['SetMicPhoneVolumeCommand']
_SETMICPHONEVOLUMECOMMAND_REQUEST = _SETMICPHONEVOLUMECOMMAND.nested_types_by_name['Request']
_SETMICPHONEVOLUMECOMMAND_FEEDBACK = _SETMICPHONEVOLUMECOMMAND.nested_types_by_name['Feedback']
_GETMICPHONEVOLUMECOMMAND = DESCRIPTOR.message_types_by_name['GetMicPhoneVolumeCommand']
_GETMICPHONEVOLUMECOMMAND_REQUEST = _GETMICPHONEVOLUMECOMMAND.nested_types_by_name['Request']
_GETMICPHONEVOLUMECOMMAND_FEEDBACK = _GETMICPHONEVOLUMECOMMAND.nested_types_by_name['Feedback']
MicState = _reflection.GeneratedProtocolMessageType('MicState', (_message.Message,), {
'DESCRIPTOR' : _MICSTATE,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.MicState)
})
_sym_db.RegisterMessage(MicState)
GetMicStateCommand = _reflection.GeneratedProtocolMessageType('GetMicStateCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETMICSTATECOMMAND_REQUEST,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetMicStateCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _GETMICSTATECOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetMicStateCommand.Feedback)
})
,
'DESCRIPTOR' : _GETMICSTATECOMMAND,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetMicStateCommand)
})
_sym_db.RegisterMessage(GetMicStateCommand)
_sym_db.RegisterMessage(GetMicStateCommand.Request)
_sym_db.RegisterMessage(GetMicStateCommand.Feedback)
StartMicRecordingCommand = _reflection.GeneratedProtocolMessageType('StartMicRecordingCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _STARTMICRECORDINGCOMMAND_REQUEST,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StartMicRecordingCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _STARTMICRECORDINGCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StartMicRecordingCommand.Feedback)
})
,
'DESCRIPTOR' : _STARTMICRECORDINGCOMMAND,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StartMicRecordingCommand)
})
_sym_db.RegisterMessage(StartMicRecordingCommand)
_sym_db.RegisterMessage(StartMicRecordingCommand.Request)
_sym_db.RegisterMessage(StartMicRecordingCommand.Feedback)
StopMicRecordingCommand = _reflection.GeneratedProtocolMessageType('StopMicRecordingCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _STOPMICRECORDINGCOMMAND_REQUEST,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StopMicRecordingCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _STOPMICRECORDINGCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StopMicRecordingCommand.Feedback)
})
,
'DESCRIPTOR' : _STOPMICRECORDINGCOMMAND,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StopMicRecordingCommand)
})
_sym_db.RegisterMessage(StopMicRecordingCommand)
_sym_db.RegisterMessage(StopMicRecordingCommand.Request)
_sym_db.RegisterMessage(StopMicRecordingCommand.Feedback)
PauseMicRecordingCommand = _reflection.GeneratedProtocolMessageType('PauseMicRecordingCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _PAUSEMICRECORDINGCOMMAND_REQUEST,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.PauseMicRecordingCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _PAUSEMICRECORDINGCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.PauseMicRecordingCommand.Feedback)
})
,
'DESCRIPTOR' : _PAUSEMICRECORDINGCOMMAND,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.PauseMicRecordingCommand)
})
_sym_db.RegisterMessage(PauseMicRecordingCommand)
_sym_db.RegisterMessage(PauseMicRecordingCommand.Request)
_sym_db.RegisterMessage(PauseMicRecordingCommand.Feedback)
ResumeMicRecordingCommand = _reflection.GeneratedProtocolMessageType('ResumeMicRecordingCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _RESUMEMICRECORDINGCOMMAND_REQUEST,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.ResumeMicRecordingCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _RESUMEMICRECORDINGCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.ResumeMicRecordingCommand.Feedback)
})
,
'DESCRIPTOR' : _RESUMEMICRECORDINGCOMMAND,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.ResumeMicRecordingCommand)
})
_sym_db.RegisterMessage(ResumeMicRecordingCommand)
_sym_db.RegisterMessage(ResumeMicRecordingCommand.Request)
_sym_db.RegisterMessage(ResumeMicRecordingCommand.Feedback)
SetMicPhoneVolumeCommand = _reflection.GeneratedProtocolMessageType('SetMicPhoneVolumeCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _SETMICPHONEVOLUMECOMMAND_REQUEST,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetMicPhoneVolumeCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _SETMICPHONEVOLUMECOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetMicPhoneVolumeCommand.Feedback)
})
,
'DESCRIPTOR' : _SETMICPHONEVOLUMECOMMAND,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetMicPhoneVolumeCommand)
})
_sym_db.RegisterMessage(SetMicPhoneVolumeCommand)
_sym_db.RegisterMessage(SetMicPhoneVolumeCommand.Request)
_sym_db.RegisterMessage(SetMicPhoneVolumeCommand.Feedback)
GetMicPhoneVolumeCommand = _reflection.GeneratedProtocolMessageType('GetMicPhoneVolumeCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETMICPHONEVOLUMECOMMAND_REQUEST,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetMicPhoneVolumeCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _GETMICPHONEVOLUMECOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetMicPhoneVolumeCommand.Feedback)
})
,
'DESCRIPTOR' : _GETMICPHONEVOLUMECOMMAND,
'__module__' : 'cmvr.api.microphone_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetMicPhoneVolumeCommand)
})
_sym_db.RegisterMessage(GetMicPhoneVolumeCommand)
_sym_db.RegisterMessage(GetMicPhoneVolumeCommand.Request)
_sym_db.RegisterMessage(GetMicPhoneVolumeCommand.Feedback)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_MICSTATE._serialized_start=70
_MICSTATE._serialized_end=185
_GETMICSTATECOMMAND._serialized_start=188
_GETMICSTATECOMMAND._serialized_end=365
_GETMICSTATECOMMAND_REQUEST._serialized_start=210
_GETMICSTATECOMMAND_REQUEST._serialized_end=268
_GETMICSTATECOMMAND_FEEDBACK._serialized_start=270
_GETMICSTATECOMMAND_FEEDBACK._serialized_end=365
_STARTMICRECORDINGCOMMAND._serialized_start=368
_STARTMICRECORDINGCOMMAND._serialized_end=535
_STARTMICRECORDINGCOMMAND_REQUEST._serialized_start=396
_STARTMICRECORDINGCOMMAND_REQUEST._serialized_end=473
_STARTMICRECORDINGCOMMAND_FEEDBACK._serialized_start=270
_STARTMICRECORDINGCOMMAND_FEEDBACK._serialized_end=330
_STOPMICRECORDINGCOMMAND._serialized_start=538
_STOPMICRECORDINGCOMMAND._serialized_end=685
_STOPMICRECORDINGCOMMAND_REQUEST._serialized_start=210
_STOPMICRECORDINGCOMMAND_REQUEST._serialized_end=268
_STOPMICRECORDINGCOMMAND_FEEDBACK._serialized_start=270
_STOPMICRECORDINGCOMMAND_FEEDBACK._serialized_end=330
_PAUSEMICRECORDINGCOMMAND._serialized_start=688
_PAUSEMICRECORDINGCOMMAND._serialized_end=836
_PAUSEMICRECORDINGCOMMAND_REQUEST._serialized_start=210
_PAUSEMICRECORDINGCOMMAND_REQUEST._serialized_end=268
_PAUSEMICRECORDINGCOMMAND_FEEDBACK._serialized_start=270
_PAUSEMICRECORDINGCOMMAND_FEEDBACK._serialized_end=330
_RESUMEMICRECORDINGCOMMAND._serialized_start=839
_RESUMEMICRECORDINGCOMMAND._serialized_end=988
_RESUMEMICRECORDINGCOMMAND_REQUEST._serialized_start=210
_RESUMEMICRECORDINGCOMMAND_REQUEST._serialized_end=268
_RESUMEMICRECORDINGCOMMAND_FEEDBACK._serialized_start=270
_RESUMEMICRECORDINGCOMMAND_FEEDBACK._serialized_end=330
_SETMICPHONEVOLUMECOMMAND._serialized_start=991
_SETMICPHONEVOLUMECOMMAND._serialized_end=1155
_SETMICPHONEVOLUMECOMMAND_REQUEST._serialized_start=1019
_SETMICPHONEVOLUMECOMMAND_REQUEST._serialized_end=1093
_SETMICPHONEVOLUMECOMMAND_FEEDBACK._serialized_start=270
_SETMICPHONEVOLUMECOMMAND_FEEDBACK._serialized_end=330
_GETMICPHONEVOLUMECOMMAND._serialized_start=1158
_GETMICPHONEVOLUMECOMMAND._serialized_end=1322
_GETMICPHONEVOLUMECOMMAND_REQUEST._serialized_start=210
_GETMICPHONEVOLUMECOMMAND_REQUEST._serialized_end=268
_GETMICPHONEVOLUMECOMMAND_FEEDBACK._serialized_start=1246
_GETMICPHONEVOLUMECOMMAND_FEEDBACK._serialized_end=1322
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/microphone_service.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import microphone_command_pb2 as cmvr_dot_api_dot_microphone__command__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!cmvr/api/microphone_service.proto\x12\x08\x63mvr.api\x1a!cmvr/api/microphone_command.proto2\xd7\x05\n\x0fMicPhoneService\x12X\n\tGetStatus\x12$.cmvr.api.GetMicStateCommand.Request\x1a%.cmvr.api.GetMicStateCommand.Feedback\x12\x66\n\x0bStartRecord\x12*.cmvr.api.StartMicRecordingCommand.Request\x1a+.cmvr.api.StartMicRecordingCommand.Feedback\x12\x63\n\nStopRecord\x12).cmvr.api.StopMicRecordingCommand.Request\x1a*.cmvr.api.StopMicRecordingCommand.Feedback\x12\x66\n\x0bPauseRecord\x12*.cmvr.api.PauseMicRecordingCommand.Request\x1a+.cmvr.api.PauseMicRecordingCommand.Feedback\x12i\n\x0cResumeRecord\x12+.cmvr.api.ResumeMicRecordingCommand.Request\x1a,.cmvr.api.ResumeMicRecordingCommand.Feedback\x12\x64\n\tSetVolume\x12*.cmvr.api.SetMicPhoneVolumeCommand.Request\x1a+.cmvr.api.SetMicPhoneVolumeCommand.Feedback\x12\x64\n\tGetVolume\x12*.cmvr.api.GetMicPhoneVolumeCommand.Request\x1a+.cmvr.api.GetMicPhoneVolumeCommand.Feedbackb\x06proto3')
_MICPHONESERVICE = DESCRIPTOR.services_by_name['MicPhoneService']
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_MICPHONESERVICE._serialized_start=83
_MICPHONESERVICE._serialized_end=810
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,266 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from cmvr.api import microphone_command_pb2 as cmvr_dot_api_dot_microphone__command__pb2
class MicPhoneServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetStatus = channel.unary_unary(
'/cmvr.api.MicPhoneService/GetStatus',
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Feedback.FromString,
)
self.StartRecord = channel.unary_unary(
'/cmvr.api.MicPhoneService/StartRecord',
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Feedback.FromString,
)
self.StopRecord = channel.unary_unary(
'/cmvr.api.MicPhoneService/StopRecord',
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Feedback.FromString,
)
self.PauseRecord = channel.unary_unary(
'/cmvr.api.MicPhoneService/PauseRecord',
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Feedback.FromString,
)
self.ResumeRecord = channel.unary_unary(
'/cmvr.api.MicPhoneService/ResumeRecord',
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Feedback.FromString,
)
self.SetVolume = channel.unary_unary(
'/cmvr.api.MicPhoneService/SetVolume',
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Feedback.FromString,
)
self.GetVolume = channel.unary_unary(
'/cmvr.api.MicPhoneService/GetVolume',
request_serializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Feedback.FromString,
)
class MicPhoneServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def GetStatus(self, request, context):
"""基本控制
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def StartRecord(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 StopRecord(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 PauseRecord(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 ResumeRecord(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 SetVolume(self, request, context):
"""音量控制
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetVolume(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_MicPhoneServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetStatus': grpc.unary_unary_rpc_method_handler(
servicer.GetStatus,
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Feedback.SerializeToString,
),
'StartRecord': grpc.unary_unary_rpc_method_handler(
servicer.StartRecord,
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Feedback.SerializeToString,
),
'StopRecord': grpc.unary_unary_rpc_method_handler(
servicer.StopRecord,
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Feedback.SerializeToString,
),
'PauseRecord': grpc.unary_unary_rpc_method_handler(
servicer.PauseRecord,
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Feedback.SerializeToString,
),
'ResumeRecord': grpc.unary_unary_rpc_method_handler(
servicer.ResumeRecord,
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Feedback.SerializeToString,
),
'SetVolume': grpc.unary_unary_rpc_method_handler(
servicer.SetVolume,
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Feedback.SerializeToString,
),
'GetVolume': grpc.unary_unary_rpc_method_handler(
servicer.GetVolume,
request_deserializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Feedback.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.MicPhoneService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class MicPhoneService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def GetStatus(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, '/cmvr.api.MicPhoneService/GetStatus',
cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Request.SerializeToString,
cmvr_dot_api_dot_microphone__command__pb2.GetMicStateCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def StartRecord(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, '/cmvr.api.MicPhoneService/StartRecord',
cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Request.SerializeToString,
cmvr_dot_api_dot_microphone__command__pb2.StartMicRecordingCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def StopRecord(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, '/cmvr.api.MicPhoneService/StopRecord',
cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Request.SerializeToString,
cmvr_dot_api_dot_microphone__command__pb2.StopMicRecordingCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def PauseRecord(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, '/cmvr.api.MicPhoneService/PauseRecord',
cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Request.SerializeToString,
cmvr_dot_api_dot_microphone__command__pb2.PauseMicRecordingCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def ResumeRecord(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, '/cmvr.api.MicPhoneService/ResumeRecord',
cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Request.SerializeToString,
cmvr_dot_api_dot_microphone__command__pb2.ResumeMicRecordingCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SetVolume(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, '/cmvr.api.MicPhoneService/SetVolume',
cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Request.SerializeToString,
cmvr_dot_api_dot_microphone__command__pb2.SetMicPhoneVolumeCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetVolume(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, '/cmvr.api.MicPhoneService/GetVolume',
cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Request.SerializeToString,
cmvr_dot_api_dot_microphone__command__pb2.GetMicPhoneVolumeCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

View File

@ -0,0 +1,272 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/speaker_command.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x63mvr/api/speaker_command.proto\x12\x08\x63mvr.api\x1a\x15\x63mvr/api/common.proto\"\xb3\x01\n\tAudioData\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x13\n\x0bsample_rate\x18\x02 \x01(\x05\x12\x10\n\x08\x63hannels\x18\x03 \x01(\x05\x12/\n\x06\x66ormat\x18\x04 \x01(\x0e\x32\x1f.cmvr.api.AudioData.AudioFormat\x12\r\n\x05\x63odec\x18\x05 \x01(\t\"1\n\x0b\x41udioFormat\x12\x07\n\x03PCM\x10\x00\x12\x07\n\x03MP3\x10\x01\x12\x07\n\x03\x41\x41\x43\x10\x02\x12\x07\n\x03WAV\x10\x03\"\x89\x01\n\x0cSpeakerState\x12\x16\n\x0eis_initialized\x18\x01 \x01(\x08\x12\x12\n\nis_running\x18\x02 \x01(\x08\x12\x13\n\x0bis_decoding\x18\x03 \x01(\x08\x12\x11\n\tis_paused\x18\x05 \x01(\x08\x12\x0e\n\x06volume\x18\x06 \x01(\x05\x12\x15\n\rerror_message\x18\x07 \x01(\t\"\xb9\x01\n\x16GetSpeakerStateCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a\x63\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12%\n\x05state\x18\x02 \x01(\x0b\x32\x16.cmvr.api.SpeakerState\"\xa0\x01\n\x10PlayAudioCommand\x1aN\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12\x12\n\naudio_path\x18\x02 \x01(\t\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\x8e\x01\n\x12StopSpeakerCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\x8f\x01\n\x13PauseSpeakerCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\x90\x01\n\x14ResumeSpeakerCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xa3\x01\n\x17SetSpeakerVolumeCommand\x1aJ\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12\x0e\n\x06volume\x18\x02 \x01(\x05\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\"\xa3\x01\n\x17GetSpeakerVolumeCommand\x1a:\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x1aL\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12\x0e\n\x06volume\x18\x02 \x01(\x05\x62\x06proto3')
_AUDIODATA = DESCRIPTOR.message_types_by_name['AudioData']
_SPEAKERSTATE = DESCRIPTOR.message_types_by_name['SpeakerState']
_GETSPEAKERSTATECOMMAND = DESCRIPTOR.message_types_by_name['GetSpeakerStateCommand']
_GETSPEAKERSTATECOMMAND_REQUEST = _GETSPEAKERSTATECOMMAND.nested_types_by_name['Request']
_GETSPEAKERSTATECOMMAND_FEEDBACK = _GETSPEAKERSTATECOMMAND.nested_types_by_name['Feedback']
_PLAYAUDIOCOMMAND = DESCRIPTOR.message_types_by_name['PlayAudioCommand']
_PLAYAUDIOCOMMAND_REQUEST = _PLAYAUDIOCOMMAND.nested_types_by_name['Request']
_PLAYAUDIOCOMMAND_FEEDBACK = _PLAYAUDIOCOMMAND.nested_types_by_name['Feedback']
_STOPSPEAKERCOMMAND = DESCRIPTOR.message_types_by_name['StopSpeakerCommand']
_STOPSPEAKERCOMMAND_REQUEST = _STOPSPEAKERCOMMAND.nested_types_by_name['Request']
_STOPSPEAKERCOMMAND_FEEDBACK = _STOPSPEAKERCOMMAND.nested_types_by_name['Feedback']
_PAUSESPEAKERCOMMAND = DESCRIPTOR.message_types_by_name['PauseSpeakerCommand']
_PAUSESPEAKERCOMMAND_REQUEST = _PAUSESPEAKERCOMMAND.nested_types_by_name['Request']
_PAUSESPEAKERCOMMAND_FEEDBACK = _PAUSESPEAKERCOMMAND.nested_types_by_name['Feedback']
_RESUMESPEAKERCOMMAND = DESCRIPTOR.message_types_by_name['ResumeSpeakerCommand']
_RESUMESPEAKERCOMMAND_REQUEST = _RESUMESPEAKERCOMMAND.nested_types_by_name['Request']
_RESUMESPEAKERCOMMAND_FEEDBACK = _RESUMESPEAKERCOMMAND.nested_types_by_name['Feedback']
_SETSPEAKERVOLUMECOMMAND = DESCRIPTOR.message_types_by_name['SetSpeakerVolumeCommand']
_SETSPEAKERVOLUMECOMMAND_REQUEST = _SETSPEAKERVOLUMECOMMAND.nested_types_by_name['Request']
_SETSPEAKERVOLUMECOMMAND_FEEDBACK = _SETSPEAKERVOLUMECOMMAND.nested_types_by_name['Feedback']
_GETSPEAKERVOLUMECOMMAND = DESCRIPTOR.message_types_by_name['GetSpeakerVolumeCommand']
_GETSPEAKERVOLUMECOMMAND_REQUEST = _GETSPEAKERVOLUMECOMMAND.nested_types_by_name['Request']
_GETSPEAKERVOLUMECOMMAND_FEEDBACK = _GETSPEAKERVOLUMECOMMAND.nested_types_by_name['Feedback']
_AUDIODATA_AUDIOFORMAT = _AUDIODATA.enum_types_by_name['AudioFormat']
AudioData = _reflection.GeneratedProtocolMessageType('AudioData', (_message.Message,), {
'DESCRIPTOR' : _AUDIODATA,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.AudioData)
})
_sym_db.RegisterMessage(AudioData)
SpeakerState = _reflection.GeneratedProtocolMessageType('SpeakerState', (_message.Message,), {
'DESCRIPTOR' : _SPEAKERSTATE,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SpeakerState)
})
_sym_db.RegisterMessage(SpeakerState)
GetSpeakerStateCommand = _reflection.GeneratedProtocolMessageType('GetSpeakerStateCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETSPEAKERSTATECOMMAND_REQUEST,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSpeakerStateCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _GETSPEAKERSTATECOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSpeakerStateCommand.Feedback)
})
,
'DESCRIPTOR' : _GETSPEAKERSTATECOMMAND,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSpeakerStateCommand)
})
_sym_db.RegisterMessage(GetSpeakerStateCommand)
_sym_db.RegisterMessage(GetSpeakerStateCommand.Request)
_sym_db.RegisterMessage(GetSpeakerStateCommand.Feedback)
PlayAudioCommand = _reflection.GeneratedProtocolMessageType('PlayAudioCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _PLAYAUDIOCOMMAND_REQUEST,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.PlayAudioCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _PLAYAUDIOCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.PlayAudioCommand.Feedback)
})
,
'DESCRIPTOR' : _PLAYAUDIOCOMMAND,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.PlayAudioCommand)
})
_sym_db.RegisterMessage(PlayAudioCommand)
_sym_db.RegisterMessage(PlayAudioCommand.Request)
_sym_db.RegisterMessage(PlayAudioCommand.Feedback)
StopSpeakerCommand = _reflection.GeneratedProtocolMessageType('StopSpeakerCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _STOPSPEAKERCOMMAND_REQUEST,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StopSpeakerCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _STOPSPEAKERCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StopSpeakerCommand.Feedback)
})
,
'DESCRIPTOR' : _STOPSPEAKERCOMMAND,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.StopSpeakerCommand)
})
_sym_db.RegisterMessage(StopSpeakerCommand)
_sym_db.RegisterMessage(StopSpeakerCommand.Request)
_sym_db.RegisterMessage(StopSpeakerCommand.Feedback)
PauseSpeakerCommand = _reflection.GeneratedProtocolMessageType('PauseSpeakerCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _PAUSESPEAKERCOMMAND_REQUEST,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.PauseSpeakerCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _PAUSESPEAKERCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.PauseSpeakerCommand.Feedback)
})
,
'DESCRIPTOR' : _PAUSESPEAKERCOMMAND,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.PauseSpeakerCommand)
})
_sym_db.RegisterMessage(PauseSpeakerCommand)
_sym_db.RegisterMessage(PauseSpeakerCommand.Request)
_sym_db.RegisterMessage(PauseSpeakerCommand.Feedback)
ResumeSpeakerCommand = _reflection.GeneratedProtocolMessageType('ResumeSpeakerCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _RESUMESPEAKERCOMMAND_REQUEST,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.ResumeSpeakerCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _RESUMESPEAKERCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.ResumeSpeakerCommand.Feedback)
})
,
'DESCRIPTOR' : _RESUMESPEAKERCOMMAND,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.ResumeSpeakerCommand)
})
_sym_db.RegisterMessage(ResumeSpeakerCommand)
_sym_db.RegisterMessage(ResumeSpeakerCommand.Request)
_sym_db.RegisterMessage(ResumeSpeakerCommand.Feedback)
SetSpeakerVolumeCommand = _reflection.GeneratedProtocolMessageType('SetSpeakerVolumeCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _SETSPEAKERVOLUMECOMMAND_REQUEST,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetSpeakerVolumeCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _SETSPEAKERVOLUMECOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetSpeakerVolumeCommand.Feedback)
})
,
'DESCRIPTOR' : _SETSPEAKERVOLUMECOMMAND,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.SetSpeakerVolumeCommand)
})
_sym_db.RegisterMessage(SetSpeakerVolumeCommand)
_sym_db.RegisterMessage(SetSpeakerVolumeCommand.Request)
_sym_db.RegisterMessage(SetSpeakerVolumeCommand.Feedback)
GetSpeakerVolumeCommand = _reflection.GeneratedProtocolMessageType('GetSpeakerVolumeCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETSPEAKERVOLUMECOMMAND_REQUEST,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSpeakerVolumeCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _GETSPEAKERVOLUMECOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSpeakerVolumeCommand.Feedback)
})
,
'DESCRIPTOR' : _GETSPEAKERVOLUMECOMMAND,
'__module__' : 'cmvr.api.speaker_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSpeakerVolumeCommand)
})
_sym_db.RegisterMessage(GetSpeakerVolumeCommand)
_sym_db.RegisterMessage(GetSpeakerVolumeCommand.Request)
_sym_db.RegisterMessage(GetSpeakerVolumeCommand.Feedback)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_AUDIODATA._serialized_start=68
_AUDIODATA._serialized_end=247
_AUDIODATA_AUDIOFORMAT._serialized_start=198
_AUDIODATA_AUDIOFORMAT._serialized_end=247
_SPEAKERSTATE._serialized_start=250
_SPEAKERSTATE._serialized_end=387
_GETSPEAKERSTATECOMMAND._serialized_start=390
_GETSPEAKERSTATECOMMAND._serialized_end=575
_GETSPEAKERSTATECOMMAND_REQUEST._serialized_start=416
_GETSPEAKERSTATECOMMAND_REQUEST._serialized_end=474
_GETSPEAKERSTATECOMMAND_FEEDBACK._serialized_start=476
_GETSPEAKERSTATECOMMAND_FEEDBACK._serialized_end=575
_PLAYAUDIOCOMMAND._serialized_start=578
_PLAYAUDIOCOMMAND._serialized_end=738
_PLAYAUDIOCOMMAND_REQUEST._serialized_start=598
_PLAYAUDIOCOMMAND_REQUEST._serialized_end=676
_PLAYAUDIOCOMMAND_FEEDBACK._serialized_start=476
_PLAYAUDIOCOMMAND_FEEDBACK._serialized_end=536
_STOPSPEAKERCOMMAND._serialized_start=741
_STOPSPEAKERCOMMAND._serialized_end=883
_STOPSPEAKERCOMMAND_REQUEST._serialized_start=416
_STOPSPEAKERCOMMAND_REQUEST._serialized_end=474
_STOPSPEAKERCOMMAND_FEEDBACK._serialized_start=476
_STOPSPEAKERCOMMAND_FEEDBACK._serialized_end=536
_PAUSESPEAKERCOMMAND._serialized_start=886
_PAUSESPEAKERCOMMAND._serialized_end=1029
_PAUSESPEAKERCOMMAND_REQUEST._serialized_start=416
_PAUSESPEAKERCOMMAND_REQUEST._serialized_end=474
_PAUSESPEAKERCOMMAND_FEEDBACK._serialized_start=476
_PAUSESPEAKERCOMMAND_FEEDBACK._serialized_end=536
_RESUMESPEAKERCOMMAND._serialized_start=1032
_RESUMESPEAKERCOMMAND._serialized_end=1176
_RESUMESPEAKERCOMMAND_REQUEST._serialized_start=416
_RESUMESPEAKERCOMMAND_REQUEST._serialized_end=474
_RESUMESPEAKERCOMMAND_FEEDBACK._serialized_start=476
_RESUMESPEAKERCOMMAND_FEEDBACK._serialized_end=536
_SETSPEAKERVOLUMECOMMAND._serialized_start=1179
_SETSPEAKERVOLUMECOMMAND._serialized_end=1342
_SETSPEAKERVOLUMECOMMAND_REQUEST._serialized_start=1206
_SETSPEAKERVOLUMECOMMAND_REQUEST._serialized_end=1280
_SETSPEAKERVOLUMECOMMAND_FEEDBACK._serialized_start=476
_SETSPEAKERVOLUMECOMMAND_FEEDBACK._serialized_end=536
_GETSPEAKERVOLUMECOMMAND._serialized_start=1345
_GETSPEAKERVOLUMECOMMAND._serialized_end=1508
_GETSPEAKERVOLUMECOMMAND_REQUEST._serialized_start=416
_GETSPEAKERVOLUMECOMMAND_REQUEST._serialized_end=474
_GETSPEAKERVOLUMECOMMAND_FEEDBACK._serialized_start=1432
_GETSPEAKERVOLUMECOMMAND_FEEDBACK._serialized_end=1508
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/speaker_service.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import speaker_command_pb2 as cmvr_dot_api_dot_speaker__command__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x63mvr/api/speaker_service.proto\x12\x08\x63mvr.api\x1a\x1e\x63mvr/api/speaker_command.proto2\xb0\x05\n\x0eSpeakerService\x12`\n\tGetStatus\x12(.cmvr.api.GetSpeakerStateCommand.Request\x1a).cmvr.api.GetSpeakerStateCommand.Feedback\x12T\n\tPlayAudio\x12\".cmvr.api.PlayAudioCommand.Request\x1a#.cmvr.api.PlayAudioCommand.Feedback\x12[\n\x0cStopPlayback\x12$.cmvr.api.StopSpeakerCommand.Request\x1a%.cmvr.api.StopSpeakerCommand.Feedback\x12^\n\rPausePlayback\x12%.cmvr.api.PauseSpeakerCommand.Request\x1a&.cmvr.api.PauseSpeakerCommand.Feedback\x12\x61\n\x0eResumePlayback\x12&.cmvr.api.ResumeSpeakerCommand.Request\x1a\'.cmvr.api.ResumeSpeakerCommand.Feedback\x12\x62\n\tSetVolume\x12).cmvr.api.SetSpeakerVolumeCommand.Request\x1a*.cmvr.api.SetSpeakerVolumeCommand.Feedback\x12\x62\n\tGetVolume\x12).cmvr.api.GetSpeakerVolumeCommand.Request\x1a*.cmvr.api.GetSpeakerVolumeCommand.Feedbackb\x06proto3')
_SPEAKERSERVICE = DESCRIPTOR.services_by_name['SpeakerService']
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_SPEAKERSERVICE._serialized_start=77
_SPEAKERSERVICE._serialized_end=765
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,266 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from cmvr.api import speaker_command_pb2 as cmvr_dot_api_dot_speaker__command__pb2
class SpeakerServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetStatus = channel.unary_unary(
'/cmvr.api.SpeakerService/GetStatus',
request_serializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Feedback.FromString,
)
self.PlayAudio = channel.unary_unary(
'/cmvr.api.SpeakerService/PlayAudio',
request_serializer=cmvr_dot_api_dot_speaker__command__pb2.PlayAudioCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.PlayAudioCommand.Feedback.FromString,
)
self.StopPlayback = channel.unary_unary(
'/cmvr.api.SpeakerService/StopPlayback',
request_serializer=cmvr_dot_api_dot_speaker__command__pb2.StopSpeakerCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.StopSpeakerCommand.Feedback.FromString,
)
self.PausePlayback = channel.unary_unary(
'/cmvr.api.SpeakerService/PausePlayback',
request_serializer=cmvr_dot_api_dot_speaker__command__pb2.PauseSpeakerCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.PauseSpeakerCommand.Feedback.FromString,
)
self.ResumePlayback = channel.unary_unary(
'/cmvr.api.SpeakerService/ResumePlayback',
request_serializer=cmvr_dot_api_dot_speaker__command__pb2.ResumeSpeakerCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.ResumeSpeakerCommand.Feedback.FromString,
)
self.SetVolume = channel.unary_unary(
'/cmvr.api.SpeakerService/SetVolume',
request_serializer=cmvr_dot_api_dot_speaker__command__pb2.SetSpeakerVolumeCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.SetSpeakerVolumeCommand.Feedback.FromString,
)
self.GetVolume = channel.unary_unary(
'/cmvr.api.SpeakerService/GetVolume',
request_serializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerVolumeCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerVolumeCommand.Feedback.FromString,
)
class SpeakerServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def GetStatus(self, request, context):
"""基本控制
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PlayAudio(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 StopPlayback(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 PausePlayback(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 ResumePlayback(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 SetVolume(self, request, context):
"""音量控制
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetVolume(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_SpeakerServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetStatus': grpc.unary_unary_rpc_method_handler(
servicer.GetStatus,
request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Feedback.SerializeToString,
),
'PlayAudio': grpc.unary_unary_rpc_method_handler(
servicer.PlayAudio,
request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.PlayAudioCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_speaker__command__pb2.PlayAudioCommand.Feedback.SerializeToString,
),
'StopPlayback': grpc.unary_unary_rpc_method_handler(
servicer.StopPlayback,
request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.StopSpeakerCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_speaker__command__pb2.StopSpeakerCommand.Feedback.SerializeToString,
),
'PausePlayback': grpc.unary_unary_rpc_method_handler(
servicer.PausePlayback,
request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.PauseSpeakerCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_speaker__command__pb2.PauseSpeakerCommand.Feedback.SerializeToString,
),
'ResumePlayback': grpc.unary_unary_rpc_method_handler(
servicer.ResumePlayback,
request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.ResumeSpeakerCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_speaker__command__pb2.ResumeSpeakerCommand.Feedback.SerializeToString,
),
'SetVolume': grpc.unary_unary_rpc_method_handler(
servicer.SetVolume,
request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.SetSpeakerVolumeCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_speaker__command__pb2.SetSpeakerVolumeCommand.Feedback.SerializeToString,
),
'GetVolume': grpc.unary_unary_rpc_method_handler(
servicer.GetVolume,
request_deserializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerVolumeCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerVolumeCommand.Feedback.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.SpeakerService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class SpeakerService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def GetStatus(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, '/cmvr.api.SpeakerService/GetStatus',
cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Request.SerializeToString,
cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerStateCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def PlayAudio(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, '/cmvr.api.SpeakerService/PlayAudio',
cmvr_dot_api_dot_speaker__command__pb2.PlayAudioCommand.Request.SerializeToString,
cmvr_dot_api_dot_speaker__command__pb2.PlayAudioCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def StopPlayback(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, '/cmvr.api.SpeakerService/StopPlayback',
cmvr_dot_api_dot_speaker__command__pb2.StopSpeakerCommand.Request.SerializeToString,
cmvr_dot_api_dot_speaker__command__pb2.StopSpeakerCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def PausePlayback(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, '/cmvr.api.SpeakerService/PausePlayback',
cmvr_dot_api_dot_speaker__command__pb2.PauseSpeakerCommand.Request.SerializeToString,
cmvr_dot_api_dot_speaker__command__pb2.PauseSpeakerCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def ResumePlayback(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, '/cmvr.api.SpeakerService/ResumePlayback',
cmvr_dot_api_dot_speaker__command__pb2.ResumeSpeakerCommand.Request.SerializeToString,
cmvr_dot_api_dot_speaker__command__pb2.ResumeSpeakerCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SetVolume(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, '/cmvr.api.SpeakerService/SetVolume',
cmvr_dot_api_dot_speaker__command__pb2.SetSpeakerVolumeCommand.Request.SerializeToString,
cmvr_dot_api_dot_speaker__command__pb2.SetSpeakerVolumeCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetVolume(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, '/cmvr.api.SpeakerService/GetVolume',
cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerVolumeCommand.Request.SerializeToString,
cmvr_dot_api_dot_speaker__command__pb2.GetSpeakerVolumeCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

View File

@ -0,0 +1,145 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/system_command.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x63mvr/api/system_command.proto\x12\x08\x63mvr.api\x1a\x15\x63mvr/api/common.proto\"J\n\nDeviceList\x12\x11\n\tdevice_id\x18\x01 \x01(\t\x12)\n\x0b\x64\x65vice_type\x18\x02 \x01(\x0e\x32\x14.cmvr.api.DeviceType\"\xd5\x01\n\x14GetSystemInfoCommand\x1a\t\n\x07Request\x1a\xb1\x01\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12\x13\n\x0bsystem_name\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\n\n\x02os\x18\x05 \x01(\t\x12\x16\n\x0ekernel_version\x18\x06 \x01(\t\x12\x14\n\x0c\x61rchitecture\x18\x07 \x01(\t\"\xf8\x01\n\x16GetSystemStatusCommand\x1a\t\n\x07Request\x1a\xd2\x01\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback\x12\x11\n\tcpu_usage\x18\x02 \x01(\x02\x12\x14\n\x0cmem_total_mb\x18\x03 \x01(\x02\x12\x13\n\x0bmem_used_mb\x18\x04 \x01(\x02\x12\x15\n\rdisk_total_gb\x18\x05 \x01(\x02\x12\x14\n\x0c\x64isk_used_gb\x18\x06 \x01(\x02\x12)\n\x0b\x64\x65vice_list\x18\x07 \x03(\x0b\x32\x14.cmvr.api.DeviceList\"\xb6\x01\n\x13UpdateParamsCommand\x1a\x61\n\x07Request\x12/\n\x06header\x18\x01 \x01(\x0b\x32\x1f.cmvr.api.CommandHeader.Request\x12%\n\x06params\x18\x02 \x03(\x0b\x32\x15.cmvr.api.ConfigParam\x1a<\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\x30\n\x06header\x18\x01 \x01(\x0b\x32 .cmvr.api.CommandHeader.Feedback*}\n\nDeviceType\x12\x07\n\x03\x41GV\x10\x00\x12\x0b\n\x07\x42\x61ttery\x10\x01\x12\n\n\x06\x43\x61mera\x10\x02\x12\x0b\n\x07\x44\x65xHand\x10\x03\x12\x0b\n\x07Gripper\x10\x04\x12\x0e\n\nMicrophone\x10\x05\x12\t\n\x05Robot\x10\x06\x12\x0b\n\x07Speaker\x10\x07\x12\x0b\n\x07Unknown\x10\x14\x62\x06proto3')
_DEVICETYPE = DESCRIPTOR.enum_types_by_name['DeviceType']
DeviceType = enum_type_wrapper.EnumTypeWrapper(_DEVICETYPE)
AGV = 0
Battery = 1
Camera = 2
DexHand = 3
Gripper = 4
Microphone = 5
Robot = 6
Speaker = 7
Unknown = 20
_DEVICELIST = DESCRIPTOR.message_types_by_name['DeviceList']
_GETSYSTEMINFOCOMMAND = DESCRIPTOR.message_types_by_name['GetSystemInfoCommand']
_GETSYSTEMINFOCOMMAND_REQUEST = _GETSYSTEMINFOCOMMAND.nested_types_by_name['Request']
_GETSYSTEMINFOCOMMAND_FEEDBACK = _GETSYSTEMINFOCOMMAND.nested_types_by_name['Feedback']
_GETSYSTEMSTATUSCOMMAND = DESCRIPTOR.message_types_by_name['GetSystemStatusCommand']
_GETSYSTEMSTATUSCOMMAND_REQUEST = _GETSYSTEMSTATUSCOMMAND.nested_types_by_name['Request']
_GETSYSTEMSTATUSCOMMAND_FEEDBACK = _GETSYSTEMSTATUSCOMMAND.nested_types_by_name['Feedback']
_UPDATEPARAMSCOMMAND = DESCRIPTOR.message_types_by_name['UpdateParamsCommand']
_UPDATEPARAMSCOMMAND_REQUEST = _UPDATEPARAMSCOMMAND.nested_types_by_name['Request']
_UPDATEPARAMSCOMMAND_FEEDBACK = _UPDATEPARAMSCOMMAND.nested_types_by_name['Feedback']
DeviceList = _reflection.GeneratedProtocolMessageType('DeviceList', (_message.Message,), {
'DESCRIPTOR' : _DEVICELIST,
'__module__' : 'cmvr.api.system_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.DeviceList)
})
_sym_db.RegisterMessage(DeviceList)
GetSystemInfoCommand = _reflection.GeneratedProtocolMessageType('GetSystemInfoCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETSYSTEMINFOCOMMAND_REQUEST,
'__module__' : 'cmvr.api.system_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSystemInfoCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _GETSYSTEMINFOCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.system_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSystemInfoCommand.Feedback)
})
,
'DESCRIPTOR' : _GETSYSTEMINFOCOMMAND,
'__module__' : 'cmvr.api.system_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSystemInfoCommand)
})
_sym_db.RegisterMessage(GetSystemInfoCommand)
_sym_db.RegisterMessage(GetSystemInfoCommand.Request)
_sym_db.RegisterMessage(GetSystemInfoCommand.Feedback)
GetSystemStatusCommand = _reflection.GeneratedProtocolMessageType('GetSystemStatusCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _GETSYSTEMSTATUSCOMMAND_REQUEST,
'__module__' : 'cmvr.api.system_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSystemStatusCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _GETSYSTEMSTATUSCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.system_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSystemStatusCommand.Feedback)
})
,
'DESCRIPTOR' : _GETSYSTEMSTATUSCOMMAND,
'__module__' : 'cmvr.api.system_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.GetSystemStatusCommand)
})
_sym_db.RegisterMessage(GetSystemStatusCommand)
_sym_db.RegisterMessage(GetSystemStatusCommand.Request)
_sym_db.RegisterMessage(GetSystemStatusCommand.Feedback)
UpdateParamsCommand = _reflection.GeneratedProtocolMessageType('UpdateParamsCommand', (_message.Message,), {
'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _UPDATEPARAMSCOMMAND_REQUEST,
'__module__' : 'cmvr.api.system_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.UpdateParamsCommand.Request)
})
,
'Feedback' : _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), {
'DESCRIPTOR' : _UPDATEPARAMSCOMMAND_FEEDBACK,
'__module__' : 'cmvr.api.system_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.UpdateParamsCommand.Feedback)
})
,
'DESCRIPTOR' : _UPDATEPARAMSCOMMAND,
'__module__' : 'cmvr.api.system_command_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.UpdateParamsCommand)
})
_sym_db.RegisterMessage(UpdateParamsCommand)
_sym_db.RegisterMessage(UpdateParamsCommand.Request)
_sym_db.RegisterMessage(UpdateParamsCommand.Feedback)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_DEVICETYPE._serialized_start=794
_DEVICETYPE._serialized_end=919
_DEVICELIST._serialized_start=66
_DEVICELIST._serialized_end=140
_GETSYSTEMINFOCOMMAND._serialized_start=143
_GETSYSTEMINFOCOMMAND._serialized_end=356
_GETSYSTEMINFOCOMMAND_REQUEST._serialized_start=167
_GETSYSTEMINFOCOMMAND_REQUEST._serialized_end=176
_GETSYSTEMINFOCOMMAND_FEEDBACK._serialized_start=179
_GETSYSTEMINFOCOMMAND_FEEDBACK._serialized_end=356
_GETSYSTEMSTATUSCOMMAND._serialized_start=359
_GETSYSTEMSTATUSCOMMAND._serialized_end=607
_GETSYSTEMSTATUSCOMMAND_REQUEST._serialized_start=167
_GETSYSTEMSTATUSCOMMAND_REQUEST._serialized_end=176
_GETSYSTEMSTATUSCOMMAND_FEEDBACK._serialized_start=397
_GETSYSTEMSTATUSCOMMAND_FEEDBACK._serialized_end=607
_UPDATEPARAMSCOMMAND._serialized_start=610
_UPDATEPARAMSCOMMAND._serialized_end=792
_UPDATEPARAMSCOMMAND_REQUEST._serialized_start=633
_UPDATEPARAMSCOMMAND_REQUEST._serialized_end=730
_UPDATEPARAMSCOMMAND_FEEDBACK._serialized_start=179
_UPDATEPARAMSCOMMAND_FEEDBACK._serialized_end=239
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/system_service.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.api import system_command_pb2 as cmvr_dot_api_dot_system__command__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x63mvr/api/system_service.proto\x12\x08\x63mvr.api\x1a\x1d\x63mvr/api/system_command.proto2\xbe\x02\n\rSystemService\x12\x62\n\rGetSystemInfo\x12&.cmvr.api.GetSystemInfoCommand.Request\x1a\'.cmvr.api.GetSystemInfoCommand.Feedback\"\x00\x12h\n\x0fGetSystemStatus\x12(.cmvr.api.GetSystemStatusCommand.Request\x1a).cmvr.api.GetSystemStatusCommand.Feedback\"\x00\x12_\n\x0cUpdateParams\x12%.cmvr.api.UpdateParamsCommand.Request\x1a&.cmvr.api.UpdateParamsCommand.Feedback\"\x00\x62\x06proto3')
_SYSTEMSERVICE = DESCRIPTOR.services_by_name['SystemService']
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_SYSTEMSERVICE._serialized_start=75
_SYSTEMSERVICE._serialized_end=393
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,132 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from cmvr.api import system_command_pb2 as cmvr_dot_api_dot_system__command__pb2
class SystemServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetSystemInfo = channel.unary_unary(
'/cmvr.api.SystemService/GetSystemInfo',
request_serializer=cmvr_dot_api_dot_system__command__pb2.GetSystemInfoCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_system__command__pb2.GetSystemInfoCommand.Feedback.FromString,
)
self.GetSystemStatus = channel.unary_unary(
'/cmvr.api.SystemService/GetSystemStatus',
request_serializer=cmvr_dot_api_dot_system__command__pb2.GetSystemStatusCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_system__command__pb2.GetSystemStatusCommand.Feedback.FromString,
)
self.UpdateParams = channel.unary_unary(
'/cmvr.api.SystemService/UpdateParams',
request_serializer=cmvr_dot_api_dot_system__command__pb2.UpdateParamsCommand.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_system__command__pb2.UpdateParamsCommand.Feedback.FromString,
)
class SystemServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def GetSystemInfo(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 GetSystemStatus(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 UpdateParams(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_SystemServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetSystemInfo': grpc.unary_unary_rpc_method_handler(
servicer.GetSystemInfo,
request_deserializer=cmvr_dot_api_dot_system__command__pb2.GetSystemInfoCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_system__command__pb2.GetSystemInfoCommand.Feedback.SerializeToString,
),
'GetSystemStatus': grpc.unary_unary_rpc_method_handler(
servicer.GetSystemStatus,
request_deserializer=cmvr_dot_api_dot_system__command__pb2.GetSystemStatusCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_system__command__pb2.GetSystemStatusCommand.Feedback.SerializeToString,
),
'UpdateParams': grpc.unary_unary_rpc_method_handler(
servicer.UpdateParams,
request_deserializer=cmvr_dot_api_dot_system__command__pb2.UpdateParamsCommand.Request.FromString,
response_serializer=cmvr_dot_api_dot_system__command__pb2.UpdateParamsCommand.Feedback.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.SystemService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class SystemService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def GetSystemInfo(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, '/cmvr.api.SystemService/GetSystemInfo',
cmvr_dot_api_dot_system__command__pb2.GetSystemInfoCommand.Request.SerializeToString,
cmvr_dot_api_dot_system__command__pb2.GetSystemInfoCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetSystemStatus(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, '/cmvr.api.SystemService/GetSystemStatus',
cmvr_dot_api_dot_system__command__pb2.GetSystemStatusCommand.Request.SerializeToString,
cmvr_dot_api_dot_system__command__pb2.GetSystemStatusCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def UpdateParams(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, '/cmvr.api.SystemService/UpdateParams',
cmvr_dot_api_dot_system__command__pb2.UpdateParamsCommand.Request.SerializeToString,
cmvr_dot_api_dot_system__command__pb2.UpdateParamsCommand.Feedback.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

View File

@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/api/test_service.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x63mvr/api/test_service.proto\x12\x08\x63mvr.api\"\x1b\n\x0bTestReqeust\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t\"\x1c\n\x0cTestResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\t2D\n\x0bTestService\x12\x35\n\x04\x43\x61ll\x12\x15.cmvr.api.TestReqeust\x1a\x16.cmvr.api.TestResponseb\x06proto3')
_TESTREQEUST = DESCRIPTOR.message_types_by_name['TestReqeust']
_TESTRESPONSE = DESCRIPTOR.message_types_by_name['TestResponse']
TestReqeust = _reflection.GeneratedProtocolMessageType('TestReqeust', (_message.Message,), {
'DESCRIPTOR' : _TESTREQEUST,
'__module__' : 'cmvr.api.test_service_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.TestReqeust)
})
_sym_db.RegisterMessage(TestReqeust)
TestResponse = _reflection.GeneratedProtocolMessageType('TestResponse', (_message.Message,), {
'DESCRIPTOR' : _TESTRESPONSE,
'__module__' : 'cmvr.api.test_service_pb2'
# @@protoc_insertion_point(class_scope:cmvr.api.TestResponse)
})
_sym_db.RegisterMessage(TestResponse)
_TESTSERVICE = DESCRIPTOR.services_by_name['TestService']
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_TESTREQEUST._serialized_start=41
_TESTREQEUST._serialized_end=68
_TESTRESPONSE._serialized_start=70
_TESTRESPONSE._serialized_end=98
_TESTSERVICE._serialized_start=100
_TESTSERVICE._serialized_end=168
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,66 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from cmvr.api import test_service_pb2 as cmvr_dot_api_dot_test__service__pb2
class TestServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Call = channel.unary_unary(
'/cmvr.api.TestService/Call',
request_serializer=cmvr_dot_api_dot_test__service__pb2.TestReqeust.SerializeToString,
response_deserializer=cmvr_dot_api_dot_test__service__pb2.TestResponse.FromString,
)
class TestServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def Call(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_TestServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'Call': grpc.unary_unary_rpc_method_handler(
servicer.Call,
request_deserializer=cmvr_dot_api_dot_test__service__pb2.TestReqeust.FromString,
response_serializer=cmvr_dot_api_dot_test__service__pb2.TestResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.TestService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class TestService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def Call(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, '/cmvr.api.TestService/Call',
cmvr_dot_api_dot_test__service__pb2.TestReqeust.SerializeToString,
cmvr_dot_api_dot_test__service__pb2.TestResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

View File

View File

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/msgs/can_card_parameter.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"cmvr/msgs/can_card_parameter.proto\x12\tcmvr.msgs\"\x98\x07\n\x10\x43\x41NCardParameter\x12<\n\x05\x62rand\x18\x01 \x01(\x0e\x32(.cmvr.msgs.CANCardParameter.CANCardBrandH\x00\x88\x01\x01\x12:\n\x04type\x18\x02 \x01(\x0e\x32\'.cmvr.msgs.CANCardParameter.CANCardTypeH\x01\x88\x01\x01\x12\x41\n\nchannel_id\x18\x03 \x01(\x0e\x32(.cmvr.msgs.CANCardParameter.CANChannelIdH\x02\x88\x01\x01\x12@\n\tinterface\x18\x04 \x01(\x0e\x32(.cmvr.msgs.CANCardParameter.CANInterfaceH\x03\x88\x01\x01\x12\x16\n\tnum_ports\x18\x05 \x01(\rH\x04\x88\x01\x01\x12;\n\x08\x62\x61udrate\x18\x06 \x01(\x0e\x32$.cmvr.msgs.CANCardParameter.BAUDRATEH\x05\x88\x01\x01\"M\n\x0c\x43\x41NCardBrand\x12\x0c\n\x08\x46\x41KE_CAN\x10\x00\x12\x0b\n\x07\x45SD_CAN\x10\x01\x12\x12\n\x0eSOCKET_CAN_RAW\x10\x02\x12\x0e\n\nHERMES_CAN\x10\x03\")\n\x0b\x43\x41NCardType\x12\x0c\n\x08PCI_CARD\x10\x00\x12\x0c\n\x08USB_CARD\x10\x01\"\xb5\x01\n\x0c\x43\x41NChannelId\x12\x13\n\x0f\x43HANNEL_ID_ZERO\x10\x00\x12\x12\n\x0e\x43HANNEL_ID_ONE\x10\x01\x12\x12\n\x0e\x43HANNEL_ID_TWO\x10\x02\x12\x14\n\x10\x43HANNEL_ID_THREE\x10\x03\x12\x13\n\x0f\x43HANNEL_ID_FOUR\x10\x04\x12\x13\n\x0f\x43HANNEL_ID_FIVE\x10\x05\x12\x12\n\x0e\x43HANNEL_ID_SIX\x10\x06\x12\x14\n\x10\x43HANNEL_ID_SEVEN\x10\x07\"2\n\x0c\x43\x41NInterface\x12\n\n\x06NATIVE\x10\x00\x12\x0b\n\x07VIRTUAL\x10\x01\x12\t\n\x05SLCAN\x10\x02\"\x7f\n\x08\x42\x41UDRATE\x12\x14\n\x10\x42\x43\x41N_BAUDRATE_1M\x10\x00\x12\x16\n\x12\x42\x43\x41N_BAUDRATE_500K\x10\x01\x12\x16\n\x12\x42\x43\x41N_BAUDRATE_250K\x10\x02\x12\x16\n\x12\x42\x43\x41N_BAUDRATE_150K\x10\x03\x12\x15\n\x11\x42\x43\x41N_BAUDRATE_NUM\x10\x04\x42\x08\n\x06_brandB\x07\n\x05_typeB\r\n\x0b_channel_idB\x0c\n\n_interfaceB\x0c\n\n_num_portsB\x0b\n\t_baudrateb\x06proto3')
_CANCARDPARAMETER = DESCRIPTOR.message_types_by_name['CANCardParameter']
_CANCARDPARAMETER_CANCARDBRAND = _CANCARDPARAMETER.enum_types_by_name['CANCardBrand']
_CANCARDPARAMETER_CANCARDTYPE = _CANCARDPARAMETER.enum_types_by_name['CANCardType']
_CANCARDPARAMETER_CANCHANNELID = _CANCARDPARAMETER.enum_types_by_name['CANChannelId']
_CANCARDPARAMETER_CANINTERFACE = _CANCARDPARAMETER.enum_types_by_name['CANInterface']
_CANCARDPARAMETER_BAUDRATE = _CANCARDPARAMETER.enum_types_by_name['BAUDRATE']
CANCardParameter = _reflection.GeneratedProtocolMessageType('CANCardParameter', (_message.Message,), {
'DESCRIPTOR' : _CANCARDPARAMETER,
'__module__' : 'cmvr.msgs.can_card_parameter_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.CANCardParameter)
})
_sym_db.RegisterMessage(CANCardParameter)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_CANCARDPARAMETER._serialized_start=50
_CANCARDPARAMETER._serialized_end=970
_CANCARDPARAMETER_CANCARDBRAND._serialized_start=410
_CANCARDPARAMETER_CANCARDBRAND._serialized_end=487
_CANCARDPARAMETER_CANCARDTYPE._serialized_start=489
_CANCARDPARAMETER_CANCARDTYPE._serialized_end=530
_CANCARDPARAMETER_CANCHANNELID._serialized_start=533
_CANCARDPARAMETER_CANCHANNELID._serialized_end=714
_CANCARDPARAMETER_CANINTERFACE._serialized_start=716
_CANCARDPARAMETER_CANINTERFACE._serialized_end=766
_CANCARDPARAMETER_BAUDRATE._serialized_start=768
_CANCARDPARAMETER_BAUDRATE._serialized_end=895
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,155 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/msgs/canopen.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x63mvr/msgs/canopen.proto\x12\tcmvr.msgs\"\x9f\x01\n\x08SdoFrame\x12\x0f\n\x07node_id\x18\x01 \x01(\r\x12\'\n\x02\x63s\x18\x02 \x01(\x0e\x32\x1b.cmvr.msgs.CommandSpecifier\x12!\n\x05index\x18\x03 \x01(\x0e\x32\x12.cmvr.msgs.ObIndex\x12(\n\tsub_index\x18\x04 \x01(\x0e\x32\x15.cmvr.msgs.ObSubIndex\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\r*\xe8\x01\n\tPdoBaseId\x12\x1b\n\x17PDO_BASE_ID_UNSPECIFIED\x10\x00\x12\x16\n\x11RPDO1_BASE_ID_200\x10\x80\x04\x12\x16\n\x11RPDO2_BASE_ID_300\x10\x80\x06\x12\x16\n\x11RPDO3_BASE_ID_400\x10\x80\x08\x12\x16\n\x11RPDO4_BASE_ID_500\x10\x80\n\x12\x16\n\x11TPDO1_BASE_ID_180\x10\x80\x03\x12\x16\n\x11TPDO2_BASE_ID_280\x10\x80\x05\x12\x16\n\x11TPDO3_BASE_ID_380\x10\x80\x07\x12\x16\n\x11TPDO4_BASE_ID_480\x10\x80\t*\x9d\x01\n\x10TransmissionType\x12\x15\n\x11SYNC_EVENT_DRIVEN\x10\x00\x12\x0f\n\x0bSYNC_CYCLIC\x10\x01\x12\x10\n\x0bREMOTE_SYNC\x10\xfc\x01\x12\x11\n\x0cREMOTE_ASYNC\x10\xfd\x01\x12 \n\x1b\x41SYNC_MANUFACTURER_SPECIFIC\x10\xfe\x01\x12\x1a\n\x15\x41SYNC_DEVICE_SPECIFIC\x10\xff\x01*\xd1\x02\n\x10\x43ommandSpecifier\x12\t\n\x05\x43S_NO\x10\x00\x12\x15\n\x11\x43S_WRITE_ONE_BYTE\x10/\x12\x16\n\x12\x43S_WRITE_TWO_BYTES\x10+\x12\x18\n\x14\x43S_WRITE_THREE_BYTES\x10\'\x12\x17\n\x13\x43S_WRITE_FOUR_BYTES\x10#\x12\x1d\n\x19\x43S_WRITE_SUCCESS_RESPONSE\x10`\x12\x13\n\x0f\x43S_READ_REQUEST\x10@\x12\x1d\n\x19\x43S_READ_RESPONSE_ONE_BYTE\x10O\x12\x1e\n\x1a\x43S_READ_RESPONSE_TWO_BYTES\x10K\x12 \n\x1c\x43S_READ_RESPONSE_THREE_BYTES\x10G\x12\x1f\n\x1b\x43S_READ_RESPONSE_FOUR_BYTES\x10\x43\x12\x1a\n\x15\x43S_EXCEPTION_RESPONSE\x10\x80\x01*\xa1\x01\n\x08NmtState\x12\x14\n\x10NMT_INITIALIZING\x10\x00\x12\x19\n\x15NMT_RESET_APPLICATION\x10\x01\x12\x12\n\x0eNMT_CONNECTING\x10\x02\x12\x11\n\rNMT_PREPARING\x10\x03\x12\x0f\n\x0bNMT_STOPPED\x10\x04\x12\x13\n\x0fNMT_OPERATIONAL\x10\x05\x12\x17\n\x13NMT_PRE_OPERATIONAL\x10\x7f*\xb1\x01\n\nNmtCommand\x12\x1b\n\x17NMT_COMMAND_UNSPECIFIED\x10\x00\x12\x19\n\x15NMT_START_REMOTE_NODE\x10\x01\x12\x18\n\x14NMT_STOP_REMOTE_NODE\x10\x02\x12\x1e\n\x19NMT_ENTER_PRE_OPERATIONAL\x10\x80\x01\x12\x13\n\x0eNMT_RESET_NODE\x10\x81\x01\x12\x1c\n\x17NMT_RESET_COMMUNICATION\x10\x82\x01*\xce\x08\n\x07ObIndex\x12\x0e\n\nINDEX_ZERO\x10\x00\x12\x18\n\x13USER_SAVE_PARA_2000\x10\x80@\x12\x19\n\x14POSITION_OFFSET_2008\x10\x88@\x12\x15\n\x0f\x45RROR_CODE_6007\x10\x87\xc0\x01\x12\x15\n\x0f\x45RROR_CODE_603F\x10\xbf\xc0\x01\x12\x17\n\x11\x43ONTROL_WORD_6040\x10\xc0\xc0\x01\x12\x16\n\x10STATUS_WORD_6041\x10\xc1\xc0\x01\x12\x19\n\x13OPERATION_MODE_6060\x10\xe0\xc0\x01\x12\x17\n\x11MODE_DISPLAY_6061\x10\xe1\xc0\x01\x12\x1a\n\x14\x41\x43TUAL_POSITION_6064\x10\xe4\xc0\x01\x12\x17\n\x11\x41\x43TUAL_SPEED_606C\x10\xec\xc0\x01\x12\x19\n\x13\x41\x43TUAL_CURRENT_6078\x10\xf8\xc0\x01\x12\x18\n\x12TARGET_TORQUE_6071\x10\xf1\xc0\x01\x12\x15\n\x0fMAX_TORQUE_6072\x10\xf2\xc0\x01\x12\x18\n\x12\x44\x45MAND_TORQUE_6074\x10\xf4\xc0\x01\x12\x1a\n\x14TARGET_POSITION_607A\x10\xfa\xc0\x01\x12\"\n\x1cSOFTWARE_POSITION_LIMIT_607D\x10\xfd\xc0\x01\x12\x14\n\x0eMAX_SPEED_607F\x10\xff\xc0\x01\x12\x18\n\x12PROFILE_SPEED_6081\x10\x81\xc1\x01\x12\x1f\n\x19PROFILE_ACCELERATION_6083\x10\x83\xc1\x01\x12\x1f\n\x19PROFILE_DECELERATION_6084\x10\x84\xc1\x01\x12\x1b\n\x15\x43URRENT_LOOP_PID_60F6\x10\xf6\xc1\x01\x12\x19\n\x13SPEED_LOOP_PID_60F9\x10\xf9\xc1\x01\x12\x1c\n\x16POSITION_LOOP_PID_60FB\x10\xfb\xc1\x01\x12\x17\n\x11TARGET_SPEED_60FF\x10\xff\xc1\x01\x12\x1c\n\x16QUICK_STOP_OPTION_605A\x10\xda\xc0\x01\x12\x1b\n\x15QUICK_STOP_DECEL_6085\x10\x85\xc1\x01\x12\x14\n\x0fRPDO1_COMM_1400\x10\x80(\x12\x14\n\x0fRPDO2_COMM_1401\x10\x81(\x12\x14\n\x0fRPDO3_COMM_1402\x10\x82(\x12\x14\n\x0fRPDO4_COMM_1403\x10\x83(\x12\x14\n\x0fTPDO1_COMM_1800\x10\x80\x30\x12\x14\n\x0fTPDO2_COMM_1801\x10\x81\x30\x12\x14\n\x0fTPDO3_COMM_1802\x10\x82\x30\x12\x14\n\x0fTPDO4_COMM_1803\x10\x83\x30\x12\x13\n\x0eRPDO1_MAP_1600\x10\x80,\x12\x13\n\x0eRPDO2_MAP_1601\x10\x81,\x12\x13\n\x0eRPDO3_MAP_1602\x10\x82,\x12\x13\n\x0eRPDO4_MAP_1603\x10\x83,\x12\x13\n\x0eTPDO1_MAP_1A00\x10\x80\x34\x12\x13\n\x0eTPDO2_MAP_1A01\x10\x81\x34\x12\x13\n\x0eTPDO3_MAP_1A02\x10\x82\x34\x12\x13\n\x0eTPDO4_MAP_1A03\x10\x83\x34\x12\x1c\n\x17PRODUCER_HEARTBEAT_TIME\x10\x97 *\x94\x01\n\nObSubIndex\x12\x0f\n\x0bSUB_INDEX_0\x10\x00\x12\x0f\n\x0bSUB_INDEX_1\x10\x01\x12\x0f\n\x0bSUB_INDEX_2\x10\x02\x12\x0f\n\x0bSUB_INDEX_3\x10\x03\x12\x0f\n\x0bSUB_INDEX_4\x10\x04\x12\x0f\n\x0bSUB_INDEX_5\x10\x05\x12\x0f\n\x0bSUB_INDEX_6\x10\x06\x12\x0f\n\x0bSUB_INDEX_7\x10\x07\x62\x06proto3')
_PDOBASEID = DESCRIPTOR.enum_types_by_name['PdoBaseId']
PdoBaseId = enum_type_wrapper.EnumTypeWrapper(_PDOBASEID)
_TRANSMISSIONTYPE = DESCRIPTOR.enum_types_by_name['TransmissionType']
TransmissionType = enum_type_wrapper.EnumTypeWrapper(_TRANSMISSIONTYPE)
_COMMANDSPECIFIER = DESCRIPTOR.enum_types_by_name['CommandSpecifier']
CommandSpecifier = enum_type_wrapper.EnumTypeWrapper(_COMMANDSPECIFIER)
_NMTSTATE = DESCRIPTOR.enum_types_by_name['NmtState']
NmtState = enum_type_wrapper.EnumTypeWrapper(_NMTSTATE)
_NMTCOMMAND = DESCRIPTOR.enum_types_by_name['NmtCommand']
NmtCommand = enum_type_wrapper.EnumTypeWrapper(_NMTCOMMAND)
_OBINDEX = DESCRIPTOR.enum_types_by_name['ObIndex']
ObIndex = enum_type_wrapper.EnumTypeWrapper(_OBINDEX)
_OBSUBINDEX = DESCRIPTOR.enum_types_by_name['ObSubIndex']
ObSubIndex = enum_type_wrapper.EnumTypeWrapper(_OBSUBINDEX)
PDO_BASE_ID_UNSPECIFIED = 0
RPDO1_BASE_ID_200 = 512
RPDO2_BASE_ID_300 = 768
RPDO3_BASE_ID_400 = 1024
RPDO4_BASE_ID_500 = 1280
TPDO1_BASE_ID_180 = 384
TPDO2_BASE_ID_280 = 640
TPDO3_BASE_ID_380 = 896
TPDO4_BASE_ID_480 = 1152
SYNC_EVENT_DRIVEN = 0
SYNC_CYCLIC = 1
REMOTE_SYNC = 252
REMOTE_ASYNC = 253
ASYNC_MANUFACTURER_SPECIFIC = 254
ASYNC_DEVICE_SPECIFIC = 255
CS_NO = 0
CS_WRITE_ONE_BYTE = 47
CS_WRITE_TWO_BYTES = 43
CS_WRITE_THREE_BYTES = 39
CS_WRITE_FOUR_BYTES = 35
CS_WRITE_SUCCESS_RESPONSE = 96
CS_READ_REQUEST = 64
CS_READ_RESPONSE_ONE_BYTE = 79
CS_READ_RESPONSE_TWO_BYTES = 75
CS_READ_RESPONSE_THREE_BYTES = 71
CS_READ_RESPONSE_FOUR_BYTES = 67
CS_EXCEPTION_RESPONSE = 128
NMT_INITIALIZING = 0
NMT_RESET_APPLICATION = 1
NMT_CONNECTING = 2
NMT_PREPARING = 3
NMT_STOPPED = 4
NMT_OPERATIONAL = 5
NMT_PRE_OPERATIONAL = 127
NMT_COMMAND_UNSPECIFIED = 0
NMT_START_REMOTE_NODE = 1
NMT_STOP_REMOTE_NODE = 2
NMT_ENTER_PRE_OPERATIONAL = 128
NMT_RESET_NODE = 129
NMT_RESET_COMMUNICATION = 130
INDEX_ZERO = 0
USER_SAVE_PARA_2000 = 8192
POSITION_OFFSET_2008 = 8200
ERROR_CODE_6007 = 24583
ERROR_CODE_603F = 24639
CONTROL_WORD_6040 = 24640
STATUS_WORD_6041 = 24641
OPERATION_MODE_6060 = 24672
MODE_DISPLAY_6061 = 24673
ACTUAL_POSITION_6064 = 24676
ACTUAL_SPEED_606C = 24684
ACTUAL_CURRENT_6078 = 24696
TARGET_TORQUE_6071 = 24689
MAX_TORQUE_6072 = 24690
DEMAND_TORQUE_6074 = 24692
TARGET_POSITION_607A = 24698
SOFTWARE_POSITION_LIMIT_607D = 24701
MAX_SPEED_607F = 24703
PROFILE_SPEED_6081 = 24705
PROFILE_ACCELERATION_6083 = 24707
PROFILE_DECELERATION_6084 = 24708
CURRENT_LOOP_PID_60F6 = 24822
SPEED_LOOP_PID_60F9 = 24825
POSITION_LOOP_PID_60FB = 24827
TARGET_SPEED_60FF = 24831
QUICK_STOP_OPTION_605A = 24666
QUICK_STOP_DECEL_6085 = 24709
RPDO1_COMM_1400 = 5120
RPDO2_COMM_1401 = 5121
RPDO3_COMM_1402 = 5122
RPDO4_COMM_1403 = 5123
TPDO1_COMM_1800 = 6144
TPDO2_COMM_1801 = 6145
TPDO3_COMM_1802 = 6146
TPDO4_COMM_1803 = 6147
RPDO1_MAP_1600 = 5632
RPDO2_MAP_1601 = 5633
RPDO3_MAP_1602 = 5634
RPDO4_MAP_1603 = 5635
TPDO1_MAP_1A00 = 6656
TPDO2_MAP_1A01 = 6657
TPDO3_MAP_1A02 = 6658
TPDO4_MAP_1A03 = 6659
PRODUCER_HEARTBEAT_TIME = 4119
SUB_INDEX_0 = 0
SUB_INDEX_1 = 1
SUB_INDEX_2 = 2
SUB_INDEX_3 = 3
SUB_INDEX_4 = 4
SUB_INDEX_5 = 5
SUB_INDEX_6 = 6
SUB_INDEX_7 = 7
_SDOFRAME = DESCRIPTOR.message_types_by_name['SdoFrame']
SdoFrame = _reflection.GeneratedProtocolMessageType('SdoFrame', (_message.Message,), {
'DESCRIPTOR' : _SDOFRAME,
'__module__' : 'cmvr.msgs.canopen_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.SdoFrame)
})
_sym_db.RegisterMessage(SdoFrame)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_PDOBASEID._serialized_start=201
_PDOBASEID._serialized_end=433
_TRANSMISSIONTYPE._serialized_start=436
_TRANSMISSIONTYPE._serialized_end=593
_COMMANDSPECIFIER._serialized_start=596
_COMMANDSPECIFIER._serialized_end=933
_NMTSTATE._serialized_start=936
_NMTSTATE._serialized_end=1097
_NMTCOMMAND._serialized_start=1100
_NMTCOMMAND._serialized_end=1277
_OBINDEX._serialized_start=1280
_OBINDEX._serialized_end=2382
_OBSUBINDEX._serialized_start=2385
_OBSUBINDEX._serialized_end=2533
_SDOFRAME._serialized_start=39
_SDOFRAME._serialized_end=198
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/msgs/error_code.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x63mvr/msgs/error_code.proto\x12\tcmvr.msgs\"A\n\x08StatusPb\x12(\n\nerror_code\x18\x01 \x01(\x0e\x32\x14.cmvr.msgs.ErrorCode\x12\x0b\n\x03msg\x18\x02 \x01(\t*\x80\x02\n\tErrorCode\x12\x06\n\x02OK\x10\x00\x12\x11\n\x0c\x43\x41NBUS_ERROR\x10\xd0\x0f\x12\x1a\n\x15\x43\x41N_CLIENT_ERROR_BASE\x10\xb4\x10\x12(\n#CAN_CLIENT_ERROR_OPEN_DEVICE_FAILED\x10\xb5\x10\x12\x1f\n\x1a\x43\x41N_CLIENT_ERROR_FRAME_NUM\x10\xb6\x10\x12!\n\x1c\x43\x41N_CLIENT_ERROR_SEND_FAILED\x10\xb7\x10\x12!\n\x1c\x43\x41N_CLIENT_ERROR_RECV_FAILED\x10\xb8\x10\x12\x10\n\x0bMOTOR_ERROR\x10\xb8\x17\x12\x19\n\x14MOTOR_ERROR_SET_ZERO\x10\xb9\x17\x62\x06proto3')
_ERRORCODE = DESCRIPTOR.enum_types_by_name['ErrorCode']
ErrorCode = enum_type_wrapper.EnumTypeWrapper(_ERRORCODE)
OK = 0
CANBUS_ERROR = 2000
CAN_CLIENT_ERROR_BASE = 2100
CAN_CLIENT_ERROR_OPEN_DEVICE_FAILED = 2101
CAN_CLIENT_ERROR_FRAME_NUM = 2102
CAN_CLIENT_ERROR_SEND_FAILED = 2103
CAN_CLIENT_ERROR_RECV_FAILED = 2104
MOTOR_ERROR = 3000
MOTOR_ERROR_SET_ZERO = 3001
_STATUSPB = DESCRIPTOR.message_types_by_name['StatusPb']
StatusPb = _reflection.GeneratedProtocolMessageType('StatusPb', (_message.Message,), {
'DESCRIPTOR' : _STATUSPB,
'__module__' : 'cmvr.msgs.error_code_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.StatusPb)
})
_sym_db.RegisterMessage(StatusPb)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_ERRORCODE._serialized_start=109
_ERRORCODE._serialized_end=365
_STATUSPB._serialized_start=41
_STATUSPB._serialized_end=106
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,94 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/msgs/geometry.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x63mvr/msgs/geometry.proto\x12\tcmvr.msgs\"\x1c\n\x04Vec2\x12\t\n\x01x\x18\x01 \x01(\x01\x12\t\n\x01y\x18\x02 \x01(\x01\"\'\n\x04Vec3\x12\t\n\x01x\x18\x01 \x01(\x01\x12\t\n\x01y\x18\x02 \x01(\x01\x12\t\n\x01z\x18\x03 \x01(\x01\"2\n\x04Quat\x12\t\n\x01w\x18\x01 \x01(\x01\x12\t\n\x01x\x18\x02 \x01(\x01\x12\t\n\x01y\x18\x03 \x01(\x01\x12\t\n\x01z\x18\x04 \x01(\x01\"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x01\x12\t\n\x01y\x18\x02 \x01(\x01\x12\t\n\x01z\x18\x03 \x01(\x01\"+\n\x05\x45uler\x12\n\n\x02rx\x18\x01 \x01(\x01\x12\n\n\x02ry\x18\x02 \x01(\x01\x12\n\n\x02rz\x18\x03 \x01(\x01\"u\n\x06Pose3d\x12%\n\x08position\x18\x01 \x01(\x0b\x32\x13.cmvr.msgs.Position\x12#\n\nquaternion\x18\x02 \x01(\x0b\x32\x0f.cmvr.msgs.Quat\x12\x1f\n\x05\x65uler\x18\x03 \x01(\x0b\x32\x10.cmvr.msgs.Euler\"-\n\x06Pose2d\x12\t\n\x01x\x18\x01 \x01(\x01\x12\t\n\x01y\x18\x02 \x01(\x01\x12\r\n\x05theta\x18\x03 \x01(\x01\x62\x06proto3')
_VEC2 = DESCRIPTOR.message_types_by_name['Vec2']
_VEC3 = DESCRIPTOR.message_types_by_name['Vec3']
_QUAT = DESCRIPTOR.message_types_by_name['Quat']
_POSITION = DESCRIPTOR.message_types_by_name['Position']
_EULER = DESCRIPTOR.message_types_by_name['Euler']
_POSE3D = DESCRIPTOR.message_types_by_name['Pose3d']
_POSE2D = DESCRIPTOR.message_types_by_name['Pose2d']
Vec2 = _reflection.GeneratedProtocolMessageType('Vec2', (_message.Message,), {
'DESCRIPTOR' : _VEC2,
'__module__' : 'cmvr.msgs.geometry_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.Vec2)
})
_sym_db.RegisterMessage(Vec2)
Vec3 = _reflection.GeneratedProtocolMessageType('Vec3', (_message.Message,), {
'DESCRIPTOR' : _VEC3,
'__module__' : 'cmvr.msgs.geometry_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.Vec3)
})
_sym_db.RegisterMessage(Vec3)
Quat = _reflection.GeneratedProtocolMessageType('Quat', (_message.Message,), {
'DESCRIPTOR' : _QUAT,
'__module__' : 'cmvr.msgs.geometry_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.Quat)
})
_sym_db.RegisterMessage(Quat)
Position = _reflection.GeneratedProtocolMessageType('Position', (_message.Message,), {
'DESCRIPTOR' : _POSITION,
'__module__' : 'cmvr.msgs.geometry_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.Position)
})
_sym_db.RegisterMessage(Position)
Euler = _reflection.GeneratedProtocolMessageType('Euler', (_message.Message,), {
'DESCRIPTOR' : _EULER,
'__module__' : 'cmvr.msgs.geometry_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.Euler)
})
_sym_db.RegisterMessage(Euler)
Pose3d = _reflection.GeneratedProtocolMessageType('Pose3d', (_message.Message,), {
'DESCRIPTOR' : _POSE3D,
'__module__' : 'cmvr.msgs.geometry_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.Pose3d)
})
_sym_db.RegisterMessage(Pose3d)
Pose2d = _reflection.GeneratedProtocolMessageType('Pose2d', (_message.Message,), {
'DESCRIPTOR' : _POSE2D,
'__module__' : 'cmvr.msgs.geometry_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.Pose2d)
})
_sym_db.RegisterMessage(Pose2d)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_VEC2._serialized_start=39
_VEC2._serialized_end=67
_VEC3._serialized_start=69
_VEC3._serialized_end=108
_QUAT._serialized_start=110
_QUAT._serialized_end=160
_POSITION._serialized_start=162
_POSITION._serialized_end=205
_EULER._serialized_start=207
_EULER._serialized_end=250
_POSE3D._serialized_start=252
_POSE3D._serialized_end=369
_POSE2D._serialized_start=371
_POSE2D._serialized_end=416
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/msgs/motor.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.msgs import canopen_pb2 as cmvr_dot_msgs_dot_canopen__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x63mvr/msgs/motor.proto\x12\tcmvr.msgs\x1a\x17\x63mvr/msgs/canopen.proto\"\x94\x08\n\x0bMotorStatus\x12$\n\x08run_mode\x18\x01 \x01(\x0e\x32\x12.cmvr.msgs.RunMode\x12\x0f\n\x07\x63urrent\x18\x02 \x01(\x05\x12\x16\n\x0etarget_current\x18\x03 \x01(\x05\x12\r\n\x05speed\x18\x04 \x01(\x05\x12\x14\n\x0ctarget_speed\x18\x05 \x01(\x05\x12\x10\n\x08position\x18\x06 \x01(\x05\x12\x17\n\x0ftarget_position\x18\x07 \x01(\x05\x12\x13\n\x0b\x65rror_state\x18\x08 \x01(\r\x12\x10\n\x08speed_kp\x18\t \x01(\x05\x12\x10\n\x08speed_ki\x18\n \x01(\x05\x12\x10\n\x08speed_kd\x18\x0b \x01(\x05\x12\x13\n\x0bposition_kp\x18\x0c \x01(\x05\x12\x13\n\x0bposition_ki\x18\r \x01(\x05\x12\x13\n\x0bposition_kd\x18\x0e \x01(\x05\x12\x13\n\x0b\x62us_voltage\x18\x0f \x01(\x05\x12\x17\n\x0fmax_abs_current\x18\x10 \x01(\x05\x12\x17\n\x0fmax_pos_current\x18\x11 \x01(\x05\x12\x17\n\x0fmin_neg_current\x18\x12 \x01(\x05\x12\x15\n\rmax_pos_accel\x18\x13 \x01(\x05\x12\x15\n\rmin_neg_accel\x18\x14 \x01(\x05\x12\x18\n\x10max_pos_velocity\x18\x15 \x01(\x05\x12\x18\n\x10min_neg_velocity\x18\x16 \x01(\x05\x12\x18\n\x10max_pos_position\x18\x17 \x01(\x05\x12\x18\n\x10min_neg_position\x18\x18 \x01(\x05\x12\x12\n\nmotor_temp\x18\x19 \x01(\x05\x12\x12\n\nboard_temp\x18\x1a \x01(\x05\x12\x12\n\ncurrent_kp\x18\x1b \x01(\x05\x12\x12\n\ncurrent_ki\x18\x1c \x01(\x05\x12\x12\n\ncurrent_kd\x18\x1d \x01(\x05\x12\x12\n\nmotor_type\x18\x1e \x01(\x05\x12\x15\n\rmotor_version\x18\x1f \x01(\x05\x12\x18\n\x10software_version\x18 \x01(\x05\x12\x17\n\x0fposition_offset\x18! \x01(\x05\x12\x10\n\x08\x63sp_data\x18\" \x01(\x0c\x12\x17\n\x0f\x65ncoder_voltage\x18# \x01(\x05\x12\x15\n\rencoder_state\x18$ \x01(\x05\x12\x19\n\x11overvoltage_limit\x18% \x01(\x05\x12\x1a\n\x12undervoltage_limit\x18& \x01(\x05\x12\x16\n\x0e\x63oil_over_temp\x18\' \x01(\x05\x12\x18\n\x10\x64river_over_temp\x18( \x01(\x05\x12)\n\x0csdo_response\x18) \x01(\x0b\x32\x13.cmvr.msgs.SdoFrame\x12&\n\tnmt_state\x18* \x01(\x0e\x32\x13.cmvr.msgs.NmtState\x12\x11\n\tctrl_word\x18+ \x01(\r\x12\x13\n\x0bstatus_word\x18, \x01(\r*\xae\x02\n\x07RunMode\x12\x18\n\x14RUN_MODE_UNSPECIFIED\x10\x00\x12\x1d\n\x19RUN_MODE_PROFILE_POSITION\x10\x01\x12\x15\n\x11RUN_MODE_VELOCITY\x10\x02\x12\x1d\n\x19RUN_MODE_PROFILE_VELOCITY\x10\x03\x12\x13\n\x0fRUN_MODE_TORQUE\x10\x04\x12\x13\n\x0fRUN_MODE_HOMING\x10\x05\x12\"\n\x1eRUN_MODE_INTERPOLATED_POSITION\x10\x07\x12!\n\x1dRUN_MODE_CYCLIC_SYNC_POSITION\x10\x08\x12!\n\x1dRUN_MODE_CYCLIC_SYNC_VELOCITY\x10\t\x12 \n\x1cRUN_MODE_CYCLIC_SYNC_CURRENT\x10\nb\x06proto3')
_RUNMODE = DESCRIPTOR.enum_types_by_name['RunMode']
RunMode = enum_type_wrapper.EnumTypeWrapper(_RUNMODE)
RUN_MODE_UNSPECIFIED = 0
RUN_MODE_PROFILE_POSITION = 1
RUN_MODE_VELOCITY = 2
RUN_MODE_PROFILE_VELOCITY = 3
RUN_MODE_TORQUE = 4
RUN_MODE_HOMING = 5
RUN_MODE_INTERPOLATED_POSITION = 7
RUN_MODE_CYCLIC_SYNC_POSITION = 8
RUN_MODE_CYCLIC_SYNC_VELOCITY = 9
RUN_MODE_CYCLIC_SYNC_CURRENT = 10
_MOTORSTATUS = DESCRIPTOR.message_types_by_name['MotorStatus']
MotorStatus = _reflection.GeneratedProtocolMessageType('MotorStatus', (_message.Message,), {
'DESCRIPTOR' : _MOTORSTATUS,
'__module__' : 'cmvr.msgs.motor_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.MotorStatus)
})
_sym_db.RegisterMessage(MotorStatus)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_RUNMODE._serialized_start=1109
_RUNMODE._serialized_end=1411
_MOTORSTATUS._serialized_start=62
_MOTORSTATUS._serialized_end=1106
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cmvr/msgs/robot_detail.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 message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from cmvr.msgs import canopen_pb2 as cmvr_dot_msgs_dot_canopen__pb2
from cmvr.msgs import motor_pb2 as cmvr_dot_msgs_dot_motor__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x63mvr/msgs/robot_detail.proto\x12\tcmvr.msgs\x1a\x17\x63mvr/msgs/canopen.proto\x1a\x15\x63mvr/msgs/motor.proto\"\x88\x01\n\x0bRobotDetail\x12\x32\n\x06motors\x18\x01 \x03(\x0b\x32\".cmvr.msgs.RobotDetail.MotorsEntry\x1a\x45\n\x0bMotorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.cmvr.msgs.MotorStatus:\x02\x38\x01\x62\x06proto3')
_ROBOTDETAIL = DESCRIPTOR.message_types_by_name['RobotDetail']
_ROBOTDETAIL_MOTORSENTRY = _ROBOTDETAIL.nested_types_by_name['MotorsEntry']
RobotDetail = _reflection.GeneratedProtocolMessageType('RobotDetail', (_message.Message,), {
'MotorsEntry' : _reflection.GeneratedProtocolMessageType('MotorsEntry', (_message.Message,), {
'DESCRIPTOR' : _ROBOTDETAIL_MOTORSENTRY,
'__module__' : 'cmvr.msgs.robot_detail_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.RobotDetail.MotorsEntry)
})
,
'DESCRIPTOR' : _ROBOTDETAIL,
'__module__' : 'cmvr.msgs.robot_detail_pb2'
# @@protoc_insertion_point(class_scope:cmvr.msgs.RobotDetail)
})
_sym_db.RegisterMessage(RobotDetail)
_sym_db.RegisterMessage(RobotDetail.MotorsEntry)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_ROBOTDETAIL_MOTORSENTRY._options = None
_ROBOTDETAIL_MOTORSENTRY._serialized_options = b'8\001'
_ROBOTDETAIL._serialized_start=92
_ROBOTDETAIL._serialized_end=228
_ROBOTDETAIL_MOTORSENTRY._serialized_start=159
_ROBOTDETAIL_MOTORSENTRY._serialized_end=228
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,4 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

View File

@ -0,0 +1,177 @@
syntax = "proto3";
import "cmvr/api/common.proto"; //
package cmvr.api;
/**
*
*
*/
message FacialExpression {
/**
*
* 0.0-1.0
*/
message Eyebrow {
float left_outside_y = 1; //
float left_inside_y = 2; //
float right_outside_y = 3; //
float right_inside_y = 4; //
}
Eyebrow eyebrow = 3; //
/**
*
* 0.0-1.0
*/
message Eyelid {
float left_upper_y = 1; //
float left_lower_y = 2; //
float right_upper_y = 3; //
float right_lower_y = 4; //
}
Eyelid eyelid = 4; //
/**
*
* -1.01.00
*/
message Eyeball {
float left_x = 1; //
float left_y = 2; //
float right_x = 3; //
float right_y = 4; //
}
Eyeball eyeball = 5; //
/**
*
* 0.0-1.0
*/
message Nose {
float left_y = 1; //
float right_y = 2; //
}
Nose nose = 6; //
/**
*
*
*/
message Mouth {
float upper_lip_y = 1; //
float upper_lip_z = 2; // Z轴
float lower_lip_y = 3; //
float lower_lip_z = 4; // Z轴
/**
*
*
*/
message LeftLip {
float upper_x = 1; //
float upper_y = 2; //
float corner_x = 3; //
float corner_y = 4; //
float lower_x = 5; //
float lower_y = 6; //
}
LeftLip left_lip = 5; //
/**
*
*
*/
message RightLip {
float upper_x = 1; //
float upper_y = 2; //
float corner_x = 3; //
float corner_y = 4; //
float lower_x = 5; //
float lower_y = 6; //
}
RightLip right_lip = 6; //
}
Mouth mouth = 7; //
/**
*
* X/Y轴
*/
message Jaw {
float x = 1; //
float y = 2; //
}
Jaw jaw = 8; //
}
/**
*
*
*/
message SetFacialExpression {
message Request {
CommandHeader.Request header = 1; // ID和时间戳
FacialExpression expression = 2; //
}
message Feedback {
CommandHeader.Feedback header = 1; //
string execution_id = 2; // ID
float execution_time_ms = 3; //
}
}
/**
*
*
*/
message StreamFacialExpression {
message Request {
CommandHeader.Request header = 1; //
FacialExpression expr = 2; //
bool eof = 3; //
}
message Feedback {
CommandHeader.Feedback header = 1; //
FacialExpression expr_diff = 2; //
}
}
/**
*
*
*/
message GetStatus {
message Request {
CommandHeader.Request header = 1; //
}
message Feedback {
CommandHeader.Feedback header = 1; //
bool is_moving = 2; //
string last_request_id = 3; // ID
repeated float current_positions = 4; //
bool camera_recording = 5; //
string active_recording_id = 6; // ID
}
}
/**
*
*
*/
message EmergencyStop {
message Request {
CommandHeader.Request header = 1; //
}
message Feedback {
CommandHeader.Feedback header = 1; //
string stopped_processes = 2; //
}
}

View File

@ -0,0 +1,22 @@
syntax = "proto3";
package cmvr.api;
import "cmvr/api/biohead_command.proto";
//
service BioHeadService {
//
rpc SetExpression(SetFacialExpression.Request) returns (SetFacialExpression.Feedback){};
//
//rpc StreamExpression(StreamFacialExpression.Request) returns (StreamFacialExpression.Feedback){};
rpc StreamExpression (stream StreamFacialExpression.Request) returns (stream StreamFacialExpression.Feedback);
//
rpc GetSystemStatus(GetStatus.Request) returns (GetStatus.Feedback){};
//
rpc EmergencyStop(EmergencyStop.Request) returns (EmergencyStop.Feedback){};
}

View File

@ -0,0 +1,175 @@
syntax = "proto3";
import "cmvr/api/common.proto";
package cmvr.api;
message FrameData {
enum FrameType {
U8C1 = 0;
U16C1 = 1;
U8C3 = 2;
U16C3 = 3;
F16C1 = 4;
F32C1 = 5;
}
bytes data = 1;
int32 width = 2;
int32 height = 3;
FrameType type = 4;
string codec = 5;
bool is_key_frame = 6;
}
message CameraIntrinsics {
float cx = 1; //
float cy = 2; //
float fx = 3; // x方向焦距
float fy = 4; // y方向焦距
repeated float coeffs = 5 [packed = true]; // 5
}
message CameraState {
bool is_initialized = 1;
bool is_opened = 2;
bool is_streaming = 3;
bool is_recording = 4;
bool is_error = 5;
string error_message = 6;
int32 fps = 7;
int32 width = 8;
int32 height = 9;
}
message GetCameraStateCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
CameraState state = 2;
}
}
message StartCameraCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message StopCameraCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message GetRGBImageCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
FrameData color_frame = 2;
CameraIntrinsics intrinsics = 3;
}
}
message GetDepthImageCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
FrameData depth_frame = 2;
CameraIntrinsics intrinsics = 3;
}
}
message GetRGBDImagesCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
FrameData color_frame = 2;
FrameData depth_frame = 3;
CameraIntrinsics intrinsics = 4;
}
}
message StartCameraRecordingCommand {
message Request {
CommandHeader.Request header = 1;
string video_path = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message StopCameraRecordingCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message GetRGBImageStreamCommand {
message Request {
CommandHeader.Request header = 1;
bool eof = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
FrameData color_frame = 2;
CameraIntrinsics intrinsics = 3;
int32 seq_no = 4;
}
}
message GetDepthImageStreamCommand {
message Request {
CommandHeader.Request header = 1;
bool eof = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
FrameData depth_frame = 2;
CameraIntrinsics intrinsics = 3;
int32 seq_no = 4;
}
}
message GetRGBDImagesStreamCommand {
message Request {
CommandHeader.Request header = 1;
bool eof = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
FrameData color_frame = 2;
FrameData depth_frame = 3;
CameraIntrinsics intrinsics = 4;
int32 seq_no = 5;
}
}

View File

@ -0,0 +1,21 @@
syntax = "proto3";
import "cmvr/api/camera_command.proto";
package cmvr.api;
service CameraService {
rpc GetStatus(GetCameraStateCommand.Request) returns (GetCameraStateCommand.Feedback) {}
rpc StartCamera(StartCameraCommand.Request) returns (StartCameraCommand.Feedback) {}
rpc StopCamera(StopCameraCommand.Request) returns (StopCameraCommand.Feedback) {}
rpc GetRGBImage(GetRGBImageCommand.Request) returns (GetRGBImageCommand.Feedback) {}
rpc GetDepthImage(GetDepthImageCommand.Request) returns (GetDepthImageCommand.Feedback) {}
rpc GetRGBDImages(GetRGBDImagesCommand.Request) returns (GetRGBDImagesCommand.Feedback) {}
rpc StartRecording(StartCameraRecordingCommand.Request) returns (StartCameraRecordingCommand.Feedback) {}
rpc StopRecording(StopCameraRecordingCommand.Request) returns (StopCameraRecordingCommand.Feedback) {}
rpc GetRGBImageStream(stream GetRGBImageStreamCommand.Request) returns (stream GetRGBImageStreamCommand.Feedback) {}
rpc GetDepthImageStream(stream GetDepthImageStreamCommand.Request) returns (stream GetDepthImageStreamCommand.Feedback) {}
rpc GetRGBDImagesStream(stream GetRGBDImagesStreamCommand.Request) returns (stream GetRGBDImagesStreamCommand.Feedback) {}
}

View File

@ -0,0 +1,43 @@
syntax = "proto3";
package cmvr.api;
import "google/protobuf/timestamp.proto";
message DeviceLifecycle {
enum Lifecycle {
STATE_INIT = 0;
STATE_READY = 1;
STATE_RUNNING = 2;
STATE_ERROR = 3;
STATE_ESTOP = 4;
STATE_STOP = 5;
}
Lifecycle state = 1;
}
message CommandHeader {
message Request {
string device_id = 1; //
google.protobuf.Timestamp timestamp = 2; //
}
message Feedback {
bool success = 1; //
string error_message = 2; //
google.protobuf.Timestamp timestamp = 3; //
}
}
message ConfigParam {
string param_name = 1;
oneof param_value {
int32 int_value = 2; //
double double_value = 3; //
string string_value = 4; //
bool bool_value = 5; //
bytes bytes_value = 6; //
}
}

View File

@ -0,0 +1,149 @@
syntax = "proto3";
import "cmvr/api/common.proto";
package cmvr.api;
message FreedomValue {
int32 id = 1; // id 0-6
float value = 2; // 0-1
}
message FreedomState {
int32 dof_id = 1; // ID
int32 angle = 2; //
int32 speed = 3; //
int32 force = 4; //
int32 position = 5; //
int32 current = 6; //
int32 temperature = 7; //
int32 error = 8; //
repeated string error_message = 9; //
}
//
//
message SensorData {
//
enum FingerType {
PINKY = 0; //
RING = 1; //
MIDDLE_FINGER = 2; // PartType.MIDDLE冲突
INDEX = 3; //
THUMB = 4; //
PALM = 5; //
}
// THUMB_MIDDLE以避免冲突
enum PartType {
TIP = 0; //
FINGER = 1; //
PAD = 2; //
THUMB_MIDDLE = 3; //
PALM_PAD = 4; // PalmTactileData
}
FingerType finger_type = 4; // 使PALM
PartType part_type = 5; //
string sensor_name = 6; // "小拇指指端"
message RowData {
repeated int32 values = 1 [packed = true]; //
}
repeated RowData data = 1; // RowData
int32 rows = 2; //
int32 cols = 3; //
}
message DexHandState {
bool is_initialized = 1; //
repeated FreedomState hands = 2; //
}
message GetDexHandStateCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
DexHandState state = 2;
}
}
message SetDexHandPositionsCommand {
message Request {
CommandHeader.Request header = 1;
repeated FreedomValue values = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message SetDexHandAnglesCommand {
message Request {
CommandHeader.Request header = 1;
repeated FreedomValue values = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message SetDexHandForceCommand {
message Request {
CommandHeader.Request header = 1;
repeated FreedomValue values = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message SetDexHandSpeedCommand {
message Request {
CommandHeader.Request header = 1;
repeated FreedomValue values = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message SetDexHandPresetActCommand {
message Request {
CommandHeader.Request header = 1;
int32 presetActId = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message GetSensorDataCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
repeated SensorData sensor = 2;//
}
}
message GetSensorDataStreamCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
repeated SensorData sensor = 2;//
}
}

View File

@ -0,0 +1,18 @@
syntax = "proto3";
import "cmvr/api/dexhand_command.proto";
package cmvr.api;
service DexHandService {
//
rpc GetStatus(GetDexHandStateCommand.Request) returns (GetDexHandStateCommand.Feedback);
rpc SetDexHandPos(SetDexHandPositionsCommand.Request) returns (SetDexHandPositionsCommand.Feedback);
rpc SetDexHandAngle(SetDexHandAnglesCommand.Request) returns (SetDexHandAnglesCommand.Feedback);
rpc SetDexHandForce(SetDexHandForceCommand.Request) returns (SetDexHandForceCommand.Feedback);
rpc SetDexHandSpeed(SetDexHandSpeedCommand.Request) returns (SetDexHandSpeedCommand.Feedback);
rpc SetDexHandPresetAct(SetDexHandPresetActCommand.Request) returns (SetDexHandPresetActCommand.Feedback);
rpc GetSensorData(GetSensorDataCommand.Request) returns (GetSensorDataCommand.Feedback);
rpc GetSensorDataStream(stream GetSensorDataStreamCommand.Request) returns (stream GetSensorDataStreamCommand.Feedback);
}

View File

@ -0,0 +1,24 @@
syntax = "proto3";
import "cmvr/api/common.proto";
package cmvr.api;
message Touch{
message Request{
CommandHeader.Request header = 1;
// unit: ms
int32 u = 2; //
int32 v = 3; //
// unit: N
double max_force = 4;
}
message Response{
CommandHeader.Feedback header= 1;
}
}

View File

@ -0,0 +1,9 @@
syntax = "proto3";
import "cmvr/api/hlc_command.proto";
package cmvr.api;
service HlcService{
rpc touch(Touch.Request) returns (Touch.Response);
}

View File

@ -0,0 +1,135 @@
syntax = "proto3";
package cmvr.api;
import "cmvr/api/common.proto";
message JointCmd {
string joint_name = 1; //
double rad = 2; //
double vel = 3; // rad/s
}
message Pose3D{
double x = 1;
double y = 2;
double z = 3;
double rx = 4;
double ry = 5;
double rz = 6;
}
enum RobotCartesian{
X = 0;
Y = 1;
Z = 2;
RX = 3;
RY = 4;
RZ = 5;
} ;
enum RobotJointIndexDirection{
FORWARD = 0;
BACKWARD = 1;
X_POSITIVE = 2; // X轴正向
X_NEGATIVE = 3; // X轴负向
Y_POSITIVE = 4; // Y轴正向
Y_NEGATIVE = 5; // Y轴负向
Z_POSITIVE = 6; // Z轴正向
Z_NEGATIVE = 7; // Z轴负向
ROTATE_X = 8; // X轴旋转
ROTATE_Y = 9; // Y轴旋转
ROTATE_Z = 10; // Z轴旋转
}
message MoveJ{
message Request{
CommandHeader.Request header = 1;
repeated JointCmd cmds = 2;
double vel = 3;
double acc = 4;
}
message Response{
CommandHeader.Feedback header= 1;
}
}
message MoveL{
message Request{
CommandHeader.Request header = 1;
string ee_link = 2; //
Pose3D targetPose = 3;
double vel = 4;
double acc = 5;
}
message Response{
CommandHeader.Feedback header= 1;
}
}
message SpeedJ{
message Request{
CommandHeader.Request header = 1;
string joint_name = 2;
double vel = 3;
double acc = 4;
RobotJointIndexDirection dir = 5;
}
message Response{
CommandHeader.Feedback header= 1;
}
}
message SpeedL{
message Request{
CommandHeader.Request header = 1;
string ee_link = 2;
double vel = 3;
double acc = 4;
RobotJointIndexDirection dir = 5;
RobotCartesian cart = 6;
}
message Response{
CommandHeader.Feedback header= 1;
}
}
//
message JointState {
repeated string name = 1; //
repeated double position = 2; //
repeated double velocity = 3; //
repeated double effort = 4; //
double timestamp = 5; //
}
//
message JointResponse {
CommandHeader.Feedback header= 1;
repeated JointState state = 2;
}
//
message JointRequest {
CommandHeader.Request header = 1;
}
message GetPose{
message Request{
CommandHeader.Request header = 1;
string base_link = 2;
string ee_link = 3;
}
message Response{
CommandHeader.Feedback header= 1;
Pose3D pose = 2;
}
}

View File

@ -0,0 +1,17 @@
syntax = "proto3";
package cmvr.api;
import "cmvr/api/common.proto";
import "cmvr/api/humanoid_robot_command.proto";
service HumanoidRobotService{
rpc torqueOff(CommandHeader.Request) returns (CommandHeader.Feedback);
rpc torqueOn(CommandHeader.Request) returns (CommandHeader.Feedback);
rpc moveJ(MoveJ.Request) returns (MoveJ.Response);
rpc moveL(MoveL.Request) returns (MoveL.Response);
rpc speedJ(SpeedJ.Request) returns (SpeedJ.Response);
rpc speedL(SpeedL.Request) returns (SpeedL.Response);
rpc getJointState(JointRequest) returns (JointResponse);
rpc getPose(GetPose.Request) returns (GetPose.Response);
}

View File

@ -0,0 +1,81 @@
syntax = "proto3";
import "cmvr/api/common.proto";
package cmvr.api;
message MicState {
bool is_initialized = 1;
bool is_running = 2;
bool is_recording = 3;
int32 volume = 4;
string error_message = 5;
}
message GetMicStateCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
MicState state = 2;
}
}
message StartMicRecordingCommand {
message Request {
CommandHeader.Request header = 1;
string file_path = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message StopMicRecordingCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message PauseMicRecordingCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message ResumeMicRecordingCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message SetMicPhoneVolumeCommand {
message Request {
CommandHeader.Request header = 1;
int32 volume = 2; // 0 ~ 100
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message GetMicPhoneVolumeCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
int32 volume = 2; //
}
}

View File

@ -0,0 +1,20 @@
syntax = "proto3";
import "cmvr/api/microphone_command.proto";
package cmvr.api;
service MicPhoneService {
//
rpc GetStatus(GetMicStateCommand.Request) returns (GetMicStateCommand.Feedback);
rpc StartRecord(StartMicRecordingCommand.Request) returns (StartMicRecordingCommand.Feedback);
rpc StopRecord(StopMicRecordingCommand.Request) returns (StopMicRecordingCommand.Feedback);
rpc PauseRecord(PauseMicRecordingCommand.Request) returns (PauseMicRecordingCommand.Feedback);
rpc ResumeRecord(ResumeMicRecordingCommand.Request) returns (ResumeMicRecordingCommand.Feedback);
//
rpc SetVolume(SetMicPhoneVolumeCommand.Request) returns (SetMicPhoneVolumeCommand.Feedback);
rpc GetVolume(GetMicPhoneVolumeCommand.Request) returns (GetMicPhoneVolumeCommand.Feedback);
}

View File

@ -0,0 +1,99 @@
syntax = "proto3";
import "cmvr/api/common.proto";
package cmvr.api;
//
message AudioData {
enum AudioFormat {
PCM = 0;
MP3 = 1;
AAC = 2;
WAV = 3;
}
bytes data = 1; //
int32 sample_rate = 2; // Hz
int32 channels = 3; //
AudioFormat format = 4; //
string codec = 5; //
}
//
message SpeakerState {
bool is_initialized = 1; //
bool is_running = 2; //
bool is_decoding = 3;
bool is_paused = 5;
int32 volume = 6; // 0 ~ 100
string error_message = 7; //
}
//
message GetSpeakerStateCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
SpeakerState state = 2;
}
}
message PlayAudioCommand {
message Request {
CommandHeader.Request header = 1;
string audio_path = 2;
}
message Feedback { CommandHeader.Feedback header = 1; }
}
message StopSpeakerCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message PauseSpeakerCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message ResumeSpeakerCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message SetSpeakerVolumeCommand {
message Request {
CommandHeader.Request header = 1;
int32 volume = 2; // 0 ~ 100
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
message GetSpeakerVolumeCommand {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
int32 volume = 2; //
}
}

View File

@ -0,0 +1,20 @@
syntax = "proto3";
import "cmvr/api/speaker_command.proto";
package cmvr.api;
service SpeakerService {
//
rpc GetStatus(GetSpeakerStateCommand.Request) returns (GetSpeakerStateCommand.Feedback);
rpc PlayAudio(PlayAudioCommand.Request) returns (PlayAudioCommand.Feedback);
rpc StopPlayback(StopSpeakerCommand.Request) returns (StopSpeakerCommand.Feedback);
rpc PausePlayback(PauseSpeakerCommand.Request) returns (PauseSpeakerCommand.Feedback);
rpc ResumePlayback(ResumeSpeakerCommand.Request) returns (ResumeSpeakerCommand.Feedback);
//
rpc SetVolume(SetSpeakerVolumeCommand.Request) returns (SetSpeakerVolumeCommand.Feedback);
rpc GetVolume(GetSpeakerVolumeCommand.Request) returns (GetSpeakerVolumeCommand.Feedback);
}

View File

@ -0,0 +1,61 @@
syntax = "proto3";
import "cmvr/api/common.proto";
package cmvr.api;
enum DeviceType {
AGV = 0;
Battery = 1;
Camera = 2;
DexHand = 3;
Gripper = 4;
Microphone = 5;
Robot = 6;
Speaker = 7;
Unknown = 20;
}
message DeviceList {
string device_id = 1;
DeviceType device_type = 2;
}
message GetSystemInfoCommand {
message Request {}
message Feedback {
CommandHeader.Feedback header = 1;
string system_name = 2;
string version = 3;
string description = 4;
string os = 5;
string kernel_version = 6;
string architecture = 7;
}
}
message GetSystemStatusCommand {
message Request {}
message Feedback {
CommandHeader.Feedback header = 1;
float cpu_usage = 2;
float mem_total_mb = 3;
float mem_used_mb = 4;
float disk_total_gb = 5;
float disk_used_gb = 6;
repeated DeviceList device_list = 7;
}
}
message UpdateParamsCommand {
message Request {
CommandHeader.Request header = 1;
repeated ConfigParam params = 2;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}

Some files were not shown because too many files have changed in this diff Show More