Skip to content

Commit

Permalink
add basic conty functions to dcp3
Browse files Browse the repository at this point in the history
  • Loading branch information
Nguyen Pham committed Oct 29, 2024
1 parent 92abc06 commit 11eec22
Show file tree
Hide file tree
Showing 27 changed files with 989 additions and 48 deletions.
16 changes: 16 additions & 0 deletions proto/hri.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Created by Gwanwoo Kim on 2021-05-28.
// Copyright 2021 Neuromeka Inc. All rights reserved.

syntax = "proto3";
package IndyFramework.Protobuf.HRI;

import "hri_msgs.proto";

service HRI {
// ---------------------------------------------------------------- //
// Conty
// ---------------------------------------------------------------- //

rpc GetRefFrameList(GetRefFrameListReq) returns (GetRefFrameListRes) {}
rpc SetRefFrameList(SetRefFrameListReq) returns (SetRefFrameListRes) {}
}
29 changes: 29 additions & 0 deletions proto/hri_msgs.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Created by Gwanwoo Kim on 2021-05-28.
// Copyright 2021 Neuromeka Inc. All rights reserved.

syntax = "proto3";
package IndyFramework.Protobuf.HRI;

import "shared_msgs.proto";
//import "common_msgs.proto";
//import "device_msgs.proto";

//////////////////////////GetRefFrameList/////////////////////////
message GetRefFrameListReq {}

message GetRefFrameListRes {
repeated IndyFramework.Protobuf.Shared.NamedReferencePosition ref_frames = 1;
string default_name = 2;
string msg = 100;
}

//////////////////////////SetRefFrameList/////////////////////////
message SetRefFrameListReq {
repeated IndyFramework.Protobuf.Shared.NamedReferencePosition ref_frames = 1;
string default_name = 2;
}

message SetRefFrameListRes {
string msg = 100;
}

18 changes: 18 additions & 0 deletions proto/shared_msgs.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";

package IndyFramework.Protobuf.Shared;

////////////////////////////////////////////////////////////////////////////////
// shared messages
////////////////////////////////////////////////////////////////////////////////

