sudo apt update
sudo apt upgrade
sudo apt install redis-server
sudo systemctl start redis
sudo systemctl enable redis
Redis is used only for communication (ipc) between nodes and not for storing data. Disable persisence of redis db. It protects the hard drive or SD card from damage.
Change redis config to disable writing on hd or sd and allow remote connections:
sudo nano /etc/redis/redis.conf
change or append the following settings in redis.conf:
save ""
appendonly no
bind 0.0.0.0
protected-mode no
Restart redis:
sudo systemctl restart redis
pip install redis
sudo nano ~/.config/autostart/nodestarter.desktop
Insert following lines and correct Exec path to framework path:
[Desktop Entry]
Type=Application
Name=Node Starter
Exec=python3 /home/robot/robotics_framework/starter.py
Terminal=true
- control_center.py Easy enable or disable nodes Easy start enabled nodes Easy stop running nodes Easy show live data Easy manipulate data via console Easy install libraries
- starter.py Starts all enabled nodes: Enabled nodes are nodes that begin with node_* All nodes with a different starting name, e.g., _node*, are disabled. Used as starter sript at boot
All nodes are optimized for Raspberry Pi 4 and 5. Not hardware specific nodes also running on Windows
The Brain. Master-Node for controlling system for autonomous driving. includes the state machine for controlling the robot.
Nothing
Node for camera sensor for recognition colors and letters H, S, U with OCR-Framework
pip install easyocr
pip uninstall opencv-python opencv-python-headless
pip install opencv-python
- sensor_camera_color => (R, G, B)
- sensor_camera_letter => H, S, U
| Camera | Pi |
|---|---|
| USB or CSI | USB or CSI |
Node for camera sensor for recognition colors and letters H, S, U with image-mapping
pip uninstall opencv-python opencv-python-headless
pip install opencv-python
- sensor_camera_color => (0, 0, 0) to (255,255,255)
- sensor_camera_letter => H, S, U
| Camera | Pi |
|---|---|
| USB or CSI | USB or CSI |
Node for Motor Control for 4 Motors with Mecanum Wheels
pip install gpiozero
- vel_linear_x => -100 to 100
- vel_linear_y => -100 to 100
- vel_angular_z => -100 to 100
| Motor Controller | Pi |
|---|---|
| IN1 | Digital Pin (PWM) |
| IN2 | Digital Pin (PWM) |
| IN3 | Digital Pin (PWM) |
| IN4 | Digital Pin (PWM) |
| GND | GND and Battery- |
| 5V | 3.3V or 5V |
| 12V | Battery+ |
Node for Motor Control for 2 Motors (left and right)
pip install gpiozero
- vel_linear_x => -100 to 100
- vel_angular_z => -100 to 100
| Motor Controller | Pi |
|---|---|
| IN1 | Digital Pin (PWM) |
| IN2 | Digital Pin (PWM) |
| IN3 | Digital Pin (PWM) |
| IN4 | Digital Pin (PWM) |
| GND | GND and Battery- |
| 5V | 3.3V or 5V |
| 12V | Battery+ |
node for ps4 remote controller via bluetooth
pip install pygame
- vel_linear_x => -100 to 100
- vel_linear_y => -100 to 100
- vel_angular_z => -100 to 100
- tool_pen => 0 or 1
- led_blink => 0 or 1
node for remote control via terminal
nothing
all keys
node for displaying all keys in redis db
nothing
all keys
node for GY-33 TCS34725 color detecter sensor via i2c
pip install adafruit-blinka
pip install adafruit-circuitpython-tcs34725
- sensor_color_floor => (0,0,0) to (255,255,255)
- sensor_color_floor_calibrate => 1
- sensor_color_floor_text => text of color (e.g. red, green, blue)
| Color Sensor | Pi |
|---|---|
| VCC | 3.3V |
| GND | GND |
| DR | SDA |
| CT | SCL |
Use DR/CT instead of SDL/SCL on Sensor for I2C. Soldering S0 to GND for I2C Mode of GY33
node for VL53L4CD lidar distance sensors ia i2c
pip install adafruit-blinka
pip install adafruit-circuitpython-vl53l4cd
- sensor_distance_front => distance in mm
- sensor_distance_right => distance in mm
- sensor_distance_back => distance in mm
- sensor_distance_left => distance in mm
|Lidar Sensor|Pi|info| |:---|:---|| |VIN|3.3V|| |GND|GND|| |SDA|SDA|| |SCL|SCL|| |XSHUT|Digital Output|for multisensor only|
XSHUT is necessery for multisensor, it's turn off sensor for programming I2C address
node for Slamtec RPLidar C1 360 distance sensors via USB
nothing
- sensor_distance_360 => Dictionary => degree:distance => e.g. {0:20, 1:34, 3:12, .....}
| RPLidar C1 | Pi |
|---|---|
| USB | USB |
Visualition for node_sensor_distance_360 Can also be used remotly
pip install matplotlib
pip install numpy
- sensor_distance_360
node for PMW3901 orientation flow sensor via spi
pip install pmw3901 spidev
- sensor_linear_abs_x => absolute distance
- sensor_linear_abs_y => absolute distance
|PWM3901|Pi|info| |:---|:---|| |3V3|3V3|| |GND|GND|| |MOSI|MOSI|| |MISO|MISO|| |SCLK|SCLK|| |CS|Digital Output|for multisensor only|
working range 80mm to infinity
node for BNO08x orientation and psoition sensor via i2c
pip install adafruit-blinka
pip install adafruit-circuitpython-bno08x
- sensor_angular_abs_z => absolute degrees 0 to 359
- sensor_angular_abs_y => absolute degrees 0 to 359
- sensor_angular_abs_x => absolute degrees 0 to 359
- sensor_linear_rel_x => relative distance
- sensor_linear_rel_y => relative distance
- sensor_linear_rel_z => relative distance
| BNO08x | Pi |
|---|---|
| 3V3 | 3V3 |
| GND | GND |
| SDA | SDA |
| SCL | SCL |
Node for Servo Control via 16 channel PWM Driver i2c
pip install adafruit-circuitpython-servokit
- servo_0 to servo_15 => 0 to 180
|PWM Driver|Pi|info| |:---|:---|| |VCC|3V3|logic voltage| |GND|GND|| |SDA|SDA|| |SCL|SCL|| |5V|5V Battery+|motor voltage| |GND|Battery-||
node for simulation of maze gametable Creating maps with file maps.xlsx. Use MS Excel as editor
pip install openpyxl
pip install pygame
- sensor_angular_z
- sensor_linear_x
- sensor_distance_front
- sensor_distance_right
- sensor_distance_left
- sensor_distance_back
- sensor_front_color
- sensor_floor_color
- vel_linear_x
- vel_angular_z
- tool_pen
- led_blink
Node for neopixel rgb led stripes
pip install adafruit-blinka
pip install rpi_ws281x adafruit-circuitpython-neopixel
- neopixel_color => (R, G, B)
- neopixel_blink => 0 or 1
| PWM Driver | Pi |
|---|---|
| 5V | 5V |
| GND | GND |
| Data | Digital Output |
Node for recieving requests with key and value data POST or GET Requests are possible: GET: http://robotip:5000?key=value POST: http://robotip:5000/ with JSON in body
pip install flask
- all available keys
Node for doing system commands on linux e.g. reboot, shutdown,... it can be triggerd remotely over network
- reboot => 1
- shutdown => 1
Node for remote steering via keyboard from another computer
pip install pynput
- vel_linear_x
- vel_linear_y
- vel_angular_z
- tool_pen
- led_blink
Node for ESP8266/ESP32 as Client Communication about WIFI and Redis
- all available keys
Remote steering app for android node_http_server is necessary for communication