Forums General General Chat Problems for controlling the arm by python Reply To: Problems for controlling the arm by python

Post count: 16

You don’t have to put your code inside the niryo_one_python_api folder, in fact you can put it wherever you want, the thing that matter is the python path wich is guiding python to its environment so having it or not inside this specific folder doesnt change anything to the problem.
The command that you are trying to use has to be used from your own computer (without putty) this command approximately mean :
connect by ssh to user ‘niryo’ at ‘ip-adress’
command 1: source ..
command 2: export …
command 3: python
So this single command is actually composed of 4 commands gathered by && separator, and if you understood this you might have already noticed that you were trying to make an ssh connection from the raspberry pi to : ssh inside the ssh (ssh-ception^^).

Now what you have to do is connecting you to the raspberry with putty, then from putty type the other commands one by one :

source ~/catkin_ws/devel/setup.bash
export PYTHONPATH=${PYTHONPATH}:/home/niryo/catkin_ws/src/niryo_one_python_api/src/niryo_python_api

To make things more convenient if you don’t want to type the first 2 commands you can add them to your bashrc
The command “chmod +x” make the file executable, you only have to use it once (using “ls” you will see that your file color has changed), then you can launch your program from its own repertory with “./”