message NamedReferencePosition {
string name = 1;
repeated float tpos = 2;
repeated float tpos0 = 3;
repeated float tpos1 = 4;
repeated float tpos2 = 5;
repeated float jpos0 = 6;
repeated float jpos1 = 7;
repeated float jpos2 = 8;
}
Binary file removed python/dist/neuromeka-3.3.0.1-py3-none-any.whl
Binary file not shown.
Binary file added python/dist/neuromeka-3.3.0.2-py3-none-any.whl
Binary file not shown.
131 changes: 116 additions & 15 deletions python/examples/indydcp3_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
" sys.path.append(\"../../python\")\n",
" from neuromeka import IndyDCP3\n",
"\n",
"step_ip = \"192.168.1.24\"\n",
"step_ip = \"192.168.1.9\"\n",
"indy = IndyDCP3(step_ip)"
]
},
Expand Down Expand Up @@ -702,21 +702,10 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": null,
"id": "e992e37d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'code': '0', 'msg': ''}"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"jtarget_0 = [0,0,0,0,0,0]\n",
"indy.movej(jtarget = jtarget_0, blending_type=1)\n",
Expand Down Expand Up @@ -1748,11 +1737,123 @@
"source": [
"indy.get_custom_control_mode()"
]
},
{
"cell_type": "markdown",
"id": "4b9756db",
"metadata": {},
"source": [
"### Conty Functions"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "da83ecd9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{}"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"indy.ping_from_conty()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "cd319034",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'ref_frames': [{'name': 'ref_0',\n",
" 'tpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'tpos0': [],\n",
" 'tpos1': [],\n",
" 'tpos2': [],\n",
" 'jpos0': [],\n",
" 'jpos1': [],\n",
" 'jpos2': []},\n",
" {'name': 'ref_1',\n",
" 'tpos': [0.01, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'tpos0': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'tpos1': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'tpos2': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'jpos0': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'jpos1': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'jpos2': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}],\n",
" 'default_name': 'ref_0',\n",
" 'msg': ''}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"indy.load_reference_frame()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "f9e13290",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'msg': ''}"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"frames = [\n",
" {\n",
" 'name': 'ref_0',\n",
" 'tpos': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'tpos0': [],\n",
" 'tpos1': [],\n",
" 'tpos2': [],\n",
" 'jpos0': [],\n",
" 'jpos1': [],\n",
" 'jpos2': []\n",
" },\n",
" {\n",
" 'name': 'ref_1',\n",
" 'tpos': [0.02, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'tpos0': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'tpos1': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'tpos2': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'jpos0': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'jpos1': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'jpos2': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]\n",
" }\n",
" ]\n",
"default_name = 'ref_0'\n",
"\n",
"indy.save_reference_frame(frames, default_name)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand Down
38 changes: 18 additions & 20 deletions python/neuromeka.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: neuromeka
Version: 3.3.0.1
Version: 3.3.0.2
Summary: Neuromeka client protocols for IndyDCP3, IndyEye, Moby, Ecat, and Motor
Home-page: https://github.com/neuromeka-robotics/neuromeka-package
Author: Neuromeka
Expand All @@ -17,25 +17,23 @@ Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: grpcio<=1.39.0,>=1.34.1; python_version < "3.8"
Requires-Dist: grpcio-tools<=1.39.0,>=1.34.1; python_version < "3.8"
Requires-Dist: protobuf==3.17.3; python_version < "3.8"
Requires-Dist: requests==2.22.0; python_version < "3.8"
Requires-Dist: Pillow<=9.5.0,>=8.4.0; python_version < "3.8"
Requires-Dist: numpy<=1.21.6,>=1.19.4; python_version < "3.8"
Requires-Dist: pyModbusTCP==0.2.1; python_version < "3.8"
Requires-Dist: netifaces==0.11.0; python_version < "3.8"
Requires-Dist: numpyencoder; python_version < "3.8"
Requires-Dist: grpcio==1.59.0; python_version >= "3.8"
Requires-Dist: grpcio-tools==1.59.0; python_version >= "3.8"
Requires-Dist: protobuf<=4.25.4,>=4.24.4; python_version >= "3.8"
Requires-Dist: requests<=2.32.0,>=2.31.0; python_version >= "3.8"
Requires-Dist: urllib3<=2.2.2,>=2.0.7; python_version >= "3.8"
Requires-Dist: Pillow==9.5.0; python_version >= "3.8"
Requires-Dist: numpy<=1.26.4,>=1.21.6; python_version >= "3.8"
Requires-Dist: pyModbusTCP==0.2.1; python_version >= "3.8"
Requires-Dist: netifaces2; python_version >= "3.8"
Requires-Dist: numpyencoder; python_version >= "3.8"
Requires-Dist: grpcio<=1.39.0,>=1.34.1; python_version < "3.9"
Requires-Dist: grpcio-tools<=1.39.0,>=1.34.1; python_version < "3.9"
Requires-Dist: protobuf==3.17.3; python_version < "3.9"
Requires-Dist: requests==2.22.0; python_version < "3.9"
Requires-Dist: Pillow<=9.5.0,>=8.4.0; python_version < "3.9"
Requires-Dist: numpy<=1.21.6,>=1.19.4; python_version < "3.9"
Requires-Dist: pyModbusTCP==0.2.1; python_version < "3.9"
Requires-Dist: netifaces==0.11.0; python_version < "3.9"
Requires-Dist: grpcio==1.59.0; python_version >= "3.9"
Requires-Dist: grpcio-tools==1.59.0; python_version >= "3.9"
Requires-Dist: protobuf<=4.25.4,>=4.24.4; python_version >= "3.9"
Requires-Dist: requests<=2.32.0,>=2.31.0; python_version >= "3.9"
Requires-Dist: urllib3<=2.2.2,>=2.0.7; python_version >= "3.9"
Requires-Dist: Pillow==9.5.0; python_version >= "3.9"
Requires-Dist: numpy<=1.26.4,>=1.21.6; python_version >= "3.9"
Requires-Dist: pyModbusTCP==0.2.1; python_version >= "3.9"
Requires-Dist: netifaces2; python_version >= "3.9"

# Neuromeka Robot API
![PyPI](https://img.shields.io/pypi/v/neuromeka)
Expand Down
14 changes: 13 additions & 1 deletion python/neuromeka.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ neuromeka/proto/ethercat_pb2.py
neuromeka/proto/ethercat_pb2_grpc.py
neuromeka/proto/eyetask_pb2.py
neuromeka/proto/eyetask_pb2_grpc.py
neuromeka/proto/hri_msgs_pb2.py
neuromeka/proto/hri_msgs_pb2_grpc.py
neuromeka/proto/hri_pb2.py
neuromeka/proto/hri_pb2_grpc.py
neuromeka/proto/indyeye_pb2.py
neuromeka/proto/indyeye_pb2_grpc.py
neuromeka/proto/moby_msgs_pb2.py
Expand All @@ -51,6 +55,8 @@ neuromeka/proto/rtde_msgs_pb2.py
neuromeka/proto/rtde_msgs_pb2_grpc.py
neuromeka/proto/rtde_pb2.py
neuromeka/proto/rtde_pb2_grpc.py
neuromeka/proto/shared_msgs_pb2.py
neuromeka/proto/shared_msgs_pb2_grpc.py
neuromeka/proto_step/__init__.py
neuromeka/proto_step/common_msgs_pb2.py
neuromeka/proto_step/common_msgs_pb2_grpc.py
Expand All @@ -74,6 +80,10 @@ neuromeka/proto_step/ethercat_pb2.py
neuromeka/proto_step/ethercat_pb2_grpc.py
neuromeka/proto_step/eyetask_pb2.py
neuromeka/proto_step/eyetask_pb2_grpc.py
neuromeka/proto_step/hri_msgs_pb2.py
neuromeka/proto_step/hri_msgs_pb2_grpc.py
neuromeka/proto_step/hri_pb2.py
neuromeka/proto_step/hri_pb2_grpc.py
neuromeka/proto_step/indyeye_pb2.py
neuromeka/proto_step/indyeye_pb2_grpc.py
neuromeka/proto_step/moby_msgs_pb2.py
Expand All @@ -83,4 +93,6 @@ neuromeka/proto_step/moby_pb2_grpc.py
neuromeka/proto_step/rtde_msgs_pb2.py
neuromeka/proto_step/rtde_msgs_pb2_grpc.py
neuromeka/proto_step/rtde_pb2.py
neuromeka/proto_step/rtde_pb2_grpc.py
neuromeka/proto_step/rtde_pb2_grpc.py
neuromeka/proto_step/shared_msgs_pb2.py
neuromeka/proto_step/shared_msgs_pb2_grpc.py
6 changes: 2 additions & 4 deletions python/neuromeka.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

[:python_version < "3.8"]
[:python_version < "3.9"]
grpcio<=1.39.0,>=1.34.1
grpcio-tools<=1.39.0,>=1.34.1
protobuf==3.17.3
Expand All @@ -8,9 +8,8 @@ Pillow<=9.5.0,>=8.4.0
numpy<=1.21.6,>=1.19.4
pyModbusTCP==0.2.1
netifaces==0.11.0
numpyencoder

[:python_version >= "3.8"]
[:python_version >= "3.9"]
grpcio==1.59.0
grpcio-tools==1.59.0
protobuf<=4.25.4,>=4.24.4
Expand All @@ -20,4 +19,3 @@ Pillow==9.5.0
numpy<=1.26.4,>=1.21.6
pyModbusTCP==0.2.1
netifaces2
numpyencoder
Binary file modified python/neuromeka/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file modified python/neuromeka/__pycache__/indydcp3.cpython-312.pyc
Binary file not shown.
Loading

0 comments on commit 11eec22

Please sign in to comment.