Blog

Discover PyNiryo, our Python package

Niryo news
Share
Découvrez PyNiryo, notre package Python

PyNiryo is a Python package allowing to send Ned commands from any system, through a TCP/IP API. It is Niryo One’s TCP/IP API continuity, with a simplified installation and a wider range of functions. 

What is an API?

An API, for Application Programming Interface, is a set of functions/definitions making the integration of a software within a program easier.

What is the TCP protocol?

TCP, for Transmission Control Protocol, is the network communication protocol that allows  the sending of messages between your computer and your robot.

What does PyNiryo allow?

PyNiryo allows an easy and complete control of one or several robots connected to the same network as your computer, through high level commands. These commands are sent via a Python script from your computer. The commands are recovered and interpreted by the robot’s TCP server. The commands are then executed and the results are sent to your computer by the TCP server.

What are PyNiryo advantages?

PyNiryo allows the control of one or several robots from a Python program that executes on your computer. Consequently, the code is easier to develop and debug as you can simply modify your code in your favorite development interface and relaunch it without having to use SSH.

Moreover, you can launch the robot’s program directly from your computer, which allows you to benefit, depending on your computer configuration, from resources superior to the ones on the Raspberry Pi. You can then include functions asking more resources such as image processing or even machine learning that enables you to approach the use of Vision in the field of Industry 4.0.

PyNiryo’s features

PyNiryo contains more than forty functions that allow you to control the robot and its ecosystem (movements, use of the tools, Conveyor Belt, Vision Set…), enabling you to prototype industrial uses oriented towards industry 4.0.

PyNiryo can be used to retrieve information on the position and current state of the robot as well as the GPIO’s values, the camera’s vision and even more functions.

Communication with the robot via TCP/IP also allows to control several robots from the same program. Thus, it is also possible to combine PyNiryo and Python Threading library to enable the control of several Ned simultaneously in order to simulate, for instance, a production line using collaborative robotics

You can find more information about this subject by referring to our tutorial on multithreading.

PyNiryo

PyNiryo API takes over the robot’s features available via ROS. Here is an non-exhaustive list of these features:

  • Move the robot
  • Use the vision
  • Control conveyor belts
  • Retrieve the GPIO pins information

Vision functions have also been added to PyNiryo to enable the user to discover how to create his own image processing pipeline to go even further in the discovery and learning of collaborative robotics in the industry 4.0.

These functions are based on OpenCV, an Open Source library for computer vision. It also allows to use these images with Deep Learning frameworks like Tensorflow and PyTorch.

PyNiryo’s installation is also simplified. Indeed, it is available on the Python PyPi package’s installation. To install it, execute the “pip install pyniryo” command. 

For further information on PyNiryo’s installation, click here.

Conclusion

To conclude, our Python PyNiryo package is a resourceful interface enabling you to put multiple projects oriented towards industry 4.0 in action, in an easyquick and effective way.