Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6123ac3
Setup
jingxiangmo Sep 11, 2023
1e95374
Update requirements
jingxiangmo Sep 11, 2023
5f15eec
added conn/activate/home/move nodes
henri123lemoine Sep 11, 2023
3ded191
added move lin and move pose nodes to mecademic
henri123lemoine Sep 11, 2023
b7a91ca
minor refactor
henri123lemoine Sep 11, 2023
34ebe00
Moved mecademic nodes to instruments
henri123lemoine Sep 11, 2023
aab2e4d
moved the move nodes
henri123lemoine Sep 11, 2023
789c062
Added local is-connected checks
henri123lemoine Sep 12, 2023
bd7c439
added 2 nodes and updated a few
henri123lemoine Sep 13, 2023
69c631e
bug fix
henri123lemoine Sep 13, 2023
e3514ba
This change fixes all CONNECT node errors in manifest generation
henri123lemoine Sep 13, 2023
5bded07
Fixed meca nodes return types
henri123lemoine Sep 13, 2023
784f3a0
removed useless imports
henri123lemoine Sep 13, 2023
efb38e3
move nodes fix
henri123lemoine Sep 13, 2023
cf54202
changed move nodes init
henri123lemoine Sep 13, 2023
a1ffdda
Add I/O to doc comments for mecademic nodes that didn't previously in…
TheBigSasha Sep 14, 2023
bbc2c74
Add I/O to doc comments for mecademic nodes that didn't previously in…
TheBigSasha Sep 14, 2023
de35066
Merge remote-tracking branch 'origin/robotics' into robotics
TheBigSasha Sep 14, 2023
de66999
Merge remote-tracking branch 'origin/robotics' into robotics
TheBigSasha Sep 14, 2023
90ecebc
Merge remote-tracking branch 'origin/robotics' into robotics
TheBigSasha Sep 14, 2023
cf1db79
update set nodes comments
henri123lemoine Sep 14, 2023
4f7b5f1
Switched to more precise types
henri123lemoine Sep 14, 2023
96ea627
set nodes input bugfix
henri123lemoine Sep 14, 2023
b73958f
move nodes name changes
henri123lemoine Sep 14, 2023
b106162
nice cosmetic changes + switch to using MecademicConnHandle
henri123lemoine Sep 14, 2023
240fdb2
removed double conn check
henri123lemoine Sep 14, 2023
4436f67
undid erroneous changes
henri123lemoine Sep 15, 2023
8e4ac57
reset SET_JOINT_VEL conn_handle type
henri123lemoine Sep 15, 2023
2dfd98f
Add global state based connection handling to basic nodes
TheBigSasha Sep 18, 2023
6933c94
add fake mock robot to test the global state solution
TheBigSasha Sep 19, 2023
659c914
Connect to the arm! It works!
TheBigSasha Sep 19, 2023
ce036d2
Create disconnect node
jingxiangmo Sep 19, 2023
2cb7055
Implement vel nodes
jingxiangmo Sep 19, 2023
63f8441
Updates for demo
TheBigSasha Sep 19, 2023
918ba60
Code and doc cleanup
jingxiangmo Sep 20, 2023
33dfe0c
Docs examples
jingxiangmo Sep 26, 2023
4fbbd9f
Wrote all example.md
jingxiangmo Sep 26, 2023
5fc4ff4
Merge branch 'main' into robotics
jingxiangmo Sep 27, 2023
53e8b99
Merge branch 'develop' into robotics
jingxiangmo Sep 27, 2023
2e1b7e6
Merge pull request #286 from jingxiangmo/robotics
jingxiangmo Sep 28, 2023
e68bd09
Merge branch 'develop' into robotics-nodes
jingxiangmo Sep 29, 2023
551a9f5
Updated mecademicpy's req version
henri123lemoine Sep 29, 2023
f178dd6
Uncommented out RAND display + Overload fns
henri123lemoine Sep 29, 2023
6b070cc
minor cosmetic changes
henri123lemoine Sep 29, 2023
0a43d4e
Moved MECADEMIC to IO/INSTRUMENTS
henri123lemoine Sep 29, 2023
dd1a677
Fix DELAY.py docs
jingxiangmo Sep 29, 2023
e3f63a4
Fix delay node docs
jingxiangmo Sep 29, 2023
a1d84cd
Update MOVE_POSE.py
jingxiangmo Sep 29, 2023
4766fc4
Merge remote-tracking branch 'origin/robotics-nodes' into robotics-nodes
jingxiangmo Sep 29, 2023
70026a2
Update direcotries
jingxiangmo Sep 29, 2023
2964551
Merge branch 'develop' into robotics-nodes
itsjoeoui Oct 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions IO/ROBOTICS/ARMS/MECADEMIC/ACTIVATE/ACTIVATE.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from flojoy import flojoy, TextBlob
from PYTHON.utils.mecademic_state.mecademic_state import query_for_handle


