update documentation
This commit is contained in:
parent
e1a17808f7
commit
af3aaf7998
7 changed files with 88 additions and 16 deletions
|
@ -3,33 +3,35 @@ from compLib.CompLibClient import CompLibClient
|
|||
|
||||
|
||||
class Encoder(object):
|
||||
"""Class used to read the encoders
|
||||
"""Klasse zum Zugriff auf die Encoder der einzelnen Motoren
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def read_all_positions():
|
||||
"""Read all encoder positions.
|
||||
"""Lesen aller absoluten Positionen der einzelnen Encoder
|
||||
|
||||
:return: Tuple of all current encoder positions
|
||||
:return: Tupel mit allen aktuellen Encoderpositionen
|
||||
"""
|
||||
request = CompLib_pb2.EncoderReadPositionsRequest()
|
||||
request.header.message_type = request.DESCRIPTOR.full_name
|
||||
|
||||
response = CompLib_pb2.EncoderReadPositionsResponse()
|
||||
response.ParseFromString(CompLibClient.send(request.SerializeToString(), request.ByteSize()))
|
||||
response.ParseFromString(CompLibClient.send(
|
||||
request.SerializeToString(), request.ByteSize()))
|
||||
|
||||
return tuple(i for i in response.positions)
|
||||
|
||||
@staticmethod
|
||||
def read_all_velocities():
|
||||
"""Read the velocity of all motors connected.
|
||||
"""Lesen der Geschwindigkeit aller angeschlossenen Motoren.
|
||||
|
||||
:return: Tuple of all current motor velocities
|
||||
:return: Tupel aller aktuellen Motorgeschwindigkeiten in Radianten pro Sekunde
|
||||
"""
|
||||
request = CompLib_pb2.EncoderReadVelocitiesRequest()
|
||||
request.header.message_type = request.DESCRIPTOR.full_name
|
||||
|
||||
response = CompLib_pb2.EncoderReadVelocitiesResponse()
|
||||
response.ParseFromString(CompLibClient.send(request.SerializeToString(), request.ByteSize()))
|
||||
response.ParseFromString(CompLibClient.send(
|
||||
request.SerializeToString(), request.ByteSize()))
|
||||
|
||||
return tuple(i for i in response.velocities)
|
||||
|
|
|
@ -6,14 +6,14 @@ from compLib.CompLibClient import CompLibClient
|
|||
|
||||
|
||||
class IRSensor(object):
|
||||
"""Access the different IR Sensors of the robot
|
||||
"""Ermöglicht den Zugriff auf die einzelnen IRSensoren des Roboters
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def read_all():
|
||||
"""Read all IR sensors at once.
|
||||
"""Auslesen aller Sensoren gleichzeitig
|
||||
|
||||
:return: Array of all current ir sensors
|
||||
:return: Array aller Sensorwerte
|
||||
"""
|
||||
request = CompLib_pb2.IRSensorsReadAllRequest()
|
||||
request.header.message_type = request.DESCRIPTOR.full_name
|
||||
|
@ -26,7 +26,7 @@ class IRSensor(object):
|
|||
|
||||
@staticmethod
|
||||
def enable():
|
||||
"""Turn on all IR emitters
|
||||
"""Aktivieren Infrarot-Sender. Muss bei jedem Programmstart ausgeführt werden.
|
||||
"""
|
||||
request = CompLib_pb2.IRSensorsEnableRequest()
|
||||
request.header.message_type = request.DESCRIPTOR.full_name
|
||||
|
@ -36,7 +36,7 @@ class IRSensor(object):
|
|||
|
||||
@staticmethod
|
||||
def disable():
|
||||
"""Turn off all IR emitters
|
||||
"""Deaktivieren der Infrarot-Sender
|
||||
"""
|
||||
request = CompLib_pb2.IRSensorsDisableRequest()
|
||||
request.header.message_type = request.DESCRIPTOR.full_name
|
||||
|
|
|
@ -10,3 +10,6 @@ Wie verbinde ich mich zur Entwicklungsumgebung?
|
|||
|
||||
See :ref:`gettingstarted_codeserver`
|
||||
|
||||
Was ist der Benutzername und das Passwort für den Raspberry Pi?
|
||||
---------------------------------------------------------------
|
||||
``compair`` ``compair``
|
|
@ -7,8 +7,8 @@ Dokumentation des Roboters
|
|||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
Contents
|
||||
*********
|
||||
Inhalt
|
||||
******
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
|
10
client/docs/source/lib/classes/Encoder.rst
Normal file
10
client/docs/source/lib/classes/Encoder.rst
Normal file
|
@ -0,0 +1,10 @@
|
|||
.. _lib_encoder:
|
||||
|
||||
Encoder
|
||||
*******
|
||||
|
||||
Dokumentation der Klasse
|
||||
========================
|
||||
|
||||
.. autoclass:: compLib.Encoder.Encoder
|
||||
:members:
|
10
client/docs/source/lib/classes/IRSensor.rst
Normal file
10
client/docs/source/lib/classes/IRSensor.rst
Normal file
|
@ -0,0 +1,10 @@
|
|||
.. _lib_irsensor:
|
||||
|
||||
Infrarot Sensoren
|
||||
*****************
|
||||
|
||||
Dokumentation der Klasse
|
||||
========================
|
||||
|
||||
.. autoclass:: compLib.IRSensor.IRSensor
|
||||
:members:
|
|
@ -3,10 +3,57 @@
|
|||
Installationsanweisungen
|
||||
########################
|
||||
|
||||
Diese Anleitung dient dazu die Software auf dem Roboter neu aufzusetzen. Im normalen Gebraucht sollte dies jedoch nicht notwendig sein.
|
||||
Diese Anleitung dient dazu die Software auf dem Roboter neu aufzusetzen.
|
||||
|
||||
**Im normalen Gebraucht sollte dies jedoch nicht notwendig sein.**
|
||||
|
||||
Betriebssystem aufsetzen
|
||||
========================
|
||||
|
||||
Als Basis wird für den Roboter Raspberry Pi OS (64-bit) verwendet. Das 32-Bit Betriebssystem wird nicht unterstützt, da die Software-Komponenten nur für aarch64 bzw. arm64/v8 kompiliert werden.
|
||||
Genauere Informationen sind `hier <https://www.raspberrypi.com/software/operating-systems/>`_ zu finden.
|
||||
Genauere Informationen sind `hier <https://www.raspberrypi.com/software/operating-systems/>`_ zu finden.
|
||||
|
||||
Bearbeiten der boot-Partition
|
||||
=============================
|
||||
|
||||
1. ``cmdline.txt``
|
||||
|
||||
::
|
||||
|
||||
console=tty1 root=PARTUUID=21e60f8c-02 rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh
|
||||
|
||||
|
||||
Stellen Sie sicher, dass die folgenden Einstellungen in der ``config.txt`` korrekt gesetzt sind
|
||||
|
||||
2. ``config.txt``
|
||||
|
||||
::
|
||||
|
||||
# SPI
|
||||
dtparam=spi=on
|
||||
dtoverlay=spi1-3cs
|
||||
|
||||
# Run in 64-bit mode
|
||||
arm_64bit=1
|
||||
|
||||
[all]
|
||||
|
||||
[pi4]
|
||||
# Run as fast as firmware / board allows
|
||||
arm_boost=1
|
||||
|
||||
[all]
|
||||
start_x=1
|
||||
gpu_mem=128
|
||||
|
||||
dtoverlay=pi3-disable-bt
|
||||
enable_uart=1
|
||||
|
||||
3. Erstellen der leeren Datei ``ssh``, damit ssh beim nächsten Start aktiviert wird
|
||||
4. Hinzufügen der ``userconf.txt``
|
||||
|
||||
::
|
||||
|
||||
compair:$6$eh2pkHm18RgYtwiG$PoeabVCH8llbyIio66OefPGXZ2r2BRI2hPHIdkNTBjmiR0lGXsozGyLx0uViOx3bi998syXjSDXkwt0t3x8Bq.
|
||||
|
||||
5. Wlan Verbindung einrichten
|
Reference in a new issue