Make a connection between robertalab and NAO possible and allow the robertalab to generate python code for NAO.
These python files are made to run on a NAO. Some will only work as remote module. You need to change the ip in order to make these work on your robot. The structure of the folders reprents the structure that is planned for the implementation of the robot NAO into the Open Roberta Lab.
The playground.py is used to test the qimessaging service.
These files are a first approach to make it possible to establish an connection between the robertalab server and the robot NAO.
This is currently under development. Further information are in the comments in the files.
-
The naoconnect.java file is the latest version. It transfers a token and checks it and afterwards sends a file to NAO and executes it.
-
SitDown.py and StandUp.py are two files that are transferred for testing purposes. They represent the files that contain the code generated by the lab.
-
token.py is transferred to a remote NAO by naoconnect.java and makes NAO say a randomly generated token.
-
hal.py is the file that contains every method for every Block. It must be available on the robot in order to allow the genereated code from the lab to work on the NAO. This file makes it possible to reduce the generated Code to one line of code for every Block and makes it easier to understand the code
-
the following files are deprecated and are considered to document the progress before the project was made available on GitHub
-
fsconnectNew.java is the first version where the ftp and ssh parts are separated in two different methods.
-
FTPconnect.java is a very early version that only allows to transfer files to a remote NAO via ftp.
-
fsToken.java is a late version that allows (transfer) and commands only via SSH. Transfer won't work properly because NAO rejects the RSA fingerprint for security reasons
A NAO V4 or V5 is required and you need the latest version of Java. Additionaly these .jar's are required:
- For the ftp connection: ApacheCommonsNet
- For the ssh connection: JavaSecureChannel
If you want to edit the .py files that are made for NAO you also need Python and the latest Python SDK from Softbank Robotics.
To try it out:
Clone the repository: git clone https://github.com/OpenRoberta/robertalab-nao.git
Open naoconnect.java in your favourite editor. Edit the configuration parameters(ip,port,...) to fit your needs. You need the additional .jar's mentioned above in the same path as your naoconnect.java file.
- Compile it: javac -cp commons-net-3.1.jar;jsch-0.1.54.jar naoconnect.java
- Execute it: java -cp commons-net-3.1.jar;jsch-0.1.54.jar;. naoconnect
informations (server, user, password) should be obtained from robotconfigurationmake the connection compatible to robertalabtest if transfer and commands are possible with SFTPadd useful error messagesDONEimprove the random token generation NOT NECESSARY?add a hal file for methods that would otherwise generate more than one line of codeDONEtransfer the hal file to the robotDONEedit the hal file to represent a method for every BlockDONEThe transferred files should be checked. (Maybe via MD5) Method is implemented but not used yet. An additional file needs to be transferred on the robot to do this. Implement this with a switch to disable it.DONEThe transfer can be done via SSH. The ftp part is not necessary and should therefore be deleted. The method 'sshcommand' has to be extended.DONEString for file copying over SSH/SCP should be generated out of variablesDONErename/translate the python files and foldersDONE