@flojoy(deps={"mecademicpy": "1.4.0"})
def ACTIVATE(ip_address: TextBlob, simulator: bool = False) -> TextBlob:
"""
The ACTIVATE node activates the robot arm.

Inputs
------
ip_address: TextBlob
The IP address of the robot arm.

Parameters
------
simulator
Whether to activate the simulator or not. Defaults to False.

Returns
-------
ip
The IP address of the robot arm.

"""
handle = query_for_handle(ip_address)
if simulator:
handle.ActivateSim()
else:
handle.ActivateRobot()
handle.WaitActivated()
return ip_address
177 changes: 177 additions & 0 deletions IO/ROBOTICS/ARMS/MECADEMIC/ACTIVATE/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"rfInstance": {
"nodes": [
{
"width": 192,
"height": 192,
"id": "CONNECT-7ca02405-664b-43f0-a498-ef3ddecbd2b7",
"type": "INSTRUMENTS",
"data": {
"id": "CONNECT-7ca02405-664b-43f0-a498-ef3ddecbd2b7",
"label": "CONNECT",
"func": "CONNECT",
"type": "INSTRUMENTS",
"ctrls": {
"ip_address": {
"type": "str",
"default": null,
"desc": null,
"overload": null,
"functionName": "CONNECT",
"param": "ip_address",
"value": ""
}
},
"initCtrls": {},
"outputs": [
{
"name": "default",
"id": "default",
"type": "TextBlob",
"desc": "The IP address of the robot arm."
}
],
"pip_dependencies": [
{
"name": "mecademicpy",
"v": "1.4.0"
}
],
"path": "PYTHON/nodes/INSTRUMENTS/MECADEMIC/CONNECT/CONNECT.py",
"selected": false
},
"position": {
"x": 149.79183394290823,
"y": -219.99455021662578
},
"selected": false,
"positionAbsolute": {
"x": 149.79183394290823,
"y": -219.99455021662578
},
"dragging": true
},
{
"width": 192,
"height": 192,
"id": "ACTIVATE-83ad0faf-16a9-42c9-bcd2-fc0e0f25395b",
"type": "INSTRUMENTS",
"data": {
"id": "ACTIVATE-83ad0faf-16a9-42c9-bcd2-fc0e0f25395b",
"label": "ACTIVATE",
"func": "ACTIVATE",
"type": "INSTRUMENTS",
"ctrls": {
"simulator": {
"type": "bool",
"default": false,
"desc": "Whether to activate the simulator or not. Defaults to False.",
"overload": null,
"functionName": "ACTIVATE",
"param": "simulator",
"value": false
}
},
"initCtrls": {},
"inputs": [
{
"name": "ip_address",
"id": "ip_address",
"type": "TextBlob",
"multiple": false,
"desc": "The IP address of the robot arm."
}
],
"outputs": [
{
"name": "default",
"id": "default",
"type": "TextBlob",
"desc": "The IP address of the robot arm."
}
],
"pip_dependencies": [
{
"name": "mecademicpy",
"v": "1.4.0"
}
],
"path": "PYTHON/nodes/INSTRUMENTS/MECADEMIC/ACTIVATE/ACTIVATE.py",
"selected": false
},
"position": {
"x": 527.703545775578,
"y": -214.68035169098664
},
"selected": false,
"positionAbsolute": {
"x": 527.703545775578,
"y": -214.68035169098664
},
"dragging": true
},
{
"width": 192,
"height": 192,
"id": "DISCONNECT-508704f3-6da0-4541-8590-21a3b4318e0d",
"type": "INSTRUMENTS",
"data": {
"id": "DISCONNECT-508704f3-6da0-4541-8590-21a3b4318e0d",
"label": "DISCONNECT",
"func": "DISCONNECT",
"type": "INSTRUMENTS",
"ctrls": {},
"initCtrls": {},
"inputs": [
{
"name": "ip_address",
"id": "ip_address",
"type": "TextBlob",
"multiple": false,
"desc": "The IP address of the robot arm."
}
],
"pip_dependencies": [
{
"name": "mecademicpy",
"v": "1.4.0"
}
],
"path": "PYTHON/nodes/INSTRUMENTS/MECADEMIC/DISCONNECT/DISCONNECT.py",
"selected": false
},
"position": {
"x": 877.4514022741033,
"y": -212.57592377531705
},
"selected": false,
"positionAbsolute": {
"x": 877.4514022741033,
"y": -212.57592377531705
},
"dragging": true
}
],
"edges": [
{
"source": "CONNECT-7ca02405-664b-43f0-a498-ef3ddecbd2b7",
"sourceHandle": "default",
"target": "ACTIVATE-83ad0faf-16a9-42c9-bcd2-fc0e0f25395b",
"targetHandle": "ip_address",
"id": "reactflow__edge-CONNECT-7ca02405-664b-43f0-a498-ef3ddecbd2b7default-ACTIVATE-83ad0faf-16a9-42c9-bcd2-fc0e0f25395bip_address"
},
{
"source": "ACTIVATE-83ad0faf-16a9-42c9-bcd2-fc0e0f25395b",
"sourceHandle": "default",
"target": "DISCONNECT-508704f3-6da0-4541-8590-21a3b4318e0d",
"targetHandle": "ip_address",
"id": "reactflow__edge-ACTIVATE-83ad0faf-16a9-42c9-bcd2-fc0e0f25395bdefault-DISCONNECT-508704f3-6da0-4541-8590-21a3b4318e0dip_address"
}
],
"viewport": {
"x": 669.537650867023,
"y": 398.1114317341454,
"zoom": 0.7467072297113905
}
}
}
7 changes: 7 additions & 0 deletions IO/ROBOTICS/ARMS/MECADEMIC/ACTIVATE/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
In this example, the `ACTIVATE` node is responsible for activating the MECADEMIC MECA500 robot arm.

