ACTIVATE
The ACTIVATE node activates the robot arm.Params:ip_address : TextBlobThe IP address of the robot arm.simulator : bool, default=FalseWhether to activate the simulator or not. Defaults to False.Returns:ip : TextBlobThe IP address of the robot arm.
Python Code
from flojoy import TextBlob, flojoy
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.
Parameters
----------
ip_address : TextBlob
The IP address of the robot arm.
simulator : bool, default=False
Whether to activate the simulator or not. Defaults to False.
Returns
-------
ip : TextBlob
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
Example
Having problem with this example app? Join our Discord community and we will help you out!
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.