Support bez. Fussballroboter tel./Skype, ...

Alles rund um TX(T) und RoboPro, mit ft-Hard- und Software
Computing using original ft hard- and software
Forumsregeln
Bitte beachte die Forumsregeln!
Antworten
PHII2020
Beiträge: 2
Registriert: 26 Dez 2020, 11:24

Support bez. Fussballroboter tel./Skype, ...

Beitrag von PHII2020 » 26 Dez 2020, 11:55

Hallo in die Runde,

ich betreue im Rahmen von Jugend forscht eine Gruppe von 3 Jungs, die auf Basis des Fußballroboters einen Roboter für den Außeneinsatz bauen möchten. Sie stehen sehr unter Zeitdruck.

Kann ihnen darum jemand das Programm erklären? Es sollte schon jemand sein, der das Programm gut durchdrungen hat. Die Beschreibung im Programm selber gibt da für sie unzureichend Auskunft. Die Grundlagen von Robo Pro und auch Erfahrungen mit Modellen sind vorhanden.

Sie müssen letztlich das Programm natürlich selber verstanden haben, um es zu modifizieren. Aber dieses Erarbeiten geht natürlich viel schneller, mit einem guten Nachhilfelehrer an der Seite.

PHI2020

vleeuwen
Beiträge: 1563
Registriert: 31 Okt 2010, 22:23
Wohnort: Enschede (NL)
Kontaktdaten:

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von vleeuwen » 26 Dez 2020, 19:41

It is not too difficult to understand how the program works.
The best thing to do, is to block the automation part and then analyses step for step what is happening.
What is happening during the calibration process?
Detection of the bar code.
Calculation of the angle, based on the middle, and left or right info.
What is happening when the image is looking to a corner (different bar code)

However you will need to have knowledge of the basic mathematica, trigonometry and goniometry stuf and also the function of a lens.
There are some basic info on some comments page of the RoboPro program.

All the bars have the same height (Href). The camera measures the actual height (Hact).
Hact/Href is a measure for the distance.
This will be corrected in case the camera is not in square on the bar.
I hop that this will help you to discover your way through the RoboPro code.

=====================================================================
Es ist nicht allzu schwer zu verstehen, wie das Programm funktioniert.
Am besten blockieren Sie den Automatisierungsteil und analysieren dann Schritt für Schritt, was gerade passiert.
Was passiert während des Kalibrierungsprozesses?
Erkennung des Barcodes.
Berechnung des Winkels basierend auf den mittleren und linken oder rechten Informationen.
Was passiert, wenn das Bild in eine Ecke schaut (anderer Barcode)?

Sie benötigen jedoch Kenntnisse über die Grundlagen der Mathematik, Trigonometrie und Goniometrie sowie über die Funktion einer Linse.
Auf einigen Kommentarseiten des RoboPro-Programms finden Sie einige grundlegende Informationen.

Alle Balken haben die gleiche Höhe (Href). Die Kamera misst die tatsächliche Höhe (Hact).
Hact / Href ist ein Maß für die Entfernung.
Dies wird korrigiert, falls die Kamera nicht quadratisch auf der Leiste steht.
software enigineer/teacher/advisor
Google translate
http://tescaweb.nl/Carel/?p=713

fanboy
Beiträge: 17
Registriert: 24 Dez 2014, 23:28

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von fanboy » 28 Dez 2020, 07:28

Is there already a Python version of the Fussballroboter out there?

Did anyone write Python equivalents to the RoboPro functionality of bar code detection and the orange ball detection?

vleeuwen
Beiträge: 1563
Registriert: 31 Okt 2010, 22:23
Wohnort: Enschede (NL)
Kontaktdaten:

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von vleeuwen » 28 Dez 2020, 08:50

RoboPro is the official visual program language fot the TXT. It is very nice with a lot of possibilities.
And C/C++ is the primary text version for programming (FT library).
It is possible to make use of the scripting language Python (FtRoboPy).
FtRoboPy calls the C/C++ FT library.

