完成了安全区参数修改的功能
This commit is contained in:
parent
5a52f6262d
commit
f0c038f744
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,4 +4,5 @@ venv/
|
|||||||
code/__pycache__
|
code/__pycache__
|
||||||
code/testbench.py
|
code/testbench.py
|
||||||
assets/logs/
|
assets/logs/
|
||||||
assets/configs/io_device_XBC_*
|
assets/configs/io_device_XBC_*
|
||||||
|
assets/json/safety.safety_area.set_param.json
|
@ -1,93 +0,0 @@
|
|||||||
{
|
|
||||||
"s": {
|
|
||||||
"box": {
|
|
||||||
"Lx": 0.0,
|
|
||||||
"Ly": 0.0,
|
|
||||||
"Lz": 0.0,
|
|
||||||
"direction": true,
|
|
||||||
"ori": {
|
|
||||||
"euler": {
|
|
||||||
"a": 0.0,
|
|
||||||
"b": 0.0,
|
|
||||||
"c": 0.0
|
|
||||||
},
|
|
||||||
"quaternion": {
|
|
||||||
"q1": 0.0,
|
|
||||||
"q2": 0.0,
|
|
||||||
"q3": 0.0,
|
|
||||||
"q4": 0.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pos": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"enable": false,
|
|
||||||
"id": 0,
|
|
||||||
"name": "region1",
|
|
||||||
"plane": {
|
|
||||||
"direction": true,
|
|
||||||
"point": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"vector": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"shape": 0,
|
|
||||||
"shared_bind_di": "",
|
|
||||||
"shared_bind_do": "",
|
|
||||||
"sphere": {
|
|
||||||
"ori": {
|
|
||||||
"euler": {
|
|
||||||
"a": 0.0,
|
|
||||||
"b": 0.0,
|
|
||||||
"c": 0.0
|
|
||||||
},
|
|
||||||
"quaternion": {
|
|
||||||
"q1": 0.0,
|
|
||||||
"q2": 0.0,
|
|
||||||
"q3": 0.0,
|
|
||||||
"q4": 0.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pos": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"radius": 0.0
|
|
||||||
},
|
|
||||||
"state": true,
|
|
||||||
"trigger": 0,
|
|
||||||
"type": 0,
|
|
||||||
"vertebral": {
|
|
||||||
"high": 0.0,
|
|
||||||
"ori": {
|
|
||||||
"euler": {
|
|
||||||
"a": 0.0,
|
|
||||||
"b": 0.0,
|
|
||||||
"c": 0.0
|
|
||||||
},
|
|
||||||
"quaternion": {
|
|
||||||
"q1": 0.0,
|
|
||||||
"q2": 0.0,
|
|
||||||
"q3": 0.0,
|
|
||||||
"q4": 0.0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pos": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"radius": 0.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1765,9 +1765,10 @@ class HmiRequest(object):
|
|||||||
for _ in keys:
|
for _ in keys:
|
||||||
if _ in kwargs.keys():
|
if _ in kwargs.keys():
|
||||||
res[_] = kwargs[_]
|
res[_] = kwargs[_]
|
||||||
with open(f"{clibs.PREFIX}/json/safety_area.set_param.json", mode="w", encoding="utf-8") as f:
|
with open(f"{clibs.PREFIX}/json/safety.safety_area.set_param.json", mode="w", encoding="utf-8") as f:
|
||||||
dump({"s": res}, f, indent=4)
|
dump({"c": {"safety.safety_area.set_param": res}}, f, indent=4)
|
||||||
self.execution("safety_area.set_param", protocol_flag=1)
|
self.execution("safety.safety_area.set_param", protocol_flag=1)
|
||||||
|
self.execution("safety.safety_area.safety_area_enable", protocol_flag=1, id=id, enable=enable)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def get_filtered_error_code(self):
|
def get_filtered_error_code(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user