Verify your Setup and Get Started¶
In order to verify your computer’s setup, we are going to run a program from it, and see if the robot answers as expected.
Before verifying your setup, be sure that your physical robot (or simulation) is turned on.
Firstly, go in the folder of your choice and create an empty file named “pyniryo_test.py”. This file will contain the checking code.
Edit this file and fill it with the following code:
from pyniryo import * robot_ip_address = "10.10.10.10" # Connect to robot & calibrate robot = NiryoRobot(robot_ip_address) robot.calibrate_auto() # Move joints robot.move_joints(0.0, 0.0, 0.0, 0.0, 0.0, 0.0) # Turn learning mode ON robot.set_learning_mode(True) # Stop TCP connection robot.close_connection()
Replace the third line with your Robot IP Address if you are not using Hotspot Mode.
Still on your computer, open a terminal, and place your current directory in the same folder than your file. Then, run the command:
If you are using Python 3, you may need to change
If your robot starts calibrating, then moves, and finally, goes to learning mode, your setup is validated, you can now start coding!