However the example are only in RoboPro.
RoboPro makes it very easy to use and understand semi parallel processing.
The image processing blocks are only available in RoboPro. For C++ or Python you need to program the image processing routines from scratch yourself (OpenCV libraries https://opencv.org/).

RoboPro can be combine with SLI's in C/C++. SLI's can not programmed in Python.
software enigineer/teacher/advisor
Google translate
http://tescaweb.nl/Carel/?p=713

PHII2020
Beiträge: 2
Registriert: 26 Dez 2020, 11:24

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von PHII2020 » 02 Jan 2021, 08:30

Thanks vleeuwen for your answers and sorry for my late response.

We get more and more familar with the software, Thanks a lot for your hints!

Now the next challenge occurs: How to get the x and y coordinates, if more than one ball is in the field?

I think, to solve this problem, the use of PYTHON is necessary. If I read the question from fanboy it looks like he may thinks in a simllar direction: How to make all possibilities from PYTHON available for the TXT controller?

Best regards and thanks for your input!

vleeuwen
Beiträge: 1563
Registriert: 31 Okt 2010, 22:23
Wohnort: Enschede (NL)
Kontaktdaten:

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von vleeuwen » 14 Jan 2021, 19:46

Hi,
Sorry for my late responds but is was very ill and still recovering from Corona.

On the TXT, Python is a secondary language which interface to the basic fischertechnik add on's over a C/C++ interface.
Python has no native (direct) connection with the embedded system.
C/C++ (and some other languages which are part of the Linaro cross compile toolchain for embedded Linux on an ARM systems) is the principale programming language for the TXT (see also the Linaro toolchain documentation).
With C/C++ developing of good and high quality code is much easier because of all the check done during the multi pass compilation phases
Pre compiled C/C++ software is faster then scripting language based Python software.

OpenCV libraries are available on the TXT.
About images processing are a lot of example in C/C++ available on the internet.

So Python is not a necessity.
However the image are available on a Berkely-socket. So you can easily read and process them with Python and the Python image processing software.
But only as stand alone application and not as a SLI-element.
software enigineer/teacher/advisor
Google translate
http://tescaweb.nl/Carel/?p=713

tintenfisch
Beiträge: 472
Registriert: 03 Jan 2018, 22:04

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von tintenfisch » 14 Jan 2021, 22:00

I think Carel's statements can be misunderstood. In my opinion, fanboy's question was about a general implementation of the project in Python.
That is of course possible.

In the meantime, Python also offers "type hints" (Python >= 3.5), so that the argument that C ++/C would allow easier development based on type checks can be invalidated in this regard. Even without the "type hints", I think Python is suitable for implementing such a project.

There is no connection between RoboPro and Python, but it would be possible to replace the RoboPro program with Python.

Best regards,
Lars

vleeuwen
Beiträge: 1563
Registriert: 31 Okt 2010, 22:23
Wohnort: Enschede (NL)
Kontaktdaten:

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von vleeuwen » 14 Jan 2021, 23:00

Certainly, all languages that has a Berkely-socket implementation or bridge to C/C++ libraries and interperter/(cross)compiler available for the ARM embedded Linux OS on the TXT could be use for stand-alone local programs. This includes Python with FtRoboPy 1.92 . So no misunderstanding about that.

However this is not the case if you like to develop RoboPro-SLI extensions or transfer parts of the program into SLI extensions. This because the RoboPro run time expect a dynamic link library file.

A good C/C++ compiler offers a lot more then only basic type checking. Think about code optimalisation, runtime checks: range checking, memory bounds checking, etc.
TXT Firmware 7.8.0 supports Linaro 7.3-2018.05 (up to C++17 dialect(features)) now.
software enigineer/teacher/advisor
Google translate
http://tescaweb.nl/Carel/?p=713

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von MasterOfGizmo » 15 Jan 2021, 08:37

PHII2020 hat geschrieben:
02 Jan 2021, 08:30
I think, to solve this problem, the use of PYTHON is necessary. If I read the question from fanboy it looks like he may thinks in a simllar direction: How to make all possibilities from PYTHON available for the TXT controller?
So wie fischertechnik den TXT ausliefert ist er vor allem für Benutzung unter RoboPro ausgelegt. Alles andere ist deutlich weniger ausgereift und erfordert in der Regel eine ganze Menge zusätzliches Know-How.

Was Carel mit "SLI" beschreibt ist eine Erweiterung für erfahrene Benutzer. Hier kann man auf seinem PC mit speziellen Software-Tools auch in anderen Sprachen fertige Code-Sammlungen bauen. Die hier verwendete Art von "Code-Sammlung" nennt man Shared-Library, "Library", weil sie wie eine "Bibliothek voller Code-Stückchen" ist und "Shared", weil viele unterschiedliche Programme darauf zugreifen können. Man kann z.B. in einer Shared-Library ein Code-Fragment hinterlegen, das den Barcode aus einem Bild auswertet. Wenn man das dann auf dem TXT hinterlegt können Programme dort diesen Code aus der Bibliothek holen und nutzen und mit ihrer Hilfe Barcodes auswerten. Mit dem SLI (Shared Library Interface) hat fischertechnik dafür gesorgt, dass auch RoboPro auf solchen in Shared Libraries hinterlegten Code zugreifen kann.

ABER: Diese Shared-Libraries auf dem PC zu erstellen ist nicht einfach. Die wenigen Beispiele, die es dazu gibt sind m.E. in C/C++ geschrieben. Um das überhaupt erstmal nachzuvollziehen müsstest Du also C/C++ können und die nötigen Werkzeuge auf dem PC installieren, um dort so eine Shared-Library erzeugen zu können.

Unabhängig davon liefert fischertechnik mit den neueren Firmware-Versionen für den TXT einen Python-Interpreter aus. Der existiert völlig unabhängig von RoboPro und dessen SLI und ist auch eher stiefmütterlich integriert, so dass er auch nicht so einfach zu nutzen ist wie z.B. RoboPro. Vor allem aber hat fischertechnik nicht vorgesehen, RoboPro und Python zu mixen. Das ist sicher für einen Profi trotzdem irgendwie machbar, indem man Nachrichten zwischen RoboPro-Programm und Python hin- und herschickt. Dazu kann man für die RoboPro-Seite eben genau so eine Shared-Library schreiben, die dann mit dem Python-Programm interagiert. Das meinte Carel mit "SLI und den Sockets".

Fazit: Ja, es ist sicher machbar RoboPro und Python zu mixen. Aber das ist ein sehr komplexes Unterfangen, denn dazu müssen Teile in RoboPro, C/C++ und Python geschrieben werden, die dann untereinander kommunizieren und Daten austauschen.

Von daher dürfte der ursprüngliche Plan des ersten Postings, nämlich das Original-RoboPro-Programm zu verstehen und erstmal auf dessen Basis zu arbeiten, am sinnvollsten sein.
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Benutzeravatar
fishfriend
Beiträge: 1814
Registriert: 26 Nov 2010, 11:45

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von fishfriend » 15 Jan 2021, 10:46

Hallo...
Kurze Nachfrage von mir.
Um welches RoboPro Programm handelt es sich genau?
Ich würde es mir gerne mal anschauen.
Mit freundlichen Grüßen
fishfriend
Holger Howey
ft Riesenräder PDF: ftcommunity.de/knowhow/bauanleitungen
TX-Light: Arduino und ftduino mit RoboPro

tintenfisch
Beiträge: 472
Registriert: 03 Jan 2018, 22:04

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von tintenfisch » 15 Jan 2021, 10:50

Hallo Holger,

es geht um den Fußballroboter aus dem TXT Discovery Set. Das dazugehörige Programm heißt "Fussballroboter.rrp"

Viele Grüße
Lars

vleeuwen
Beiträge: 1563
Registriert: 31 Okt 2010, 22:23
Wohnort: Enschede (NL)
Kontaktdaten:

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von vleeuwen » 15 Jan 2021, 11:00

But back basics, to the Football Robotor.
The RoboPro programming for the football robotor is not so difficult to understand. It is not a program language problem.
It is a mathematic and goniometric problem.
How to measure distance and orientation with a camera?

Some remarks about remote developing, SLI, programming languages:
a)
Eclipse C/C++ software development workbench is a normal basic tool for software developing.
It runs runs both on LINUX and Windows. The Linaro toolchain is also available for Windows as well for LINUX.
b)
Developing SLI Robo extensions has the same level of difficulty as developing local stand alone programs.
Both are using the same TA (transfer area). Also for Python you will need the same basic knowledge about the interfacing to the TXT actuators and sensors.
The advantage of using SLI's is that you can also use the full set of RoboPro elements, including the image processing functionality in combination with your own complex algoritmes and reading/writing to files in the TXT public data directories.
Developing SLI's and using them in ROoboPro is not difficult.
The combination can be very useful as practical part in educational programs for starting software enigineers.

c)
Even for developing a Python program you will need a external program developing workbench.
I am using the same Eclipse workbench as I am using for C/C++ program developing.
d)
With the TXT there is most of the time the need for a external software development environment.
e)
Another nice way to develop programs is using (embedded) Civetweb server with: LUA, Python, C/C++ or ECMA-script for the CGI and web sockets for the remote control communication (JSON or binary based). Civetweb has also a integrated SQLite database engine.

This all shows that there exist many ways to develop program's including remote control and monitoring for the fischertechnik TXT embedded LINUX system. Python is only one of them.
software enigineer/teacher/advisor
Google translate
http://tescaweb.nl/Carel/?p=713

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: Support bez. Fussballroboter tel./Skype, ...

Beitrag von MasterOfGizmo » 15 Jan 2021, 12:33

Warum können wir denn nicht einfach auf die Fragen des OP eingehen statt weitgehend zusammenhangslos irgendwelche technischen Spezialitäten zu beschreiben? In der Frage ging es um ein RoboPro-Programm und die Antwort dreht sich um C++ und BSD-Sockets.

Ich befürchte tatsächlich, dass diese Art von Antworten den einen oder anderern Fragesteller direkt in die Flucht treibt.
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Antworten