Regbot GUI

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(Get REGBOT GUI)
 
(5 intermediate revisions by one user not shown)
Line 45: Line 45:
 
=== Linux ===
 
=== Linux ===
  
  > sudo pip install pyqt5
+
  > pip install pyqt5
  > sudo pip install pyqtgraph
+
  > pip install pyqtgraph
  > sudo pip install pyserial
+
  > pip install pyserial
  > sudo pip install numpy
+
  > pip install numpy
  
 
== Get REGBOT GUI ==
 
== Get REGBOT GUI ==
Line 55: Line 55:
  
 
There are two options
 
There are two options
* Get the python files from a zip-file (available in Learn)
+
* Get the python files from a zip-file (available in Learn)
 +
* Get the newest version from repository (SVN)
  
===Install SVN===
+
=== From zip file ===
  
The source is on a SVN repository, if not available, then install:
+
Unzip the Python files (many files (23), so keep them in a clean directory).
  
Install TortoiseSVN from https://subversion.apache.org
+
=== From SVN repository ===
On left menu find "Binary packages" and from here the 'Windows' section
+
  
* Download TortoiseSVN
+
Make sure your PC has SVN (Apache subversion) support.
* Install, and remember to add 'command line' support.
+
* restart a 'cmd' terminal after installation
+
  
=== Get the GUI (SVN repository) ===
+
===== Windows =====
  
The file-browser may have support for SVN (or it can be added), in this case 'checkout' the regbot_gui on this address
+
Install e.g. SilkSVN (https://sliksvn.com/download/), this is a command-line interface, but there are other packages too.
  
svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui
+
Start a 'cmd' terminal after installation.
  
On Linux (and maybe Apple) install subversion (Linux: sudo apt install subversion)
+
===== Linux (and MAC) =====
  
The checkout with the command
+
sudo apt install subversion
  
svn checkout svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui
+
==== Get the GUI Python files ====
  
=== Get the GUI (GIT repository) ===
+
Open a terminal window, change the directory, to where you want to install, e.g. called 'svn'
  
A snapshot of the GUI is provided for Teensy version 1535 (14 February 2023) in a git repository
+
mkdir svn
 +
cd svn
 +
svn checkout svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui
 +
cd regbot_gui
  
Find the repository and the python files here
+
There should be several Python files, including 'regbot.py'.
  
https://repos.gbar.dtu.dk/git/jcan/regbot_gui.git
+
== Start the Regbot GUI ==
  
Copy files or clone to your disk
+
Go to the directory, where the Python files are placed.
  
git clone https://repos.gbar.dtu.dk/git/jcan/regbot_gui.git
+
* Execute the 'regbot.py' file.
  
NB! The SVN repository is regularly updated and this GIT version may be outdated.
+
From a terminal
 
+
== Run the GUI ==
+
 
+
=== The python version ===
+
 
+
In the regbot_gui directory, run the regbot.py script.
+
 
+
* On Linux, this command line should work:
+
  
 
  cd regbot_gui
 
  cd regbot_gui
 
  python3 regbot.py
 
  python3 regbot.py
 
* On Windows
 
 
Find the directory in your file browser (Stifinder)
 
 
Start the file 'regbot.py' - maybe create a shortcut on the desktop.
 
 
If there are errors about libraries, then check if they are installed (from the list above).
 
 
=== Regbot.exe for Windows ===
 
 
A windows executable is generated (using the instructions below); this is found in a subdirectory called "dist".
 
 
> cd Downloads
 
> cd regbot
 
> cd regbot_gui
 
> cd dist
 
> regbot
 
 
Use the browser to locate the file and execute it.
 
It also holds all the needed python-libraries, so it takes a long time to start.
 
 
The regbot.exe file is made on a Windows 10 (I don't have anything newer if there are problems; revert to the Python version)
 
 
NB! the version from 2022 does not work anymore; it has to have a date from 2023.
 
 
=== Regbot GUI use===
 
 
See the [[User interface]]
 
 
== Make a windows EXE file ==
 
 
If you installed all the python stuff, you don't need the exe file.
 
 
To make a single exe-file without the need to install anything, then it is a bit more complicated (for me at least)
 
 
===Install python===
 
 
* Install python (tested with version 3.8) from https://www.python.org/downloads/ - select 'all users' in install options and also select 'add to path'.
 
 
After installation, start 'cmd' terminal windows as administrator (right-click on 'cmd' and select 'as administrator') to install additional packages using 'pip'.
 
 
> pip install pyqt5
 
> pip install pyqtgraph
 
> pip install pyserial
 
> pip install pyinstaller
 
> exit
 
 
===Generate EXE file ===
 
 
Open a 'cmd' terminal window as a normal user
 
 
Then make the EXE-file from the directory with the REGBOT GUI
 
 
> cd Downloads\regbot_gui
 
> pyinstaller --onefile regbot.py
 
 
This takes some time, and the regbot.exe should be found in a 'dist' subdirectory.
 
 
Try:
 
> cd dist
 
> regbot.exe
 
 
PS! tried also with Python 3.9, but regbot.exe failed with the error: "PyQt5.sip not found".
 

Latest revision as of 14:02, 7 December 2023

Back to Regbot

Back to Robobot


Contents

[edit] Install Python

Install python and the python install program pip.

[edit] Windows

Install Python from Microsoft store (Includes pip). (Should be python version 3.x)

[edit] Mac

Install Python (version 3.x) Maybe it is installed by default (I have no MAC)

[edit] Linux

install pip (Python Install Program)

sudo apt install python3
sudo apt install pip

[edit] Install Python packages

[edit] Windows

Open a terminal window (search for 'cmd' app)

At the command prompt install these packages:

> pip install pyqt4
> pip install pyserial
> pip install pyqtgraph
> pip install numpy

[edit] MAC

The same packages are needed.

[edit] Linux

> pip install pyqt5
> pip install pyqtgraph
> pip install pyserial
> pip install numpy

[edit] Get REGBOT GUI

The REGBOT GUI is just a set of python files

There are two options

  • Get the python files from a zip-file (available in Learn)
  • Get the newest version from repository (SVN)

[edit] From zip file

Unzip the Python files (many files (23), so keep them in a clean directory).

[edit] From SVN repository

Make sure your PC has SVN (Apache subversion) support.

[edit] Windows

Install e.g. SilkSVN (https://sliksvn.com/download/), this is a command-line interface, but there are other packages too.

Start a 'cmd' terminal after installation.

[edit] Linux (and MAC)

sudo apt install subversion

[edit] Get the GUI Python files

Open a terminal window, change the directory, to where you want to install, e.g. called 'svn'

mkdir svn
cd svn
svn checkout svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui
cd regbot_gui

There should be several Python files, including 'regbot.py'.

[edit] Start the Regbot GUI

Go to the directory, where the Python files are placed.

  • Execute the 'regbot.py' file.

From a terminal

cd regbot_gui
python3 regbot.py
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox