Program a Pick & Place

Site: NiryoAcademy
Course: 🚀 Getting Started with the Ned2 and the Discovery Bundle
Book: Program a Pick & Place
Printed by: Guest user
Date: Friday, 12 June 2026, 8:25 PM

Description

Attribut Blockly | Google for Developers Blockly:

  • Your first Pick & place


_images/PyNiryo_logo_2.png Pyniryo:

  • Your first Pick & Place

Table of contents

Blockly

First Pick & Place

Blocks for basic Pick and Place


Move joints

Used to control the movement of a specific joint of a robot. This block allows users to specify the target position or angle for a particular joint, enabling precise control over the robot's articulation

Parameters: variables or Joints j1,j2,j3,j4,j5,j6 blocks.

Scan tool 

Scans and updates current tool.

Grasp with Gripper or Vaccuum Pump

Activates the gripper or the vacuum pump.

Release with Gripper or Vaccuum Pump

Deactivates the gripper or the vacuum pump.

Example of programm

 
Download the full Blockly program here

Pyniryo

Your first pick and place

In the second example, we are going to develop a pick and place algorithm.

from pyniryo import NiryoRobot, PoseObject

robot = NiryoRobot('<robot_ip_address>')

robot.calibrate_auto()
robot.update_tool()

robot.release_with_tool()
robot.move(PoseObject(0.19, -0.12, 0.24, -3.14, 0.01, -0.1))
robot.grasp_with_tool()

robot.move(PoseObject(0.2, 0.09, 0.25, -3.14, -0.0, -0.03))
robot.release_with_tool()

robot.close_connection()
 
Code Details - First Pick And Place

First of all, we import the library and start the connection between our computer and the robot. We also calibrate the robot.

from pyniryo import NiryoRobot, PoseObject

robot = NiryoRobot('<robot_ip_address>')

robot.calibrate_auto()

Then, we equip the tool with update_tool().

robot.update_tool()

Now that our initialization is done, we can open the gripper (or push air from the vacuum) with release_with_tool(), go to the picking pose via move() & then catch an object with grasp_with_tool()!

robot.release_with_tool()
robot.move(PoseObject(0.19, -0.12, 0.24, -3.14, 0.01, -0.1))
robot.grasp_with_tool()

We now get to the place pose, and place the object.

robot.move(PoseObject(0.2, 0.09, 0.25, -3.14, -0.0, -0.03))
robot.release_with_tool()

Our process is now over, we can close the connection.

robot.close_connection()