The node takes in the IP address of the robot arm and an optional parameter to specify if the simulator should be activated instead of the actual robot arm.

After activation, the node returns the same IP address as an acknowledgment that the robot arm is now active.

The `ACTIVATE` node is often the first node in a flow, ensuring that the robot arm is ready for subsequent operations.
17 changes: 17 additions & 0 deletions IO/ROBOTICS/ARMS/MECADEMIC/CONNECT/CONNECT.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from flojoy import flojoy, TextBlob
from PYTHON.utils.mecademic_state.mecademic_state import add_handle, init_handle_map


@flojoy(deps={"mecademicpy": "1.4.0"})
def CONNECT(ip_address: str) -> TextBlob:
"""
The CONNECT node establishes a connection to the Mecademic robot arm via its API.

Returns
-------
String
The IP address of the robot arm.
"""
init_handle_map(allow_reinit=True)
add_handle(ip_address)
return TextBlob(text_blob=ip_address)
62 changes: 62 additions & 0 deletions IO/ROBOTICS/ARMS/MECADEMIC/CONNECT/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"rfInstance": {
"nodes": [
{
"width": 192,
"height": 192,
"id": "CONNECT-7ca02405-664b-43f0-a498-ef3ddecbd2b7",
"type": "INSTRUMENTS",
"data": {
"id": "CONNECT-7ca02405-664b-43f0-a498-ef3ddecbd2b7",
"label": "CONNECT",
"func": "CONNECT",
"type": "INSTRUMENTS",
"ctrls": {
"ip_address": {
"type": "str",
"default": null,
"desc": null,
"overload": null,
"functionName": "CONNECT",
"param": "ip_address",
"value": ""
}
},
"initCtrls": {},
"outputs": [
{
"name": "default",
"id": "default",
"type": "TextBlob",
"desc": "The IP address of the robot arm."
}
],
"pip_dependencies": [
{
"name": "mecademicpy",
"v": "1.4.0"
}
],
"path": "PYTHON/nodes/INSTRUMENTS/MECADEMIC/CONNECT/CONNECT.py",
"selected": true
},
"position": {
"x": 147.11340802118116,
"y": -226.6906150209435
},
"selected": true,
"positionAbsolute": {
"x": 147.11340802118116,
"y": -226.6906150209435
},
"dragging": true
}
],
"edges": [],
"viewport": {
"x": 669.537650867023,
"y": 398.1114317341454,
"zoom": 0.7467072297113905
}
}
}
7 changes: 7 additions & 0 deletions IO/ROBOTICS/ARMS/MECADEMIC/CONNECT/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
In this example, the `CONNECT` node establishes a connection with the MECADEMIC MECA500 robot arm.

The node takes in the IP address of the robot arm as an input. It initializes the handle map and adds a handle for the given IP address.

Upon successful connection, the node returns the IP address, confirming that the robot arm is now connected and ready for further operations.

The `CONNECT` node is used at the beginning of a workflow to ensure that a connection is established before any other operations are carried out.
30 changes: 30 additions & 0 deletions IO/ROBOTICS/ARMS/MECADEMIC/DELAY/DELAY.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from flojoy import flojoy, TextBlob
from PYTHON.utils.mecademic_state.mecademic_state import query_for_handle


@flojoy(deps={"mecademicpy": "1.4.0"})
def DELAY(
ip_address: TextBlob,
time: float,
) -> TextBlob:
"""
The DELAY node delays the action between two nodes.

Inputs
------
ip_address: TextBlob
The IP address of the robot arm.

time: float
The time of delay in seconds.

Returns
-------
ip_address
The IP address of the robot arm.

"""
robot = query_for_handle(ip_address)
robot.Delay(time)
robot.WaitIdle()
return ip_address
Loading