Quick Start
This is a quick start guide to just get started to use this library and move a robot.
It is assumed that a running voraus.core is available via the network.
Install the library via
pip install voraus-robot-arm
Next, import the desired robot:
from voraus_robot_arm import VorausIndustrialRobotArm
Then, instantiate it:
robot = VorausIndustrialRobotArm()
After that, the connection to the voraus.core must be established via the context manager:
with robot.connect(host=VORAUS_CORE_HOST, port=VORAUS_CORE_PORT):
In order to see what the robot is capable of, make use of the autosuggestions of your editor.
Note that before being able to move the robot, it must be enabled via the enable() method.
robot.enable()
Now, a point-to-point motion can be performed with
robot.move_ptp(HOME).result()
If you want to learn more about the concepts and possibilities of this library, please see the key concepts chapter.
The full example is provided below.
Quick Start Example
"""Quick example to move a robot."""
# In the next line ruff is instructed to not organize the imports
# for better readability in the documentation.
from math import radians # noqa: I001
from voraus_robot_arm import VorausIndustrialRobotArm
from voraus_robot_arm import (
JointPose,
configure_logging,
)
VORAUS_CORE_HOST = "localhost"
VORAUS_CORE_PORT = 48401
HOME = JointPose().from_list(
[radians(d) for d in [0, -90, 90, -90, -90, 0]]
)
VERTICAL = JointPose().from_list(
[radians(d) for d in [0, -90, 0, -90, -90, 0]]
)
if __name__ == "__main__":
configure_logging()
robot = VorausIndustrialRobotArm()
with robot.connect(host=VORAUS_CORE_HOST, port=VORAUS_CORE_PORT):
robot.enable()
robot.move_ptp(HOME).result()
robot.move_ptp(VERTICAL).result()