├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── .gitmodules
├── README.md
├── clients
├── AlphabotAndroidClient
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── at
│ │ │ │ └── mg6
│ │ │ │ └── filip
│ │ │ │ └── alphabotandroidclient
│ │ │ │ ├── BLECharacteristicSender.java
│ │ │ │ ├── BLEHandler.java
│ │ │ │ ├── BluetoothLeService.java
│ │ │ │ ├── BluetoothLeServiceListener.java
│ │ │ │ ├── ControlActivity.java
│ │ │ │ ├── HoldDownListener.java
│ │ │ │ ├── ImmersiveActivity.java
│ │ │ │ ├── LPSConfigureDialog.java
│ │ │ │ ├── LPSView.java
│ │ │ │ ├── MainActivity.java
│ │ │ │ ├── Obstacle.java
│ │ │ │ └── ObstacleConfigureDialog.java
│ │ │ └── res
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── layout
│ │ │ ├── activity_control.xml
│ │ │ ├── activity_main.xml
│ │ │ ├── dialog_lps_configure.xml
│ │ │ └── dialog_obstacle_configure.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── AlphabotClientLibrary
│ ├── AlphabotClientLibrary.Core.Tcp
│ │ ├── AlphabotClientLibrary.Core.Tcp.csproj
│ │ ├── TcpHandlerWindows.cs
│ │ └── TcpResponseInterpreter.cs
│ ├── AlphabotClientLibrary.Core
│ │ ├── AlphabotClientLibrary.Core.csproj
│ │ └── Handler
│ │ │ ├── ConnectionHandler.cs
│ │ │ ├── ObstacleHandler.cs
│ │ │ └── ResponseHandler.cs
│ ├── AlphabotClientLibrary.Example.WinForms
│ │ ├── AlphabotClientLibrary.Example.WinForms.csproj
│ │ ├── AlphabotClientLibrary.Example.WinForms.csproj.user
│ │ ├── MainForm.Designer.cs
│ │ ├── MainForm.cs
│ │ ├── MainForm.resx
│ │ └── Program.cs
│ ├── AlphabotClientLibrary.Shared
│ │ ├── AlphabotClientLibrary.Shared.csproj
│ │ ├── BleUuids.cs
│ │ ├── Contracts
│ │ │ ├── IAlphabotRequest.cs
│ │ │ ├── IAlphabotResponse.cs
│ │ │ ├── IConnectionData.cs
│ │ │ └── IResponseInterpreter.cs
│ │ ├── Models
│ │ │ ├── BleConnectionData.cs
│ │ │ ├── BleInformation.cs
│ │ │ ├── Obstacle.cs
│ │ │ ├── Position.cs
│ │ │ └── WiFiConnectionData.cs
│ │ ├── Requests
│ │ │ ├── AddObstacleRequest.cs
│ │ │ ├── CalibrateCompassRequest.cs
│ │ │ ├── CalibrateSteeringRequest.cs
│ │ │ ├── ConfigurePositioningAnchorRequest.cs
│ │ │ ├── NavigationTargetRequest.cs
│ │ │ ├── PingRequest.cs
│ │ │ ├── RemoveAllObstaclesRequest.cs
│ │ │ ├── RemoveObstacleRequest.cs
│ │ │ ├── SpeedSteerRequest.cs
│ │ │ ├── TestRequest.cs
│ │ │ └── ToggleRequest.cs
│ │ ├── ResponseInterpreter.cs
│ │ └── Responses
│ │ │ ├── AccelerometerResponse.cs
│ │ │ ├── AnchorDistancesResponse.cs
│ │ │ ├── BackDistanceSensorResponse.cs
│ │ │ ├── CompassResponse.cs
│ │ │ ├── DistanceSensorResponse.cs
│ │ │ ├── ErrorResponse.cs
│ │ │ ├── FrontDistanceSensorResponse.cs
│ │ │ ├── GyroscopeResponse.cs
│ │ │ ├── MagnetometerResponse.cs
│ │ │ ├── MultipleSensorResponse.cs
│ │ │ ├── NewObstacleRegisteredResponse.cs
│ │ │ ├── PathFindingResponse.cs
│ │ │ ├── PingResponse.cs
│ │ │ ├── PositioningResponse.cs
│ │ │ ├── TestResponse.cs
│ │ │ ├── ToggleResponse.cs
│ │ │ └── WheelSpeedResponse.cs
│ ├── AlphabotClientLibrary.Test.Tcp.Client
│ │ ├── AlphabotClientLibrary.Test.Tcp.Client.csproj
│ │ └── Program.cs
│ ├── AlphabotClientLibrary.Test.Tcp.Server
│ │ ├── AlphabotClientLibrary.Test.Tcp.Server.csproj
│ │ └── Program.cs
│ ├── AlphabotClientLibrary.Test
│ │ ├── AlphabotClientLibrary.Test.csproj
│ │ ├── TcpRequestTest.cs
│ │ └── TcpResponseTest.cs
│ └── AlphabotClientLibrary.sln
├── AlphabotTcpClient
│ ├── AlphabotTcpClient.sln
│ └── AlphabotTcpClient
│ │ ├── AlphabotClient.cs
│ │ ├── AlphabotTcpClient.csproj
│ │ ├── Program.cs
│ │ ├── SocketReader.cs
│ │ └── SocketWriter.cs
├── WPFClient
│ ├── AlphabotWPFClient
│ │ ├── AlphabotWPFClient.sln
│ │ └── AlphabotWPFClient
│ │ │ ├── AlphabotWPFClient.csproj
│ │ │ ├── App.config
│ │ │ ├── App.xaml
│ │ │ ├── App.xaml.cs
│ │ │ ├── MainWindow.xaml
│ │ │ ├── MainWindow.xaml.cs
│ │ │ └── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ └── alphabot_ble_client
│ │ └── alphabot_ble_client.ino
└── XamarinClient
│ ├── AlphabotXamarinClient.Android
│ ├── AlphabotXamarinClient.Android.csproj
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ └── Resources
│ │ ├── mipmap-anydpi-v26
│ │ ├── icon.xml
│ │ └── icon_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-mdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xhdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xxhdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ └── values
│ │ ├── colors.xml
│ │ └── styles.xml
│ ├── AlphabotXamarinClient.UWP
│ ├── AlphabotXamarinClient.UWP.csproj
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── LargeTile.scale-100.png
│ │ ├── LargeTile.scale-200.png
│ │ ├── LargeTile.scale-400.png
│ │ ├── SmallTile.scale-100.png
│ │ ├── SmallTile.scale-200.png
│ │ ├── SmallTile.scale-400.png
│ │ ├── SplashScreen.scale-100.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── SplashScreen.scale-400.png
│ │ ├── Square150x150Logo.scale-100.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square150x150Logo.scale-400.png
│ │ ├── Square44x44Logo.altform-unplated_targetsize-16.png
│ │ ├── Square44x44Logo.altform-unplated_targetsize-256.png
│ │ ├── Square44x44Logo.altform-unplated_targetsize-48.png
│ │ ├── Square44x44Logo.scale-100.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-400.png
│ │ ├── Square44x44Logo.targetsize-16.png
│ │ ├── Square44x44Logo.targetsize-256.png
│ │ ├── Square44x44Logo.targetsize-48.png
│ │ ├── StoreLogo.backup.png
│ │ ├── StoreLogo.scale-100.png
│ │ ├── StoreLogo.scale-200.png
│ │ ├── StoreLogo.scale-400.png
│ │ ├── Wide310x150Logo.scale-100.png
│ │ ├── Wide310x150Logo.scale-200.png
│ │ └── Wide310x150Logo.scale-400.png
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
│ ├── AlphabotXamarinClient
│ ├── AlphabotXamarinClient.csproj
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── Gyro
│ │ ├── DirectionChangedEventArgs.cs
│ │ └── GyroControl.cs
│ ├── MainPage.xaml
│ └── MainPage.xaml.cs
│ └── XamarinClient.sln
├── docs
├── alphabot_build_instructions.md
├── alphabot_client.md
├── alphabot_emulation.md
├── alphabot_rpi_software.md
├── alphabot_usage.md
├── images
│ ├── alphabot_assembled.png
│ ├── alphabot_esp32_pcb.jpg
│ ├── alphabot_esp32_pcb_12v_power.png
│ ├── alphabot_esp32_pcb_assembly_1.png
│ ├── alphabot_esp32_pcb_assembly_2.png
│ ├── alphabot_esp32_pcb_assembly_3.png
│ ├── alphabot_esp32_pcb_assembly_4.png
│ ├── alphabot_esp32_pcb_connect_l298n.png
│ ├── alphabot_turn_on.png
│ ├── android_add_obstacle.png
│ ├── android_connect_via_ble.png
│ ├── android_local_speedometer.png
│ ├── android_log_obstacle_dist.png
│ ├── android_log_pathfinding.png
│ ├── android_log_position.png
│ ├── android_map_with_obstacle.png
│ ├── android_positioning_setup_dialog.png
│ ├── android_select_obstacle.png
│ ├── android_wheel_speedometers.png
│ ├── attach_alphabot_esp32_pcb.png
│ ├── attach_front_wheel_1.png
│ ├── attach_front_wheel_2.png
│ ├── attach_front_wheel_3.png
│ ├── attach_front_wheel_4.png
│ ├── attach_rear_wheel_1.png
│ ├── attach_rear_wheel_2.png
│ ├── attach_rear_wheel_3.png
│ ├── attach_rear_wheel_4.png
│ ├── attach_rear_wheel_5.png
│ ├── attach_rear_wheel_6.png
│ ├── attach_steering_stepper_1.png
│ ├── attach_steering_stepper_2.png
│ ├── attach_tf-luna_1.png
│ ├── attach_tf-luna_2.jpg
│ ├── base_plate_insert_gear_motors.png
│ ├── base_plate_steering_bracket_1.png
│ ├── base_plate_steering_bracket_2.png
│ ├── battery_case.jpg
│ ├── connect_fc-03_sensors_to_alphabot_esp32_pcb_1.jpg
│ ├── connect_fc-03_sensors_to_alphabot_esp32_pcb_2.png
│ ├── connect_front_stepper_motor_to_alphabot_esp32_pcb.png
│ ├── connect_positioning_tag_to_alphabot_esp32_pcb.png
│ ├── connect_steering_stepper_to_alphabot_esp32_pcb.png
│ ├── connect_tf-luna_to_alphabot_esp32_pcb.png
│ ├── fc-03_infrared_sensor.jpg
│ ├── front_bumper_1.png
│ ├── front_bumper_2.png
│ ├── gear_motor_solder_wires.jpg
│ ├── hex_spacers.png
│ ├── insert_positioning_tag.png
│ ├── insert_wheel_encoder_1.png
│ ├── insert_wheel_encoder_2.png
│ ├── l298n_motor_driver.png
│ ├── positioning_anchor_address.png
│ ├── positioning_anchor_mounted.jpg
│ ├── positioning_anchor_serial_output.png
│ ├── positioning_anchor_with_holder.png
│ ├── positioning_anchors_bad_placement.png
│ ├── positioning_anchors_coordinates.png
│ ├── positioning_anchors_good_placement.png
│ ├── positioning_module_assembly_1.png
│ ├── positioning_module_assembly_2.png
│ ├── positioning_module_assembly_3.png
│ ├── positioning_modules_label.jpg
│ ├── positioning_tag_screw.png
│ ├── positioning_tag_serial_output.png
│ ├── rear_wheel_1.png
│ ├── rear_wheel_2.png
│ ├── rear_wheels_attached.png
│ ├── rocker_switch.png
│ ├── screw_steering_bracket_to_front_bumper_1.png
│ ├── screw_steering_bracket_to_front_bumper_2.png
│ ├── steering_axle_and_suspensions_1.png
│ ├── steering_axle_and_suspensions_2.png
│ ├── steering_axle_and_suspensions_3.png
│ ├── steering_axle_insert_ball_bearings.png
│ ├── steering_bracket_1.png
│ ├── steering_bracket_2.png
│ ├── steering_extension.png
│ ├── tag_holder.png
│ ├── usb_to_ttl_adapter.jpg
│ ├── vscode_platformio_install.png
│ ├── vscode_platformio_serial_monitor.png
│ ├── vscode_platformio_upload.png
│ └── wing.png
└── wifi_ble_communication_protocol.md
├── emulator_devices
├── HCSR04.py
├── L298N_Driving.py
└── ULN2003_Steering.py
├── emulator_rpi.py
├── emulator_tests
└── basic_steering_test.py
├── esp32
├── .gitignore
├── .vscode
│ └── extensions.json
├── alphabot
│ ├── BLECharacteristicSender.cpp
│ ├── BLECharacteristicSender.h
│ ├── BLEHandler.cpp
│ ├── BLEHandler.h
│ ├── Compass.cpp
│ ├── Compass.h
│ ├── DrivingAssistent.cpp
│ ├── DrivingAssistent.h
│ ├── MotionTracker.cpp
│ ├── MotionTracker.h
│ ├── Motor.cpp
│ ├── Motor.h
│ ├── Navigator.cpp
│ ├── Navigator.h
│ ├── Pathfinder.cpp
│ ├── Pathfinder.h
│ ├── PositioningKalmanFilter.cpp
│ ├── PositioningKalmanFilter.h
│ ├── PositioningSystem.cpp
│ ├── PositioningSystem.h
│ ├── SaveFile.cpp
│ ├── SaveFile.h
│ ├── StepperMotor.cpp
│ ├── StepperMotor.h
│ ├── TFLunaI2C.cpp
│ ├── TFLunaI2C.h
│ ├── TFLunaObstacleScanner.cpp
│ ├── TFLunaObstacleScanner.h
│ ├── TwoMotorDrive.cpp
│ ├── TwoMotorDrive.h
│ ├── WheelEncoder.cpp
│ ├── WheelEncoder.h
│ ├── WheelEncoderLeft.cpp
│ ├── WheelEncoderLeft.h
│ ├── WheelEncoderRight.cpp
│ ├── WheelEncoderRight.h
│ ├── alphabot.ino
│ ├── config.h
│ ├── motorconfig.h
│ └── pinconfig.h
├── lib
│ └── ICM20948
│ │ ├── library.json
│ │ └── src
│ │ ├── Arduino-ICM20948.cpp
│ │ ├── Arduino-ICM20948.h
│ │ ├── DataConverter.c
│ │ ├── DataConverter.h
│ │ ├── Icm20948.h
│ │ ├── Icm20948Augmented.c
│ │ ├── Icm20948Augmented.h
│ │ ├── Icm20948AuxCompassAkm.c
│ │ ├── Icm20948AuxCompassAkm.h
│ │ ├── Icm20948AuxTransport.c
│ │ ├── Icm20948AuxTransport.h
│ │ ├── Icm20948DataBaseControl.c
│ │ ├── Icm20948DataBaseControl.h
│ │ ├── Icm20948DataBaseDriver.c
│ │ ├── Icm20948DataBaseDriver.h
│ │ ├── Icm20948DataConverter.c
│ │ ├── Icm20948DataConverter.h
│ │ ├── Icm20948Defs.h
│ │ ├── Icm20948Dmp3Driver.c
│ │ ├── Icm20948Dmp3Driver.h
│ │ ├── Icm20948LoadFirmware.c
│ │ ├── Icm20948LoadFirmware.h
│ │ ├── Icm20948MPUFifoControl.c
│ │ ├── Icm20948MPUFifoControl.h
│ │ ├── Icm20948SelfTest.c
│ │ ├── Icm20948SelfTest.h
│ │ ├── Icm20948Serif.h
│ │ ├── Icm20948Setup.c
│ │ ├── Icm20948Setup.h
│ │ ├── Icm20948Transport.c
│ │ ├── Icm20948Transport.h
│ │ ├── InvBool.h
│ │ ├── InvError.h
│ │ ├── InvExport.h
│ │ ├── Message.c
│ │ ├── Message.h
│ │ ├── SensorTypes.h
│ │ └── icm20948_img.dmp3a.h
└── platformio.ini
├── pcb
├── alphabot_esp32_pcb
│ ├── AlphabotESP32PCB_BOM_PCBWay.xlsx
│ ├── AlphabotESP32PCB_Gerber.zip
│ ├── centroid.csv
│ └── schematic.svg
└── dwm1000_adapter
│ ├── DecawaveProMiniAdapter_BOM_PCBWay.xlsx
│ ├── DecawaveProMiniAdapter_Gerber.zip
│ ├── DecawaveProMiniAdapter_vector.pdf
│ └── centroid.csv
├── positioning_anchor
├── .gitignore
├── .vscode
│ └── extensions.json
├── DWM1000_Anchor
│ ├── DW1000.cpp
│ ├── DW1000.h
│ ├── DW1000CompileOptions.h
│ ├── DW1000Constants.h
│ ├── DW1000Device.cpp
│ ├── DW1000Device.h
│ ├── DW1000Mac.cpp
│ ├── DW1000Mac.h
│ ├── DW1000Ranging.cpp
│ ├── DW1000Ranging.h
│ ├── DW1000Time.cpp
│ ├── DW1000Time.h
│ ├── DWM1000_Anchor.ino
│ ├── deprecated.h
│ └── require_cpp11.h
└── platformio.ini
├── positioning_tag
├── .gitignore
├── .vscode
│ └── extensions.json
├── DWM1000_Tag
│ ├── DW1000.cpp
│ ├── DW1000.h
│ ├── DW1000CompileOptions.h
│ ├── DW1000Constants.h
│ ├── DW1000Device.cpp
│ ├── DW1000Device.h
│ ├── DW1000Mac.cpp
│ ├── DW1000Mac.h
│ ├── DW1000Ranging.cpp
│ ├── DW1000Ranging.h
│ ├── DW1000Time.cpp
│ ├── DW1000Time.h
│ ├── DWM1000_Tag.ino
│ ├── deprecated.h
│ └── require_cpp11.h
└── platformio.ini
├── rpi
├── Alphabot.Net
│ ├── Alphabot.Net.Car
│ │ ├── Alphabot.Net.Car.csproj
│ │ ├── AlphabotCar.cs
│ │ ├── Contracts
│ │ │ ├── IAlphabotCar.cs
│ │ │ ├── IPwmDevice.cs
│ │ │ ├── ISpeedController.cs
│ │ │ └── ISteeringMethod.cs
│ │ ├── Devices
│ │ │ ├── AlphabotSpeedController.cs
│ │ │ ├── CollisionPreventionAssist.cs
│ │ │ ├── DualGearMotor.cs
│ │ │ ├── GearMotor.cs
│ │ │ ├── PositioningSystem.cs
│ │ │ ├── PwmDevice.cs
│ │ │ └── SteeringStepper.cs
│ │ ├── DummyCar.cs
│ │ ├── RemoteCar.cs
│ │ └── Steering
│ │ │ ├── SteeringController.cs
│ │ │ ├── SteeringMethod.cs
│ │ │ ├── SteeringMethodAbsolutePosition.cs
│ │ │ ├── SteeringMethodRelativePosition.cs
│ │ │ └── TurnDirection.cs
│ ├── Alphabot.Net.Cli
│ │ ├── Alphabot.Net.Cli.csproj
│ │ └── Program.cs
│ ├── Alphabot.Net.Remote
│ │ ├── Alphabot.Net.Remote.csproj
│ │ ├── Commands
│ │ │ ├── ActionCalibrateSteering.cs
│ │ │ ├── ActionCenterSteering.cs
│ │ │ ├── ActionSetCollisionPrevention.cs
│ │ │ ├── ActionSetSpeed.cs
│ │ │ ├── ActionSetSteeringMethod.cs
│ │ │ ├── ActionTurn.cs
│ │ │ └── AlphabotAction.cs
│ │ ├── Contracts
│ │ │ ├── IAlphabotAction.cs
│ │ │ ├── IClientHandler.cs
│ │ │ ├── IProtocolParser.cs
│ │ │ ├── IService.cs
│ │ │ ├── ISessionHandler.cs
│ │ │ └── ITextRequestHandler.cs
│ │ ├── Core
│ │ │ ├── ActionExecutor.cs
│ │ │ ├── BitProtocolParser.cs
│ │ │ ├── ClientHandler.cs
│ │ │ ├── ProtocolParser.cs
│ │ │ ├── SessionHandler.cs
│ │ │ ├── SystemHandler.cs
│ │ │ └── ToggleSettings.cs
│ │ └── TcpService.cs
│ ├── Alphabot.Net.Shared
│ │ ├── Alphabot.Net.Shared.csproj
│ │ ├── Contracts
│ │ │ ├── IAlphabotRequest.cs
│ │ │ ├── IAlphabotResponse.cs
│ │ │ ├── IServiceLogger.cs
│ │ │ ├── ISocketReader.cs
│ │ │ └── ISocketWriter.cs
│ │ ├── Delegates.cs
│ │ ├── Logger
│ │ │ ├── ConsoleLogger.cs
│ │ │ ├── LogLevel.cs
│ │ │ └── ServiceLogger.cs
│ │ ├── Models
│ │ │ └── Position.cs
│ │ ├── Prefs
│ │ │ ├── DeviceSettings.cs
│ │ │ ├── Prefs.cs
│ │ │ └── ServiceSettings.cs
│ │ ├── Requests
│ │ │ ├── CalibrateSteeringRequest.cs
│ │ │ ├── ConfigurePositioningAnchorRequest.cs
│ │ │ ├── PingRequest.cs
│ │ │ ├── SpeedSteerRequest.cs
│ │ │ └── ToggleRequest.cs
│ │ ├── Responses
│ │ │ ├── ErrorResponse.cs
│ │ │ ├── PingResponse.cs
│ │ │ ├── PositioningResponse.cs
│ │ │ └── ToggleResponse.cs
│ │ ├── SocketReader.cs
│ │ ├── SocketWriter.cs
│ │ └── TcpConnectionLostException.cs
│ ├── Alphabot.Net.sln
│ ├── Iot.Device.Bindings.dll
│ ├── Microsoft.Extensions.Logging.Abstractions.dll
│ ├── Microsoft.Win32.SystemEvents.dll
│ ├── SixLabors.ImageSharp.dll
│ ├── System.CodeDom.dll
│ ├── System.Device.Gpio.dll
│ ├── System.Drawing.Common.dll
│ ├── System.IO.Ports.dll
│ ├── System.Management.dll
│ └── UnitsNet.dll
└── sd_image
│ ├── alphabot_defconfig
│ ├── bcm2835-gpiomem
│ ├── Makefile
│ └── bcm2835-gpiomem.c
│ ├── brcm-firmware
│ ├── brcmfmac43430-sdio.raspberrypi,3-model-b.txt
│ ├── brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
│ └── brcmfmac43455-sdio.raspberrypi,4-model-b.txt
│ ├── build.sh
│ ├── build_in_container.sh
│ ├── clean.sh
│ ├── kernel-patches
│ ├── class.h.patch
│ ├── dir.c.patch
│ └── gpiolib-sysfs.c.patch
│ ├── raspi4-firmware
│ ├── fixup4.dat
│ ├── fixup4cd.dat
│ ├── fixup4db.dat
│ ├── fixup4x.dat
│ ├── start4.elf
│ ├── start4cd.elf
│ ├── start4db.elf
│ └── start4x.elf
│ └── rootfs
│ ├── boot
│ └── firmware
│ │ └── sysconf.txt
│ ├── etc
│ ├── dnsmasq.conf
│ ├── fstab
│ ├── hostapd
│ │ └── hostapd.conf
│ ├── initramfs-tools
│ │ ├── hooks
│ │ │ ├── fix_brcm_missing_firmware
│ │ │ └── rpi-resizerootfs
│ │ └── scripts
│ │ │ └── local-bottom
│ │ │ └── rpi-resizerootfs
│ ├── network
│ │ └── interfaces.d
│ │ │ ├── eth0
│ │ │ ├── usb0
│ │ │ └── wlan0
│ └── systemd
│ │ ├── journald.conf
│ │ └── system
│ │ ├── alphabot-dotnet.service
│ │ ├── rpi-generate-ssh-host-keys.service
│ │ ├── rpi-reconfigure-raspi-firmware.service
│ │ ├── rpi-set-sysconf.service
│ │ └── set-wlan-ip-addr.service
│ └── usr
│ └── local
│ └── sbin
│ └── rpi-set-sysconf
└── stl
├── dwm1000.anchor.adapter.board.mount.stl
├── stand
└── alphabot.stand.V3.stl
└── vehicle
├── addon
├── bumper.hc-sr04.front.V3.stl
├── bumper.lidar.front.stl
├── bumper.lidar.holder.stl
├── cable.stop.top.stl
├── dwm1000.tag.adapter.board.mount.stl
├── gy-271.holder.stl
├── hc-sr04.holder.stl
├── hc-sr04.square.top.mount.single.stl
├── raised.holder.stl
├── wheel.encoder.stl
├── wing.holder.V4.hc-sr04.stl
├── wing.holder.V5.50mm.stl
└── wingv4.stl
├── base
├── alphabot.4Wheel.base.Top.V8.raspi.no.powerbank.stl
├── alphabot.4Wheel.base.Top.esp32.stl
├── alphabot.4Wheel.base.suspension.V6.stl
└── frontwheel.suspension.distance.stl
├── steering
├── steering.axle.stl
├── steering.stepper.pin.stl
├── steering.stepper.pin.xl.stl
├── suspension.left.V4.stl
└── suspension.right.V4.stl
└── wheel
├── rim.62mm.back.bearing.cage.V2.stl
├── rim.62mm.front.bearing.cage.V2.stl
├── rim.62mm.front.nut.stl
├── rim.axle.back.l.stl
├── rim.axle.back.m.stl
├── rim.axle.back.stl
├── rim.axle.back.xl.stl
├── rim.back.62mm.V2.stl
├── rim.front.62mm.V2.stl
└── tire.base.62.78.stl
/.gitignore:
--------------------------------------------------------------------------------
1 | __pycache__/
2 | rpi/sd_image/initrd.img
3 | rpi/sd_image/raspi_alphabot.img
4 | rpi/sd_image/vmlinuz-*-arm64
5 | rpi/sd_image/bcm2*-rpi-*.dtb
6 | .vs
7 | [Bb]in/
8 | [Oo]bj/
9 | .gradle/
10 | *.iml
11 | .idea/
12 | build/
13 | clients/AlphabotAndroidClient/local.properties
14 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "qemu_rpi"]
2 | path = qemu_rpi
3 | url = https://github.com/Filiprogrammer/qemu_rpi.git
4 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 26
5 | defaultConfig {
6 | applicationId "at.mg6.filip.alphabotandroidclient"
7 | minSdkVersion 21
8 | targetSdkVersion 26
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation fileTree(dir: 'libs', include: ['*.jar'])
23 | implementation 'com.android.support:appcompat-v7:26.1.0'
24 | implementation 'com.android.support.constraint:constraint-layout:1.1.2'
25 | implementation 'com.android.support:support-v4:26.1.0'
26 | implementation 'com.android.support:design:26.1.0'
27 | testImplementation 'junit:junit:4.12'
28 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
29 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
30 | }
31 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/java/at/mg6/filip/alphabotandroidclient/BluetoothLeServiceListener.java:
--------------------------------------------------------------------------------
1 | package at.mg6.filip.alphabotandroidclient;
2 |
3 | import android.bluetooth.BluetoothGattCharacteristic;
4 |
5 | public interface BluetoothLeServiceListener {
6 | void onCharacteristicChanged(BluetoothGattCharacteristic characteristic);
7 | void onCharacteristicWrite(BluetoothGattCharacteristic characteristic);
8 | void onDisconnect();
9 | }
10 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/java/at/mg6/filip/alphabotandroidclient/ImmersiveActivity.java:
--------------------------------------------------------------------------------
1 | package at.mg6.filip.alphabotandroidclient;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.view.View;
5 |
6 | public class ImmersiveActivity extends AppCompatActivity {
7 | @Override
8 | protected void onResume() {
9 | super.onResume();
10 | enableImmersiveMode();
11 | }
12 |
13 | protected void enableImmersiveMode() {
14 | getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
25 |
26 |
33 |
34 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AlphabotAndroidClient
3 |
4 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.1.3'
11 |
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/AlphabotAndroidClient/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Jul 17 12:24:45 CEST 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
7 |
--------------------------------------------------------------------------------
/clients/AlphabotAndroidClient/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Core.Tcp/AlphabotClientLibrary.Core.Tcp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Core/AlphabotClientLibrary.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Core/Handler/ConnectionHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Core.Handler;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 |
5 | namespace AlphabotClientLibrary.Core
6 | {
7 | public abstract class ConnectionHandler
8 | {
9 | protected IConnectionData _connectionData;
10 |
11 | public ResponseHandler ResponseHandler { get; private set; }
12 |
13 | public ConnectionHandler(ResponseHandler responseHandler)
14 | {
15 | ResponseHandler = responseHandler;
16 | }
17 |
18 | public abstract bool Connect(IConnectionData connectionData);
19 |
20 | public abstract void Disconnect();
21 |
22 | public abstract bool SendAction(IAlphabotRequest request);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Core/Handler/ObstacleHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using AlphabotClientLibrary.Shared.Models;
4 |
5 | namespace AlphabotClientLibrary.Core.Handler
6 | {
7 | public class ObstacleHandler
8 | {
9 | private List _obstacles = new List();
10 |
11 | public IReadOnlyCollection Obstacles {
12 | get { return _obstacles.AsReadOnly(); }
13 | }
14 |
15 | public void AddObstacle(Obstacle obstacle)
16 | {
17 | _obstacles.Add(obstacle);
18 | }
19 |
20 | public bool RemoveObstacle(Obstacle obstacle)
21 | {
22 | return _obstacles.Remove(obstacle);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Core/Handler/ResponseHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 |
5 | namespace AlphabotClientLibrary.Core.Handler
6 | {
7 | public class ResponseHandler
8 | {
9 | public delegate void Response(IAlphabotResponse response);
10 |
11 | private List _listeners = new List();
12 |
13 | public IReadOnlyCollection Listeners {
14 | get { return _listeners.AsReadOnly(); }
15 | }
16 |
17 | public void AddResponseListener(Response listener)
18 | {
19 | _listeners.Add(listener);
20 | }
21 |
22 | public void AddResponseListener(List listeners)
23 | {
24 | foreach (Response listener in listeners)
25 | _listeners.Add(listener);
26 | }
27 |
28 | public bool RemoveResponseListener(Response listener)
29 | {
30 | return _listeners.Remove(listener);
31 | }
32 |
33 | public IAlphabotResponse WaitForResponse(int responseTimeout = 5000)
34 | {
35 | throw new NotImplementedException();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Example.WinForms/AlphabotClientLibrary.Example.WinForms.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net5.0-windows
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Example.WinForms/AlphabotClientLibrary.Example.WinForms.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Form
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Example.WinForms/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace AlphabotClientLibrary.Example.WinForms
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// The main entry point for the application.
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.SetHighDpiMode(HighDpiMode.SystemAware);
18 | Application.EnableVisualStyles();
19 | Application.SetCompatibleTextRenderingDefault(false);
20 | Application.Run(new MainForm());
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/AlphabotClientLibrary.Shared.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/BleUuids.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AlphabotClientLibrary.Shared
4 | {
5 | public static class BleUuids
6 | {
7 | public static readonly Guid DRIVE_STEER = new Guid("a04295f7-eaa8-4536-b3a4-4e7ae4d72dc2");
8 |
9 | public static readonly Guid PINGCLIENT = new Guid("117ad3a5-b257-4465-abd4-7dc12a4cf77d");
10 |
11 | public static readonly Guid TOGGLE = new Guid("fce001d4-864a-48f4-9c95-de928f1da07b");
12 |
13 | public static readonly Guid SENSOR = new Guid("4c999381-35e2-4af4-8443-ee8b9fe56ba0");
14 |
15 | public static readonly Guid NAVIGATION_TARGET = new Guid("f56f0a15-52ae-4ad5-bfe1-557eed983618");
16 |
17 | public static readonly Guid CALIBRATE = new Guid("d39e8d54-8019-46c8-a977-db13871bac59");
18 |
19 | public static readonly Guid ADD_OBSTACLE = new Guid("60db37c7-afeb-4d40-bb17-a19a07d6fc95");
20 |
21 | public static readonly Guid REMOVE_OBSTACLE = new Guid("6d43e0df-682b-45ef-abb7-814ecf475771");
22 |
23 | public static readonly Guid PATH_FINDING_PATH = new Guid("8dad4c9a-1a1c-4a42-a522-ded592f4ed99");
24 |
25 | public static readonly Guid ANCHOR_LOCATIONS = new Guid("8a55dd30-463b-40f6-8f21-d68efcc386b2");
26 |
27 | public static readonly Guid ERROR = new Guid("dc458f08-ea3e-4fe1-adb3-25c840be081a");
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Contracts/IAlphabotRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Models;
3 |
4 | namespace AlphabotClientLibrary.Shared.Contracts
5 | {
6 | public interface IAlphabotRequest
7 | {
8 | byte[] GetBytes();
9 |
10 | BleInformation GetBleInformation();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Contracts/IAlphabotResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AlphabotClientLibrary.Shared.Contracts
4 | {
5 | public enum AlphabotResponseType
6 | {
7 | Compass,
8 | FrontDistanceSensor,
9 | BackDistanceSensor,
10 | Error,
11 | MultipleSensor,
12 | NewObstacle,
13 | PathFinding,
14 | Ping,
15 | Positioning,
16 | Toggle,
17 | AnchorDistances,
18 | WheelSpeed,
19 | Gyroscope,
20 | Accelerometer,
21 | Magnetometer
22 | }
23 |
24 | public interface IAlphabotResponse
25 | {
26 | AlphabotResponseType GetResponseType();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Contracts/IConnectionData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AlphabotClientLibrary.Shared.Contracts
4 | {
5 | public interface IConnectionData
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Contracts/IResponseInterpreter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AlphabotClientLibrary.Shared.Contracts
4 | {
5 | public interface IResponseInterpreter
6 | {
7 | IAlphabotResponse GetResponse();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Models/BleConnectionData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net.NetworkInformation;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 |
5 | namespace AlphabotClientLibrary.Shared.Models
6 | {
7 | public class BleConnectionData : IConnectionData
8 | {
9 | public PhysicalAddress MacAddress { get; private set; }
10 |
11 | public BleConnectionData(PhysicalAddress macAddress)
12 | {
13 | MacAddress = macAddress;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Models/BleInformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AlphabotClientLibrary.Shared.Models
4 | {
5 | public class BleInformation
6 | {
7 | public Guid Uuid { get; private set; }
8 |
9 | public byte[] Bytes { get; private set; }
10 |
11 | public BleInformation(Guid uuid, byte[] bytes)
12 | {
13 | Uuid = uuid;
14 | Bytes = bytes;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Models/WiFiConnectionData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 |
5 | namespace AlphabotClientLibrary.Shared.Models
6 | {
7 | public class WiFiConnectionData : IConnectionData
8 | {
9 | public IPEndPoint IPEndPoint { get; private set; }
10 |
11 | public WiFiConnectionData(IPEndPoint ipEndPoint)
12 | {
13 | IPEndPoint = ipEndPoint;
14 | }
15 |
16 | public WiFiConnectionData(IPAddress ipaddress, ushort port)
17 | {
18 | IPEndPoint = new IPEndPoint(ipaddress, port);
19 | }
20 |
21 | public WiFiConnectionData(string address, ushort port)
22 | {
23 | IPAddress[] addresses = Dns.GetHostAddresses(address);
24 |
25 | if(addresses.Length < 1)
26 | throw new WebException("The address resolver could not resolve the host name.", WebExceptionStatus.NameResolutionFailure);
27 |
28 | IPEndPoint = new IPEndPoint(addresses[0], port);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Requests/AddObstacleRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 | using AlphabotClientLibrary.Shared.Models;
5 |
6 | namespace AlphabotClientLibrary.Shared.Requests
7 | {
8 | public class AddObstacleRequest : IAlphabotRequest
9 | {
10 | private Obstacle _obstacle;
11 |
12 | public AddObstacleRequest(Obstacle obstacle)
13 | {
14 | _obstacle = obstacle;
15 | }
16 |
17 | public BleInformation GetBleInformation()
18 | {
19 | byte[] obsData = _obstacle.ToByteArray();
20 | byte[] timestamp = GetMillisecondsSinceEpoch();
21 | byte[] data = timestamp.Concat(obsData).ToArray();
22 |
23 | return new BleInformation(BleUuids.ADD_OBSTACLE, data);
24 | }
25 |
26 | public byte[] GetBytes()
27 | {
28 | byte[] packetId = { 0x09 };
29 | byte[] obstacleData = _obstacle.ToByteArray();
30 |
31 | return packetId.Concat(obstacleData).ToArray();
32 | }
33 |
34 | private byte[] GetMillisecondsSinceEpoch()
35 | {
36 | long millisecondsSinceEpoch = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
37 | byte[] timeInBytes = BitConverter.GetBytes(millisecondsSinceEpoch);
38 |
39 | return timeInBytes;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Requests/CalibrateCompassRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 | using AlphabotClientLibrary.Shared.Models;
4 |
5 | namespace AlphabotClientLibrary.Shared.Requests
6 | {
7 | public class CalibrateCompassRequest : IAlphabotRequest
8 | {
9 | private CompassCalibrationType _compassCalibrationType;
10 |
11 | public enum CompassCalibrationType
12 | {
13 | StartAutomated = 0x01,
14 | StartManual = 0x02,
15 | EndManual = 0x03,
16 | SetCompassOffset = 0x04
17 | }
18 |
19 | public CalibrateCompassRequest(CompassCalibrationType compassCalibrationType)
20 | {
21 | _compassCalibrationType = compassCalibrationType;
22 | }
23 |
24 | public BleInformation GetBleInformation()
25 | {
26 | byte[] bytes = new byte[1];
27 |
28 | bytes[0] = (byte)_compassCalibrationType;
29 |
30 | return new BleInformation(BleUuids.CALIBRATE, bytes);
31 | }
32 |
33 | public byte[] GetBytes()
34 | {
35 | byte[] ret = new byte[2];
36 | ret[0] = 0x04; // Packet ID 0x04
37 | ret[1] = (byte)_compassCalibrationType;
38 | return ret;
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Requests/CalibrateSteeringRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 | using AlphabotClientLibrary.Shared.Models;
5 |
6 | namespace AlphabotClientLibrary.Shared.Requests
7 | {
8 | public class CalibrateSteeringRequest : IAlphabotRequest
9 | {
10 | public BleInformation GetBleInformation()
11 | {
12 | byte[] bytes = new byte[1];
13 | bytes[0] = 0x00; // Start steering calibration
14 | byte[] time = GetMillisecondsSinceEpoch();
15 | byte[] data = bytes.Concat(time).ToArray();
16 |
17 | return new BleInformation(BleUuids.CALIBRATE, data);
18 | }
19 |
20 | public byte[] GetBytes()
21 | {
22 | byte[] packetId = { 0x03 };
23 |
24 | return packetId;
25 | }
26 |
27 | private byte[] GetMillisecondsSinceEpoch()
28 | {
29 | long millisecondsSinceEpoch = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
30 | byte[] timeInBytes = BitConverter.GetBytes(millisecondsSinceEpoch);
31 |
32 | return timeInBytes;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Requests/NavigationTargetRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 | using AlphabotClientLibrary.Shared.Models;
5 |
6 | namespace AlphabotClientLibrary.Shared.Requests
7 | {
8 | public class NavigationTargetRequest : IAlphabotRequest
9 | {
10 | private Position _position;
11 |
12 | public NavigationTargetRequest(Position position)
13 | {
14 | _position = position;
15 | }
16 |
17 | public BleInformation GetBleInformation()
18 | {
19 | byte[] posBytes = _position.ToByteArray();
20 | byte[] timestamp = GetMillisecondsSinceEpoch();
21 | byte[] data = posBytes.Concat(timestamp).ToArray();
22 |
23 | return new BleInformation(BleUuids.NAVIGATION_TARGET, data);
24 | }
25 |
26 | public byte[] GetBytes()
27 | {
28 | byte[] packetId = { 0x08 };
29 | byte[] positionData = _position.ToByteArray();
30 |
31 | return packetId.Concat(positionData).ToArray();
32 | }
33 |
34 | private byte[] GetMillisecondsSinceEpoch()
35 | {
36 | long millisecondsSinceEpoch = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
37 | byte[] timeInBytes = BitConverter.GetBytes(millisecondsSinceEpoch);
38 |
39 | return timeInBytes;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Requests/PingRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 | using AlphabotClientLibrary.Shared.Models;
5 |
6 | namespace AlphabotClientLibrary.Shared.Requests
7 | {
8 | public class PingRequest : IAlphabotRequest
9 | {
10 | public BleInformation GetBleInformation()
11 | {
12 | return new BleInformation(BleUuids.PINGCLIENT, GetMillisecondsSinceEpoch());
13 | }
14 |
15 | public byte[] GetBytes()
16 | {
17 | byte[] packetId = { 0x06 };
18 | byte[] time = GetMillisecondsSinceEpoch();
19 |
20 | return packetId.Concat(time).ToArray();
21 | }
22 |
23 | private byte[] GetMillisecondsSinceEpoch()
24 | {
25 | long millisecondsSinceEpoch = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
26 | byte[] timeInBytes = BitConverter.GetBytes(millisecondsSinceEpoch);
27 |
28 | return timeInBytes;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Requests/RemoveAllObstaclesRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 | using AlphabotClientLibrary.Shared.Models;
4 |
5 | namespace AlphabotClientLibrary.Shared.Requests
6 | {
7 | public class RemoveAllObstaclesRequest : IAlphabotRequest
8 | {
9 | public BleInformation GetBleInformation()
10 | {
11 | byte[] bytes = new byte[0];
12 |
13 | return new BleInformation(BleUuids.REMOVE_OBSTACLE, bytes);
14 | }
15 |
16 | public byte[] GetBytes()
17 | {
18 | byte[] packetId = { 0x0C };
19 |
20 | return packetId;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Requests/SpeedSteerRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 | using AlphabotClientLibrary.Shared.Models;
4 |
5 | namespace AlphabotClientLibrary.Shared.Requests
6 | {
7 | public class SpeedSteerRequest : IAlphabotRequest
8 | {
9 | private sbyte _speed;
10 | private sbyte _steer;
11 |
12 | public SpeedSteerRequest(sbyte speed, sbyte steer)
13 | {
14 | _speed = speed;
15 | _steer = steer;
16 | }
17 |
18 | public BleInformation GetBleInformation()
19 | {
20 | byte[] bytes = new byte[2];
21 | bytes[0] = (byte)_speed;
22 | bytes[1] = (byte)_steer;
23 |
24 | return new BleInformation(BleUuids.DRIVE_STEER, bytes);
25 | }
26 |
27 | public byte[] GetBytes()
28 | {
29 | byte[] ret = new byte[3];
30 | ret[0] = 0x01; // Packet ID 0x01
31 | ret[1] = (byte)_speed;
32 | ret[2] = (byte)_steer;
33 |
34 | return ret;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Requests/TestRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 | using AlphabotClientLibrary.Shared.Models;
4 |
5 | namespace AlphabotClientLibrary.Shared.Requests
6 | {
7 | public class TestRequest : IAlphabotRequest
8 | {
9 | public BleInformation GetBleInformation()
10 | {
11 | throw new NotImplementedException();
12 | }
13 |
14 | public byte[] GetBytes()
15 | {
16 | byte[] test = new byte[2];
17 | test[0] = 99;
18 | test[1] = 99;
19 |
20 | return test;
21 | }
22 |
23 | public override string ToString()
24 | {
25 | return "TestRequest.cs";
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/AccelerometerResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class AccelerometerResponse : IAlphabotResponse
7 | {
8 | ///
9 | /// The acceleration in m/s^2
10 | ///
11 | public float XAxis { get; private set; }
12 |
13 | ///
14 | /// The acceleration in m/s^2
15 | ///
16 | public float YAxis { get; private set; }
17 |
18 | ///
19 | /// The acceleration in m/s^2
20 | ///
21 | public float ZAxis { get; private set; }
22 |
23 | public AccelerometerResponse(float xAxis, float yAxis, float zAxis)
24 | {
25 | XAxis = xAxis;
26 | YAxis = yAxis;
27 | ZAxis = zAxis;
28 | }
29 |
30 | public AlphabotResponseType GetResponseType()
31 | {
32 | return AlphabotResponseType.Accelerometer;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/AnchorDistancesResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class AnchorDistancesResponse : IAlphabotResponse
7 | {
8 | public ushort DistanceAnchor0 { get; private set; }
9 |
10 | public ushort DistanceAnchor1 { get; private set; }
11 |
12 | public ushort DistanceAnchor2 { get; private set; }
13 |
14 | public AnchorDistancesResponse(ushort distanceAnchor0, ushort distanceAnchor1, ushort distanceAnchor2)
15 | {
16 | DistanceAnchor0 = distanceAnchor0;
17 | DistanceAnchor1 = distanceAnchor1;
18 | DistanceAnchor2 = distanceAnchor2;
19 | }
20 |
21 | public AlphabotResponseType GetResponseType()
22 | {
23 | return AlphabotResponseType.AnchorDistances;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/BackDistanceSensorResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class BackDistanceSensorResponse : DistanceSensorResponse
7 | {
8 | public BackDistanceSensorResponse(short degree, ushort distance) : base(degree, distance) {}
9 |
10 | public override AlphabotResponseType GetResponseType()
11 | {
12 | return AlphabotResponseType.BackDistanceSensor;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/CompassResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class CompassResponse : IAlphabotResponse
7 | {
8 | public short Degree { get; private set; }
9 |
10 | public CompassResponse(short degree)
11 | {
12 | Degree = degree;
13 | }
14 |
15 | public AlphabotResponseType GetResponseType()
16 | {
17 | return AlphabotResponseType.Compass;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/DistanceSensorResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public abstract class DistanceSensorResponse : IAlphabotResponse
7 | {
8 | public short Degree { get; private set; }
9 |
10 | public ushort Distance { get; private set; }
11 |
12 | public DistanceSensorResponse(short degree, ushort distance)
13 | {
14 | Degree = degree;
15 | Distance = distance;
16 | }
17 |
18 | public abstract AlphabotResponseType GetResponseType();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/ErrorResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class ErrorResponse : IAlphabotResponse
7 | {
8 | public enum ErrorType
9 | {
10 | UnknownError = 0x00,
11 | UnknownProtocol = 0x01,
12 | NotSupportedProtocol = 0x02,
13 | UnknownPacketId = 0x03,
14 | WrongPayload = 0x04
15 | }
16 |
17 | public ErrorType Error { get; private set; }
18 |
19 | public byte Header { get; private set; }
20 |
21 | public byte[] Payload { get; private set; }
22 |
23 | public ErrorResponse(ErrorType errorType, byte[] packet)
24 | {
25 | Payload = new byte[packet.Length - 1];
26 | Header = packet[0];
27 | Array.Copy(packet, 1, Payload, 0, packet.Length - 1);
28 | Error = errorType;
29 | }
30 |
31 | public AlphabotResponseType GetResponseType()
32 | {
33 | return AlphabotResponseType.Error;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/FrontDistanceSensorResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class FrontDistanceSensorResponse : DistanceSensorResponse
7 | {
8 | public FrontDistanceSensorResponse(short degree, ushort distance) : base(degree, distance) {}
9 |
10 | public override AlphabotResponseType GetResponseType()
11 | {
12 | return AlphabotResponseType.FrontDistanceSensor;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/GyroscopeResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class GyroscopeResponse : IAlphabotResponse
7 | {
8 | ///
9 | /// The speed in degrees per second
10 | ///
11 |
12 | public float XAxis { get; private set; }
13 | ///
14 | /// The speed in degrees per second
15 | ///
16 |
17 | public float YAxis { get; private set; }
18 | ///
19 | /// The speed in degrees per second
20 | ///
21 | public float ZAxis { get; private set; }
22 |
23 | public GyroscopeResponse(float xAxis, float yAxis, float zAxis)
24 | {
25 | XAxis = xAxis;
26 | YAxis = yAxis;
27 | ZAxis = zAxis;
28 | }
29 |
30 | public AlphabotResponseType GetResponseType()
31 | {
32 | return AlphabotResponseType.Gyroscope;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/MagnetometerResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class MagnetometerResponse : IAlphabotResponse
7 | {
8 | ///
9 | /// The magnetic flux density in Microtesla
10 | ///
11 | public float XAxis { get; private set; }
12 |
13 | ///
14 | /// The magnetic flux density in Microtesla
15 | ///
16 | public float YAxis { get; private set; }
17 |
18 | ///
19 | /// The magnetic flux density in Microtesla
20 | ///
21 | public float ZAxis { get; private set; }
22 |
23 | public MagnetometerResponse(float xAxis, float yAxis, float zAxis)
24 | {
25 | XAxis = xAxis;
26 | YAxis = yAxis;
27 | ZAxis = zAxis;
28 | }
29 |
30 | public AlphabotResponseType GetResponseType()
31 | {
32 | return AlphabotResponseType.Magnetometer;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/MultipleSensorResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 |
5 | namespace AlphabotClientLibrary.Shared.Responses
6 | {
7 | public class MultipleSensorResponse : IAlphabotResponse
8 | {
9 | public enum SensorType
10 | {
11 | None,
12 | DistanceSensor,
13 | Positioning,
14 | Compass
15 | }
16 |
17 | private List _sensorResponses = new List();
18 |
19 | public IReadOnlyCollection SensorResponses {
20 | get { return _sensorResponses; }
21 | }
22 |
23 | public MultipleSensorResponse(List sensorResponses)
24 | {
25 | _sensorResponses = sensorResponses;
26 | }
27 |
28 | public AlphabotResponseType GetResponseType()
29 | {
30 | return AlphabotResponseType.MultipleSensor;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/NewObstacleRegisteredResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 | using AlphabotClientLibrary.Shared.Models;
4 |
5 | namespace AlphabotClientLibrary.Shared.Responses
6 | {
7 | public class NewObstacleRegisteredResponse : IAlphabotResponse
8 | {
9 | public Obstacle Obstacle { get; private set; }
10 |
11 | public NewObstacleRegisteredResponse(Obstacle obstacle)
12 | {
13 | Obstacle = obstacle;
14 | }
15 |
16 | public AlphabotResponseType GetResponseType()
17 | {
18 | return AlphabotResponseType.NewObstacle;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/PathFindingResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 |
5 | namespace AlphabotClientLibrary.Shared.Responses
6 | {
7 | public class PathFindingResponse : IAlphabotResponse
8 | {
9 | public enum PathFindingStep
10 | {
11 | LeftUp = 0x00,
12 | Left = 0x01,
13 | LeftDown = 0x02,
14 | Up = 0x03,
15 | RightDown = 0x04,
16 | Down = 0x05,
17 | RightUp = 0x06,
18 | Right = 0x07
19 | }
20 |
21 | public sbyte StartPositionX { get; }
22 |
23 | public sbyte StartPositionY { get; }
24 |
25 | public IReadOnlyCollection Steps { get; }
26 |
27 | public PathFindingResponse(sbyte startPositionX, sbyte startPositionY, IReadOnlyCollection pathFindingSteps)
28 | {
29 | StartPositionX = startPositionX;
30 | StartPositionY = startPositionY;
31 | Steps = pathFindingSteps;
32 | }
33 |
34 | public AlphabotResponseType GetResponseType()
35 | {
36 | return AlphabotResponseType.PathFinding;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/PingResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class PingResponse : IAlphabotResponse
7 | {
8 | public long Time { get; private set; }
9 |
10 | public int Latency { get; private set; }
11 |
12 | public PingResponse(long time)
13 | {
14 | Time = time;
15 | Latency = (int)(DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - Time);
16 | }
17 |
18 | public AlphabotResponseType GetResponseType()
19 | {
20 | return AlphabotResponseType.Ping;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/PositioningResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 | using AlphabotClientLibrary.Shared.Models;
4 |
5 | namespace AlphabotClientLibrary.Shared.Responses
6 | {
7 | public class PositioningResponse : IAlphabotResponse
8 | {
9 | public Position Position { get; private set; }
10 |
11 | public PositioningResponse(Position position)
12 | {
13 | Position = position;
14 | }
15 |
16 | public AlphabotResponseType GetResponseType()
17 | {
18 | return AlphabotResponseType.Positioning;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/TestResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class TestResponse : IAlphabotResponse
7 | {
8 | public override string ToString()
9 | {
10 | return "TestResponse.cs";
11 | }
12 |
13 | public AlphabotResponseType GetResponseType()
14 | {
15 | throw new NotImplementedException();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Shared/Responses/WheelSpeedResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace AlphabotClientLibrary.Shared.Responses
5 | {
6 | public class WheelSpeedResponse : IAlphabotResponse
7 | {
8 | ///
9 | /// Speed of the left wheel in meters per second
10 | ///
11 | public float SpeedLeft { get; private set; }
12 |
13 | ///
14 | /// Speed of the right wheel in meters per second
15 | ///
16 | public float SpeedRight { get; private set; }
17 |
18 | public WheelSpeedResponse(float speedLeft, float speedRight)
19 | {
20 | SpeedLeft = speedLeft;
21 | SpeedRight = speedRight;
22 | }
23 |
24 | public AlphabotResponseType GetResponseType()
25 | {
26 | return AlphabotResponseType.WheelSpeed;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Test.Tcp.Client/AlphabotClientLibrary.Test.Tcp.Client.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net5.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Test.Tcp.Server/AlphabotClientLibrary.Test.Tcp.Server.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net5.0
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/clients/AlphabotClientLibrary/AlphabotClientLibrary.Test/AlphabotClientLibrary.Test.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net5.0
5 |
6 |
7 |
8 |
9 |
10 |
11 | all
12 | runtime; build; native; contentfiles; analyzers; buildtransitive
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/clients/AlphabotTcpClient/AlphabotTcpClient.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.1585
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlphabotTcpClient", "AlphabotTcpClient\AlphabotTcpClient.csproj", "{12BB98BE-E4EB-4753-9260-381932C41BE8}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {12BB98BE-E4EB-4753-9260-381932C41BE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {12BB98BE-E4EB-4753-9260-381932C41BE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {12BB98BE-E4EB-4753-9260-381932C41BE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {12BB98BE-E4EB-4753-9260-381932C41BE8}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {DBB548B8-EE67-4E06-931E-A7DDEC14FA4B}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/clients/AlphabotTcpClient/AlphabotTcpClient/AlphabotTcpClient.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp2.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/clients/AlphabotTcpClient/AlphabotTcpClient/SocketWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net.Sockets;
3 | using System.Text;
4 |
5 | namespace AlphabotTcpClient
6 | {
7 | ///
8 | /// Send messages to a socket.
9 | ///
10 | class SocketWriter
11 | {
12 | private Socket _clientSocket;
13 |
14 | public SocketWriter(Socket clientSocket)
15 | {
16 | _clientSocket = clientSocket ?? throw new ArgumentNullException("clientSocket must not be null");
17 | }
18 |
19 | ///
20 | /// Send the given bytes to the socket.
21 | ///
22 | /// bytes to send to the client
23 | public void WriteBytes(byte[] msg)
24 | {
25 | _clientSocket.Send(msg);
26 | }
27 |
28 | ///
29 | /// Send the given text string to the socket.
30 | ///
31 | /// text string to send to the client
32 | public void WriteString(string msg)
33 | {
34 | if (msg == null)
35 | throw new ArgumentNullException("msg must not be null");
36 |
37 | byte[] message = Encoding.ASCII.GetBytes(msg);
38 | _clientSocket.Send(message);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/clients/WPFClient/AlphabotWPFClient/AlphabotWPFClient.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.1022
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlphabotWPFClient", "AlphabotWPFClient\AlphabotWPFClient.csproj", "{08783AF9-7832-48BF-9210-8D2D84754621}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {08783AF9-7832-48BF-9210-8D2D84754621}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {08783AF9-7832-48BF-9210-8D2D84754621}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {08783AF9-7832-48BF-9210-8D2D84754621}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {08783AF9-7832-48BF-9210-8D2D84754621}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {E09B4359-78BD-4B20-84C6-38E883A294C4}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/clients/WPFClient/AlphabotWPFClient/AlphabotWPFClient/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/clients/WPFClient/AlphabotWPFClient/AlphabotWPFClient/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/clients/WPFClient/AlphabotWPFClient/AlphabotWPFClient/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace AlphabotWPFClient
10 | {
11 | ///
12 | /// Interaktionslogik für "App.xaml"
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/clients/WPFClient/AlphabotWPFClient/AlphabotWPFClient/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace AlphabotWPFClient.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default {
23 | get {
24 | return defaultInstance;
25 | }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/clients/WPFClient/AlphabotWPFClient/AlphabotWPFClient/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.App;
3 | using Android.Content.PM;
4 | using Android.Runtime;
5 | using Android.OS;
6 |
7 | namespace AlphabotXamarinClient.Android
8 | {
9 | [Activity(Label = "AlphabotXamarinClient", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize )]
10 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
11 | {
12 | protected override void OnCreate(Bundle savedInstanceState)
13 | {
14 | base.OnCreate(savedInstanceState);
15 |
16 | Xamarin.Essentials.Platform.Init(this, savedInstanceState);
17 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
18 | LoadApplication(new App());
19 | }
20 |
21 | public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults)
22 | {
23 | Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
24 |
25 | base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("AlphabotXamarinClient.Android")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("AlphabotXamarinClient.Android")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | [assembly: AssemblyVersion("1.0.0.0")]
26 | [assembly: AssemblyFileVersion("1.0.0.0")]
27 |
28 | // Add some common permissions, these can be removed if not needed
29 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
30 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
31 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-anydpi-v26/icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-anydpi-v26/icon_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-hdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-hdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-mdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-mdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xhdpi/icon.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xxhdpi/icon.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #3F51B5
5 | #303F9F
6 | #FF4081
7 |
8 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.Android/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
19 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/LargeTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/LargeTile.scale-100.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/LargeTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/LargeTile.scale-200.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/LargeTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/LargeTile.scale-400.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SmallTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SmallTile.scale-100.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SmallTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SmallTile.scale-200.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SmallTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SmallTile.scale-400.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.targetsize-16.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.targetsize-256.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Square44x44Logo.targetsize-48.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/StoreLogo.backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/StoreLogo.backup.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/StoreLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/StoreLogo.scale-200.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/StoreLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/StoreLogo.scale-400.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/clients/XamarinClient/AlphabotXamarinClient.UWP/Assets/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | namespace AlphabotXamarinClient.UWP
17 | {
18 | public sealed partial class MainPage
19 | {
20 | public MainPage()
21 | {
22 | this.InitializeComponent();
23 |
24 | LoadApplication(new AlphabotXamarinClient.App());
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("AlphabotXamarinClient.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("AlphabotXamarinClient.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
30 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient.UWP/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient/AlphabotXamarinClient.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | true
6 |
7 |
8 |
9 | portable
10 | true
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | ..\..\AlphabotClientLibrary\AlphabotClientLibrary.Core.Tcp\bin\Release\netstandard2.0\AlphabotClientLibrary.Core.dll
21 |
22 |
23 | ..\..\AlphabotClientLibrary\AlphabotClientLibrary.Core.Tcp\bin\Release\netstandard2.0\AlphabotClientLibrary.Core.Tcp.dll
24 |
25 |
26 | ..\..\AlphabotClientLibrary\AlphabotClientLibrary.Core.Tcp\bin\Release\netstandard2.0\AlphabotClientLibrary.Shared.dll
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Xaml;
4 |
5 | namespace AlphabotXamarinClient
6 | {
7 | public partial class App : Application
8 | {
9 | public App()
10 | {
11 | InitializeComponent();
12 |
13 | MainPage = new MainPage();
14 | }
15 |
16 | protected override void OnStart()
17 | {
18 | }
19 |
20 | protected override void OnSleep()
21 | {
22 | }
23 |
24 | protected override void OnResume()
25 | {
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms.Xaml;
2 |
3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
4 |
--------------------------------------------------------------------------------
/clients/XamarinClient/AlphabotXamarinClient/Gyro/DirectionChangedEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Essentials;
3 |
4 | namespace AlphabotXamarinClient
5 | {
6 | public class DirectionChangedEventArgs : EventArgs
7 | {
8 | public GyroDirection Direction { get; set; }
9 | public GyroscopeData Data { get; set; }
10 |
11 | public DirectionChangedEventArgs(GyroDirection dir, GyroscopeData data)
12 | {
13 | Direction = dir;
14 | Data = data;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/docs/alphabot_client.md:
--------------------------------------------------------------------------------
1 | # Connecting to Alphabot with a client
2 |
3 | ## WiFi
4 |
5 | Make sure that your client runs in the same network as the Alphabot.
6 |
7 | ### AlphabotTcpClient
8 |
9 | ```console
10 | dotnet clients/AlphabotTcpClient/AlphabotTcpClient/bin/Release/netcoreapp2.1/AlphabotTcpClient.dll alphabot 9000
11 | ```
12 |
13 | ### Netcat
14 |
15 | ```console
16 | nc alphabot 9000
17 | ```
18 |
19 | ## Bluetooth Low Energy
20 |
21 | ### AlphabotAndroidClient
22 |
23 | To open the project in Android Studio, click **File > New > Import Project** and select the AlphabotAndroidClient project folder.
24 |
25 | ### WPFClient
26 |
--------------------------------------------------------------------------------
/docs/alphabot_rpi_software.md:
--------------------------------------------------------------------------------
1 | # Building the software for the Raspberry Pi variation of the Alphabot
2 |
3 | ## Prerequisites
4 |
5 | Make sure that you have at least 3GB of free storage space.
6 |
7 | Make sure that you have installed the following prerequisites:
8 |
9 | * Docker - [Docker Engine Install Instructions](https://docs.docker.com/engine/install/)
10 | * parted
11 |
12 | Debian:
13 |
14 | ```console
15 | sudo apt-get install parted
16 | ```
17 |
18 | Arch Linux:
19 |
20 | ```console
21 | sudo pacman -Sy parted
22 | ```
23 |
24 | Fedora:
25 |
26 | ```console
27 | sudo yum install parted
28 | ```
29 |
30 | * kpartx
31 |
32 | Debian:
33 |
34 | ```console
35 | sudo apt install kpartx
36 | ```
37 |
38 | Arch Linux:
39 |
40 | ```console
41 | sudo pacman -Sy multipath-tools
42 | ```
43 |
44 | Fedora:
45 |
46 | ```console
47 | sudo yum install kpartx
48 | ```
49 |
50 | ## Build Image
51 |
52 | ```console
53 | sudo rpi/sd_image/build.sh
54 | ```
55 |
56 | ## Running on real hardware
57 |
58 | Flash rpi/sd_image/raspi_alphabot.img onto an SD card with a size of at least 1GiB. Plug the flashed SD card into your Raspberry Pi 3B/3B+/4B.
59 |
--------------------------------------------------------------------------------
/docs/images/alphabot_assembled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/alphabot_assembled.png
--------------------------------------------------------------------------------
/docs/images/alphabot_esp32_pcb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/alphabot_esp32_pcb.jpg
--------------------------------------------------------------------------------
/docs/images/alphabot_esp32_pcb_12v_power.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/alphabot_esp32_pcb_12v_power.png
--------------------------------------------------------------------------------
/docs/images/alphabot_esp32_pcb_assembly_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/alphabot_esp32_pcb_assembly_1.png
--------------------------------------------------------------------------------
/docs/images/alphabot_esp32_pcb_assembly_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/alphabot_esp32_pcb_assembly_2.png
--------------------------------------------------------------------------------
/docs/images/alphabot_esp32_pcb_assembly_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/alphabot_esp32_pcb_assembly_3.png
--------------------------------------------------------------------------------
/docs/images/alphabot_esp32_pcb_assembly_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/alphabot_esp32_pcb_assembly_4.png
--------------------------------------------------------------------------------
/docs/images/alphabot_esp32_pcb_connect_l298n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/alphabot_esp32_pcb_connect_l298n.png
--------------------------------------------------------------------------------
/docs/images/alphabot_turn_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/alphabot_turn_on.png
--------------------------------------------------------------------------------
/docs/images/android_add_obstacle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/android_add_obstacle.png
--------------------------------------------------------------------------------
/docs/images/android_connect_via_ble.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/android_connect_via_ble.png
--------------------------------------------------------------------------------
/docs/images/android_local_speedometer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/android_local_speedometer.png
--------------------------------------------------------------------------------
/docs/images/android_log_obstacle_dist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/android_log_obstacle_dist.png
--------------------------------------------------------------------------------
/docs/images/android_log_pathfinding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/android_log_pathfinding.png
--------------------------------------------------------------------------------
/docs/images/android_log_position.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/android_log_position.png
--------------------------------------------------------------------------------
/docs/images/android_map_with_obstacle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/android_map_with_obstacle.png
--------------------------------------------------------------------------------
/docs/images/android_positioning_setup_dialog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/android_positioning_setup_dialog.png
--------------------------------------------------------------------------------
/docs/images/android_select_obstacle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/android_select_obstacle.png
--------------------------------------------------------------------------------
/docs/images/android_wheel_speedometers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/android_wheel_speedometers.png
--------------------------------------------------------------------------------
/docs/images/attach_alphabot_esp32_pcb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_alphabot_esp32_pcb.png
--------------------------------------------------------------------------------
/docs/images/attach_front_wheel_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_front_wheel_1.png
--------------------------------------------------------------------------------
/docs/images/attach_front_wheel_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_front_wheel_2.png
--------------------------------------------------------------------------------
/docs/images/attach_front_wheel_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_front_wheel_3.png
--------------------------------------------------------------------------------
/docs/images/attach_front_wheel_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_front_wheel_4.png
--------------------------------------------------------------------------------
/docs/images/attach_rear_wheel_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_rear_wheel_1.png
--------------------------------------------------------------------------------
/docs/images/attach_rear_wheel_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_rear_wheel_2.png
--------------------------------------------------------------------------------
/docs/images/attach_rear_wheel_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_rear_wheel_3.png
--------------------------------------------------------------------------------
/docs/images/attach_rear_wheel_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_rear_wheel_4.png
--------------------------------------------------------------------------------
/docs/images/attach_rear_wheel_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_rear_wheel_5.png
--------------------------------------------------------------------------------
/docs/images/attach_rear_wheel_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_rear_wheel_6.png
--------------------------------------------------------------------------------
/docs/images/attach_steering_stepper_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_steering_stepper_1.png
--------------------------------------------------------------------------------
/docs/images/attach_steering_stepper_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_steering_stepper_2.png
--------------------------------------------------------------------------------
/docs/images/attach_tf-luna_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_tf-luna_1.png
--------------------------------------------------------------------------------
/docs/images/attach_tf-luna_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/attach_tf-luna_2.jpg
--------------------------------------------------------------------------------
/docs/images/base_plate_insert_gear_motors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/base_plate_insert_gear_motors.png
--------------------------------------------------------------------------------
/docs/images/base_plate_steering_bracket_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/base_plate_steering_bracket_1.png
--------------------------------------------------------------------------------
/docs/images/base_plate_steering_bracket_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/base_plate_steering_bracket_2.png
--------------------------------------------------------------------------------
/docs/images/battery_case.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/battery_case.jpg
--------------------------------------------------------------------------------
/docs/images/connect_fc-03_sensors_to_alphabot_esp32_pcb_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/connect_fc-03_sensors_to_alphabot_esp32_pcb_1.jpg
--------------------------------------------------------------------------------
/docs/images/connect_fc-03_sensors_to_alphabot_esp32_pcb_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/connect_fc-03_sensors_to_alphabot_esp32_pcb_2.png
--------------------------------------------------------------------------------
/docs/images/connect_front_stepper_motor_to_alphabot_esp32_pcb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/connect_front_stepper_motor_to_alphabot_esp32_pcb.png
--------------------------------------------------------------------------------
/docs/images/connect_positioning_tag_to_alphabot_esp32_pcb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/connect_positioning_tag_to_alphabot_esp32_pcb.png
--------------------------------------------------------------------------------
/docs/images/connect_steering_stepper_to_alphabot_esp32_pcb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/connect_steering_stepper_to_alphabot_esp32_pcb.png
--------------------------------------------------------------------------------
/docs/images/connect_tf-luna_to_alphabot_esp32_pcb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/connect_tf-luna_to_alphabot_esp32_pcb.png
--------------------------------------------------------------------------------
/docs/images/fc-03_infrared_sensor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/fc-03_infrared_sensor.jpg
--------------------------------------------------------------------------------
/docs/images/front_bumper_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/front_bumper_1.png
--------------------------------------------------------------------------------
/docs/images/front_bumper_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/front_bumper_2.png
--------------------------------------------------------------------------------
/docs/images/gear_motor_solder_wires.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/gear_motor_solder_wires.jpg
--------------------------------------------------------------------------------
/docs/images/hex_spacers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/hex_spacers.png
--------------------------------------------------------------------------------
/docs/images/insert_positioning_tag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/insert_positioning_tag.png
--------------------------------------------------------------------------------
/docs/images/insert_wheel_encoder_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/insert_wheel_encoder_1.png
--------------------------------------------------------------------------------
/docs/images/insert_wheel_encoder_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/insert_wheel_encoder_2.png
--------------------------------------------------------------------------------
/docs/images/l298n_motor_driver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/l298n_motor_driver.png
--------------------------------------------------------------------------------
/docs/images/positioning_anchor_address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_anchor_address.png
--------------------------------------------------------------------------------
/docs/images/positioning_anchor_mounted.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_anchor_mounted.jpg
--------------------------------------------------------------------------------
/docs/images/positioning_anchor_serial_output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_anchor_serial_output.png
--------------------------------------------------------------------------------
/docs/images/positioning_anchor_with_holder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_anchor_with_holder.png
--------------------------------------------------------------------------------
/docs/images/positioning_anchors_bad_placement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_anchors_bad_placement.png
--------------------------------------------------------------------------------
/docs/images/positioning_anchors_coordinates.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_anchors_coordinates.png
--------------------------------------------------------------------------------
/docs/images/positioning_anchors_good_placement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_anchors_good_placement.png
--------------------------------------------------------------------------------
/docs/images/positioning_module_assembly_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_module_assembly_1.png
--------------------------------------------------------------------------------
/docs/images/positioning_module_assembly_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_module_assembly_2.png
--------------------------------------------------------------------------------
/docs/images/positioning_module_assembly_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_module_assembly_3.png
--------------------------------------------------------------------------------
/docs/images/positioning_modules_label.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_modules_label.jpg
--------------------------------------------------------------------------------
/docs/images/positioning_tag_screw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_tag_screw.png
--------------------------------------------------------------------------------
/docs/images/positioning_tag_serial_output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/positioning_tag_serial_output.png
--------------------------------------------------------------------------------
/docs/images/rear_wheel_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/rear_wheel_1.png
--------------------------------------------------------------------------------
/docs/images/rear_wheel_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/rear_wheel_2.png
--------------------------------------------------------------------------------
/docs/images/rear_wheels_attached.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/rear_wheels_attached.png
--------------------------------------------------------------------------------
/docs/images/rocker_switch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/rocker_switch.png
--------------------------------------------------------------------------------
/docs/images/screw_steering_bracket_to_front_bumper_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/screw_steering_bracket_to_front_bumper_1.png
--------------------------------------------------------------------------------
/docs/images/screw_steering_bracket_to_front_bumper_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/screw_steering_bracket_to_front_bumper_2.png
--------------------------------------------------------------------------------
/docs/images/steering_axle_and_suspensions_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/steering_axle_and_suspensions_1.png
--------------------------------------------------------------------------------
/docs/images/steering_axle_and_suspensions_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/steering_axle_and_suspensions_2.png
--------------------------------------------------------------------------------
/docs/images/steering_axle_and_suspensions_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/steering_axle_and_suspensions_3.png
--------------------------------------------------------------------------------
/docs/images/steering_axle_insert_ball_bearings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/steering_axle_insert_ball_bearings.png
--------------------------------------------------------------------------------
/docs/images/steering_bracket_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/steering_bracket_1.png
--------------------------------------------------------------------------------
/docs/images/steering_bracket_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/steering_bracket_2.png
--------------------------------------------------------------------------------
/docs/images/steering_extension.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/steering_extension.png
--------------------------------------------------------------------------------
/docs/images/tag_holder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/tag_holder.png
--------------------------------------------------------------------------------
/docs/images/usb_to_ttl_adapter.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/usb_to_ttl_adapter.jpg
--------------------------------------------------------------------------------
/docs/images/vscode_platformio_install.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/vscode_platformio_install.png
--------------------------------------------------------------------------------
/docs/images/vscode_platformio_serial_monitor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/vscode_platformio_serial_monitor.png
--------------------------------------------------------------------------------
/docs/images/vscode_platformio_upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/vscode_platformio_upload.png
--------------------------------------------------------------------------------
/docs/images/wing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/docs/images/wing.png
--------------------------------------------------------------------------------
/emulator_devices/HCSR04.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | from threading import Timer, current_thread
4 | from datetime import datetime
5 |
6 | class HCSR04:
7 | distance = 100
8 | pinTrig_state = False
9 | pinEcho_state = False
10 |
11 | def __init__(self, pinTrig, pinEcho, pinEchoHandler):
12 | self.pinTrig = pinTrig
13 | self.pinEcho = pinEcho
14 | self.pinEchoHandler = pinEchoHandler
15 |
16 | def updatePin(self, pin, state):
17 | if pin != self.pinTrig:
18 | return
19 |
20 | self.pinTrig_state = state
21 |
22 | if state == True and self.pinEcho_state == False:
23 | self.pinEcho_state = True
24 | self.pinEchoHandler(True)
25 | timer = Timer(self.distance / 34300.0, self.__echo)
26 | timer.start()
27 |
28 | def __echo(self):
29 | self.pinEcho_state = False
30 | self.pinEchoHandler(False)
31 |
--------------------------------------------------------------------------------
/emulator_tests/basic_steering_test.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import socket
4 | import time
5 |
6 | sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
7 | sock.connect(("127.0.0.1", 9000))
8 |
9 | # Wait for potential initialization and calibration
10 | time.sleep(7.5)
11 |
12 | # Steer to the left
13 | sock.sendall(bytearray([0x01, 0x00, 0xE7]))
14 | time.sleep(20)
15 | assert round(steer_direction_angle) == -10, "Expected steering angle 10 when steering to the left, got " + str(steer_direction_angle)
16 |
17 | # Steer to the right
18 | sock.sendall(bytearray([0x01, 0x00, 0x19]))
19 | time.sleep(5)
20 | assert round(steer_direction_angle) == 10, "Expected steering angle -10 when steering to the right, got " + str(steer_direction_angle)
21 |
22 | # Center steering
23 | sock.sendall(bytearray([0x01, 0x00, 0x00]))
24 | time.sleep(2.5)
25 | assert round(steer_direction_angle) == 0, "Expected steering angle 0 when steering to the center, got " + str(steer_direction_angle)
26 |
--------------------------------------------------------------------------------
/esp32/.gitignore:
--------------------------------------------------------------------------------
1 | .pio
2 | .vscode/.browse.c_cpp.db*
3 | .vscode/c_cpp_properties.json
4 | .vscode/launch.json
5 | .vscode/ipch
6 |
--------------------------------------------------------------------------------
/esp32/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "platformio.platformio-ide"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/esp32/alphabot/BLECharacteristicSender.h:
--------------------------------------------------------------------------------
1 | #ifndef BLECHARACTERISTICSENDER_H
2 | #define BLECHARACTERISTICSENDER_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | struct DataToSend {
9 | uint8_t len;
10 | uint8_t data[20];
11 | };
12 |
13 | class BLECharacteristicSender {
14 | private:
15 | BLECharacteristic* characteristic;
16 | void (*valueArrived)();
17 | TaskHandle_t sendTask;
18 | std::queue toSendQueue;
19 | struct DataToSend* currentlySending;
20 | SemaphoreHandle_t currentlySendingMutex;
21 |
22 | void sendCharacteristicTask();
23 |
24 | public:
25 | void sendValue(const uint8_t* data, uint8_t len);
26 | void stateChanged(BLECharacteristicCallbacks::Status s, uint32_t code);
27 |
28 | BLECharacteristicSender(BLECharacteristic* characteristic, void (*valueArrived)());
29 | ~BLECharacteristicSender();
30 | };
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/esp32/alphabot/Compass.h:
--------------------------------------------------------------------------------
1 | #ifndef COMPASS_H
2 | #define COMPASS_H
3 |
4 | #include
5 | #include "MotionTracker.h"
6 |
7 | class Compass {
8 | private:
9 | MotionTracker* motion_tracker;
10 | float min_x = -1000.0;
11 | float max_x = 1000.0;
12 | float min_y = -1000.0;
13 | float max_y = 1000.0;
14 | float min_z = -1000.0;
15 | float max_z = 1000.0;
16 | bool min_max_set = false;
17 | float angle_offset = 0.0;
18 | float dir = 0.0;
19 | float avg_diff_quat6_mag = 0.0;
20 |
21 | public:
22 | float getRawDirection();
23 | void setMagnetSensorCalibratedValues(float min_x, float max_x, float min_y, float max_y, float min_z, float max_z);
24 | void magnetSensorCalibrate();
25 | void beginMagnetSensorCalibration();
26 | void finishMagnetSensorCalibration();
27 | float getMinX() const;
28 | float getMaxX() const;
29 | float getMinY() const;
30 | float getMaxY() const;
31 | float getMinZ() const;
32 | float getMaxZ() const;
33 | void setAngleOffset(float offset);
34 | float getAngleOffset() const;
35 | float getDirection();
36 |
37 | Compass(MotionTracker* motion_tracker);
38 | };
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/esp32/alphabot/DrivingAssistent.h:
--------------------------------------------------------------------------------
1 | #ifndef DRIVINGASSISTENT_H
2 | #define DRIVINGASSISTENT_H
3 |
4 | #include
5 |
6 | #define MIN_DIST_TO_OBSTACLE 20
7 | #define FULL_SPEED_ROLL 40
8 |
9 | class DrivingAssistent {
10 | private:
11 | uint16_t dist_front;
12 | uint16_t dist_left;
13 | uint16_t dist_right;
14 | uint16_t dist_back;
15 | int8_t speed;
16 | int8_t steer;
17 | int8_t shieb_back;
18 |
19 | public:
20 | void updateDistances(uint16_t front, uint16_t left, uint16_t right, uint16_t back);
21 | void updateDistanceFront(uint16_t front);
22 | void updateDistanceLeft(uint16_t left);
23 | void updateDistanceRight(uint16_t right);
24 | void updateDistanceBack(uint16_t back);
25 | void updateSpeedAndSteer(int8_t spd, int8_t steer);
26 | void computeNextStep(int8_t* spd, int8_t* steer);
27 | int8_t safeSpeedForward(int8_t speed) const;
28 | int8_t safeSpeedBackward(int8_t speed) const;
29 |
30 | DrivingAssistent();
31 | };
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/esp32/alphabot/MotionTracker.h:
--------------------------------------------------------------------------------
1 | #ifndef MOTION_TRACKER_H
2 | #define MOTION_TRACKER_H
3 |
4 | #include
5 |
6 | class MotionTracker {
7 | private:
8 | ArduinoICM20948 icm20948;
9 | float accX;
10 | float accY;
11 | float accZ;
12 | float linAccX;
13 | float linAccY;
14 | float linAccZ;
15 | float gyrX;
16 | float gyrY;
17 | float gyrZ;
18 | float uncalMagX;
19 | float uncalMagY;
20 | float uncalMagZ;
21 | float magX;
22 | float magY;
23 | float magZ;
24 | float roll6;
25 | float pitch6;
26 | float yaw6;
27 | float roll9;
28 | float pitch9;
29 | float yaw9;
30 |
31 | public:
32 | void fetchData();
33 | float getRoll6() const;
34 | float getPitch6() const;
35 | float getYaw6() const;
36 | float getRoll9() const;
37 | float getPitch9() const;
38 | float getYaw9() const;
39 | float getAccX() const;
40 | float getAccY() const;
41 | float getAccZ() const;
42 | float getLinAccX() const;
43 | float getLinAccY() const;
44 | float getLinAccZ() const;
45 | float getGyrX() const;
46 | float getGyrY() const;
47 | float getGyrZ() const;
48 | float getUncalMagX() const;
49 | float getUncalMagY() const;
50 | float getUncalMagZ() const;
51 | float getMagX() const;
52 | float getMagY() const;
53 | float getMagZ() const;
54 |
55 | MotionTracker(bool enable_gyro, bool enable_acc, bool enable_uncal_mag, bool enable_mag, bool enable_linAcc, bool enable_quat6, bool enable_quat9);
56 | };
57 |
58 | #endif
59 |
--------------------------------------------------------------------------------
/esp32/alphabot/Motor.cpp:
--------------------------------------------------------------------------------
1 | #include "Motor.h"
2 | #include "pinconfig.h"
3 | #include "motorconfig.h"
4 |
5 | void Motor::stop() {
6 | ledcWrite(pwm_channel, 0);
7 | }
8 |
9 | void Motor::setSpeed(uint8_t val) {
10 | uint16_t balancing_percentage = 256 + MOTOR_MINIMUM_DUTY_CYCLE;
11 | uint16_t speed = min(MOTOR_MINIMUM_DUTY_CYCLE + ((uint16_t)val * 256) / balancing_percentage, 255);
12 | ledcWrite(pwm_channel, speed);
13 | }
14 |
15 | void Motor::forward() {
16 | digitalWrite(pin_backward, LOW);
17 | digitalWrite(pin_forward, HIGH);
18 | }
19 |
20 | void Motor::backward() {
21 | digitalWrite(pin_backward, HIGH);
22 | digitalWrite(pin_forward, LOW);
23 | }
24 |
25 | Motor::Motor(uint8_t pin_forward, uint8_t pin_backward, uint8_t pin_speed, uint8_t pwm_channel) {
26 | this->pin_forward = pin_forward;
27 | this->pin_backward = pin_backward;
28 | this->pin_speed = pin_speed;
29 | this->pwm_channel = pwm_channel;
30 |
31 | ledcSetup(pwm_channel, PWM_FREQ, PWM_RESOLUTION);
32 | ledcAttachPin(pin_speed, pwm_channel);
33 | pinMode(pin_forward, OUTPUT);
34 | pinMode(pin_backward, OUTPUT);
35 | }
36 |
--------------------------------------------------------------------------------
/esp32/alphabot/Motor.h:
--------------------------------------------------------------------------------
1 | #ifndef MOTOR_H
2 | #define MOTOR_H
3 |
4 | #include
5 |
6 | class Motor {
7 | private:
8 | uint8_t pin_forward;
9 | uint8_t pin_backward;
10 | uint8_t pin_speed;
11 | uint8_t pwm_channel;
12 |
13 | public:
14 | void stop();
15 | void setSpeed(uint8_t val);
16 | void forward();
17 | void backward();
18 |
19 | Motor(uint8_t pin_forward, uint8_t pin_backward, uint8_t pin_speed, uint8_t pwm_channel);
20 | };
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/esp32/alphabot/Navigator.h:
--------------------------------------------------------------------------------
1 | #ifndef NAVIGATOR_H
2 | #define NAVIGATOR_H
3 |
4 | #include "Pathfinder.h"
5 | #include "TwoMotorDrive.h"
6 |
7 | class Navigator {
8 | private:
9 | float pos_x;
10 | float pos_y;
11 | bool has_target;
12 | float target_x;
13 | float target_y;
14 | Pathfinder* pathfinder;
15 | TwoMotorDrive* two_motor_drive;
16 |
17 | public:
18 | void setOwnPosition(float x, float y);
19 | void setTarget(float x, float y);
20 | bool hasTarget() const;
21 | void clearObstacles();
22 | void addObstacle(float x, float y, float width, float height, uint16_t id);
23 | void removeObstacleById(uint16_t id);
24 | void removeObstacleByPosition(float x, float y);
25 | std::list getObstacles();
26 | void navigateStep(float dir, std::list& path);
27 |
28 | Navigator(TwoMotorDrive* two_motor_drive);
29 | ~Navigator();
30 | };
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/esp32/alphabot/PositioningKalmanFilter.h:
--------------------------------------------------------------------------------
1 | #ifndef POSITIONING_KALMAN_FILTER_H
2 | #define POSITIONING_KALMAN_FILTER_H
3 |
4 | // State Vector
5 | // This tracks the pose states in a 9-element vector.
6 | // The states are:
7 | //
8 | // States Units Index
9 | // Position (XY) m 0:1
10 | // Velocity (XY) m/s 2:3
11 | // Acceleration (XY) m/s^2 4:5
12 | //
13 | // Ground truth is used to help initialize the filter states, so the filter
14 | // converges to good answers quickly.
15 |
16 | union state {
17 | double State[6];
18 | struct {
19 | double position[2];
20 | double velocity[2];
21 | double acceleration[2];
22 | };
23 | };
24 |
25 | class PositioningKalmanFilter {
26 | private:
27 | double StateCovariance[6 * 6];
28 | double PositionNoise[2];
29 | double VelocityNoise[2];
30 | double AccelerationNoise[2];
31 |
32 | public:
33 | union state State;
34 |
35 | void setPositionNoise(const double val[2]);
36 | void setVelocityNoise(const double val[2]);
37 | void setAccelerationNoise(const double val[2]);
38 | void setStateCovariance(const double val[6 * 6]);
39 | void predict(double dt);
40 | void fusegps(const double rawPos[2], double posCov, const double vel[2], double velCov);
41 | void fusevel(const double vel[2], double velCov);
42 | void pose(double pos[2]) const;
43 |
44 | PositioningKalmanFilter();
45 | };
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/esp32/alphabot/PositioningSystem.h:
--------------------------------------------------------------------------------
1 | #ifndef POSITIONINGSYSTEM_H
2 | #define POSITIONINGSYSTEM_H
3 |
4 | #include
5 |
6 | class PositioningSystem {
7 | private:
8 | uint16_t anc1_short_address;
9 | uint16_t anc2_short_address;
10 | uint16_t anc3_short_address;
11 | char serial2_buffer[256] = {0};
12 | uint8_t serial2_buffer_position = 0;
13 | float anc1_x;
14 | float anc1_y;
15 | float anc2_x;
16 | float anc2_y;
17 | float anc3_x;
18 | float anc3_y;
19 | float last_anc_ranges[3];
20 |
21 | public:
22 | bool readDistances(float* anc1_dist, float* anc2_dist, float* anc3_dist);
23 | void setAnchorPositions(float anc1_x, float anc1_y, float anc2_x, float anc2_y, float anc3_x, float anc3_y);
24 | void calculatePosition(float anc1_dist, float anc2_dist, float anc3_dist, float* x, float* y);
25 | float getAnc1X() const;
26 | float getAnc1Y() const;
27 | float getAnc2X() const;
28 | float getAnc2Y() const;
29 | float getAnc3X() const;
30 | float getAnc3Y() const;
31 |
32 | PositioningSystem(uint16_t anc1_short_address, uint16_t anc2_short_address, uint16_t anc3_short_address);
33 | };
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/esp32/alphabot/SaveFile.h:
--------------------------------------------------------------------------------
1 | #ifndef SAVEFILE_H
2 | #define SAVEFILE_H
3 |
4 | #include
5 |
6 | class SaveFile {
7 | private:
8 | bool spiffs_mounted = false;
9 | float magnetSensorCalibratedMinX = -1000;
10 | float magnetSensorCalibratedMaxX = 1000;
11 | float magnetSensorCalibratedMinY = -1000;
12 | float magnetSensorCalibratedMaxY = 1000;
13 | float magnetSensorCalibratedMinZ = -1000;
14 | float magnetSensorCalibratedMaxZ = 1000;
15 | float compassAngleOffset = 0.0;
16 |
17 | void read();
18 |
19 | public:
20 | float getMagnetSensorCalibratedMinX() const;
21 | float getMagnetSensorCalibratedMaxX() const;
22 | float getMagnetSensorCalibratedMinY() const;
23 | float getMagnetSensorCalibratedMaxY() const;
24 | float getMagnetSensorCalibratedMinZ() const;
25 | float getMagnetSensorCalibratedMaxZ() const;
26 | float getCompassAngleOffset() const;
27 | void setMagnetSensorCalibratedMinX(float min_x);
28 | void setMagnetSensorCalibratedMaxX(float max_x);
29 | void setMagnetSensorCalibratedMinY(float min_y);
30 | void setMagnetSensorCalibratedMaxY(float max_y);
31 | void setMagnetSensorCalibratedMinZ(float min_z);
32 | void setMagnetSensorCalibratedMaxZ(float max_z);
33 | void setCompassAngleOffset(float angleOffset);
34 | void write();
35 |
36 | SaveFile();
37 | };
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/esp32/alphabot/StepperMotor.h:
--------------------------------------------------------------------------------
1 | #ifndef STEPPERMOTOR_H
2 | #define STEPPERMOTOR_H
3 |
4 | #include
5 |
6 | class StepperMotor {
7 | private:
8 | uint8_t id;
9 | uint8_t pin_in1;
10 | uint8_t pin_in2;
11 | uint8_t pin_in3;
12 | uint8_t pin_in4;
13 | int16_t desired_direction;
14 |
15 | void startStepperTask();
16 |
17 | public:
18 | int16_t getCurrentDirection() const;
19 | int16_t getDesiredDirection() const;
20 | void turnTo(int16_t dir);
21 | void calibrate();
22 |
23 | StepperMotor(uint8_t pin_in1, uint8_t pin_in2, uint8_t pin_in3, uint8_t pin_in4, uint16_t calibration_steps);
24 | };
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/esp32/alphabot/TFLunaObstacleScanner.h:
--------------------------------------------------------------------------------
1 | #ifndef TFL_OBSTACLE_SCANNER_H
2 | #define TFL_OBSTACLE_SCANNER_H
3 |
4 | #include "StepperMotor.h"
5 | #include "TFLunaI2C.h"
6 |
7 | class TFLunaObstacleScanner {
8 | private:
9 | StepperMotor* stepperMotor;
10 | TFLunaI2C* tflunaI2C;
11 | uint16_t obstacle_distances[360];
12 | uint16_t stepperSideSteps;
13 | int16_t triggerDirection;
14 | unsigned long lastTrigger;
15 |
16 | public:
17 | int16_t scan();
18 | uint16_t getObstacleDistance(uint16_t angle);
19 |
20 | TFLunaObstacleScanner(StepperMotor* stepperMotor, TFLunaI2C* tflunaI2C, uint16_t stepperSideSteps);
21 | };
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/esp32/alphabot/TwoMotorDrive.h:
--------------------------------------------------------------------------------
1 | #ifndef TWOMOTORDRIVE_H
2 | #define TWOMOTORDRIVE_H
3 |
4 | #include "pinconfig.h"
5 | #include
6 | #include "Motor.h"
7 | #include "StepperMotor.h"
8 |
9 | class TwoMotorDrive {
10 | protected:
11 | Motor* motor_left;
12 | Motor* motor_right;
13 | StepperMotor* motor_steer;
14 | int8_t speed;
15 | int8_t steer_direction;
16 | int8_t left_speed;
17 | int8_t right_speed;
18 |
19 | public:
20 | void stop();
21 | void leftForward();
22 | void leftBackward();
23 | void rightForward();
24 | void rightBackward();
25 | void steer(int16_t dir);
26 | void updateMotors(int8_t x, int8_t y);
27 | int8_t getSpeed() const;
28 | int8_t getSteerDirection() const;
29 | int8_t getLeftSpeed() const;
30 | int8_t getRightSpeed() const;
31 |
32 | TwoMotorDrive(Motor* motor_left, Motor* motor_right, StepperMotor* motor_steer);
33 | };
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/esp32/alphabot/WheelEncoder.cpp:
--------------------------------------------------------------------------------
1 | #include "WheelEncoder.h"
2 | #include "config.h"
3 |
4 | #define PULSES_PER_TURN 12
5 |
6 | float WheelEncoder::getRotationsPerMinute() {
7 | uint32_t time_between_pulses_snapshot = time_between_pulses;
8 | uint32_t time_since_last_pulse = micros() - last_pulse_time;
9 | float rpm = -1.0;
10 |
11 | if (time_since_last_pulse > time_between_pulses_snapshot)
12 | rpm = 1.0 / ((PULSES_PER_TURN * time_since_last_pulse) / (60.0 * 1000000.0));
13 | else
14 | rpm = 1.0 / ((PULSES_PER_TURN * time_between_pulses_snapshot) / (60.0 * 1000000.0));
15 |
16 | return rpm;
17 | }
18 |
19 | /**
20 | * @brief Get the speed of the wheel in m/s.
21 | *
22 | * @return float the wheel speed in m/s
23 | */
24 | float WheelEncoder::getWheelSpeedMps() {
25 | return getRotationsPerMinute() * PI * WHEEL_DIAMETER_MM / 60000.0;
26 | }
27 |
28 | WheelEncoder::WheelEncoder(uint8_t pin_d0, void (*handleWheelEncoderInterrupt)()) {
29 | encoder_pin = pin_d0;
30 | pinMode(pin_d0, INPUT);
31 | attachInterrupt(pin_d0, handleWheelEncoderInterrupt, RISING);
32 | last_pulse_time = 0;
33 | time_between_pulses = UINT32_MAX;
34 | }
35 |
36 | WheelEncoder::~WheelEncoder() {
37 | detachInterrupt(encoder_pin);
38 | }
39 |
--------------------------------------------------------------------------------
/esp32/alphabot/WheelEncoder.h:
--------------------------------------------------------------------------------
1 | #ifndef WHEEL_ENCODER_H
2 | #define WHEEL_ENCODER_H
3 |
4 | #include
5 |
6 | class WheelEncoder {
7 | protected:
8 | uint8_t encoder_pin;
9 | volatile uint32_t last_pulse_time = 0;
10 | volatile uint32_t time_between_pulses = UINT32_MAX;
11 |
12 | public:
13 | float getRotationsPerMinute();
14 | float getWheelSpeedMps();
15 |
16 | WheelEncoder(uint8_t pin_d0, void (*handleWheelEncoderInterrupt)());
17 | ~WheelEncoder();
18 | };
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/esp32/alphabot/WheelEncoderLeft.cpp:
--------------------------------------------------------------------------------
1 | #include "WheelEncoderLeft.h"
2 | #include "pinconfig.h"
3 |
4 | static uint8_t* pencoder_pin;
5 | static volatile uint32_t debounce;
6 | static volatile uint32_t* plast_pulse_time;
7 | static volatile uint32_t* ptime_between_pulses;
8 |
9 | WheelEncoderLeft* WheelEncoderLeft::inst = nullptr;
10 |
11 | WheelEncoderLeft* WheelEncoderLeft::getInstance() {
12 | return (!inst) ? inst = new WheelEncoderLeft : inst;
13 | }
14 |
15 | static void IRAM_ATTR handleWheelEncoderInterrupt() {
16 | if(digitalRead(*pencoder_pin) && (micros() - debounce > 500)) {
17 | debounce = micros();
18 | *ptime_between_pulses = debounce - *plast_pulse_time;
19 | *plast_pulse_time = debounce;
20 | }
21 | }
22 |
23 | WheelEncoderLeft::WheelEncoderLeft(): WheelEncoder(LEFT_WHEEL_ENCODER_D0, handleWheelEncoderInterrupt) {
24 | pencoder_pin = &encoder_pin;
25 | debounce = 0;
26 | plast_pulse_time = &last_pulse_time;
27 | ptime_between_pulses = &time_between_pulses;
28 | }
29 |
--------------------------------------------------------------------------------
/esp32/alphabot/WheelEncoderLeft.h:
--------------------------------------------------------------------------------
1 | #ifndef WHEEL_ENCODER_LEFT_H
2 | #define WHEEL_ENCODER_LEFT_H
3 |
4 | #include "WheelEncoder.h"
5 |
6 | class WheelEncoderLeft: public WheelEncoder {
7 | private:
8 | static WheelEncoderLeft* inst;
9 |
10 | WheelEncoderLeft();
11 |
12 | public:
13 | static WheelEncoderLeft* getInstance();
14 | };
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/esp32/alphabot/WheelEncoderRight.cpp:
--------------------------------------------------------------------------------
1 | #include "WheelEncoderRight.h"
2 | #include "pinconfig.h"
3 |
4 | static uint8_t* pencoder_pin;
5 | static volatile uint32_t debounce;
6 | static volatile uint32_t* plast_pulse_time;
7 | static volatile uint32_t* ptime_between_pulses;
8 |
9 | WheelEncoderRight* WheelEncoderRight::inst = nullptr;
10 |
11 | WheelEncoderRight* WheelEncoderRight::getInstance() {
12 | return (!inst) ? inst = new WheelEncoderRight : inst;
13 | }
14 |
15 | static void IRAM_ATTR handleWheelEncoderInterrupt() {
16 | if(digitalRead(*pencoder_pin) && (micros() - debounce > 500)) {
17 | debounce = micros();
18 | *ptime_between_pulses = debounce - *plast_pulse_time;
19 | *plast_pulse_time = debounce;
20 | }
21 | }
22 |
23 | WheelEncoderRight::WheelEncoderRight(): WheelEncoder(RIGHT_WHEEL_ENCODER_D0, handleWheelEncoderInterrupt) {
24 | pencoder_pin = &encoder_pin;
25 | debounce = 0;
26 | plast_pulse_time = &last_pulse_time;
27 | ptime_between_pulses = &time_between_pulses;
28 | }
29 |
--------------------------------------------------------------------------------
/esp32/alphabot/WheelEncoderRight.h:
--------------------------------------------------------------------------------
1 | #ifndef WHEEL_ENCODER_RIGHT_H
2 | #define WHEEL_ENCODER_RIGHT_H
3 |
4 | #include "WheelEncoder.h"
5 |
6 | class WheelEncoderRight: public WheelEncoder {
7 | private:
8 | static WheelEncoderRight* inst;
9 |
10 | WheelEncoderRight();
11 |
12 | public:
13 | static WheelEncoderRight* getInstance();
14 | };
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/esp32/alphabot/motorconfig.h:
--------------------------------------------------------------------------------
1 | #ifndef MOTORCONFIG_H
2 | #define MOTORCONFIG_H
3 |
4 | #define MOTOR_MINIMUM_DUTY_CYCLE 32
5 |
6 | #endif
7 |
--------------------------------------------------------------------------------
/esp32/alphabot/pinconfig.h:
--------------------------------------------------------------------------------
1 | #ifndef PINCONFIG_H
2 | #define PINCONFIG_H
3 |
4 | #define MOTOR_LEFT_FORWARD 23
5 | #define MOTOR_LEFT_BACKWARD 19
6 | #define MOTOR_LEFT_SPEED 5
7 | #define MOTOR_LEFT_PWM_CHANNEL 0
8 | #define MOTOR_RIGHT_FORWARD 17
9 | #define MOTOR_RIGHT_BACKWARD 27
10 | #define MOTOR_RIGHT_SPEED 14
11 | #define MOTOR_RIGHT_PWM_CHANNEL 1
12 | #define PWM_FREQ 30000
13 | #define PWM_RESOLUTION 8
14 |
15 | #define STEPPER_STEER_IN1 4
16 | #define STEPPER_STEER_IN2 15
17 | #define STEPPER_STEER_IN3 25
18 | #define STEPPER_STEER_IN4 13
19 |
20 | #define STEPPER_FRONT_IN1 26
21 | #define STEPPER_FRONT_IN2 33
22 | #define STEPPER_FRONT_IN3 32
23 | #define STEPPER_FRONT_IN4 2
24 |
25 | #define I2C_SDA 21
26 | #define I2C_SCL 22
27 |
28 | #define SERIAL2_RX 16
29 |
30 | #define LEFT_WHEEL_ENCODER_D0 35
31 | #define RIGHT_WHEEL_ENCODER_D0 34
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Arduino_ICM20948_DMP_Full-Function",
3 | "description": "Arduino Library for ICM20948 using DMP for i2c and SPI",
4 | "repository":
5 | {
6 | "type": "git",
7 | "url": "https://github.com/isouriadakis/Arduino_ICM20948_DMP_Full-Function"
8 | },
9 | "frameworks": "arduino"
10 | }
11 |
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948Augmented.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948Augmented.c
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948Augmented.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948Augmented.h
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948AuxTransport.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948AuxTransport.c
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948AuxTransport.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948AuxTransport.h
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948DataBaseControl.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948DataBaseControl.c
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948DataBaseControl.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948DataBaseControl.h
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948DataBaseDriver.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948DataBaseDriver.c
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948DataBaseDriver.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948DataBaseDriver.h
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948DataConverter.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948DataConverter.c
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948DataConverter.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948DataConverter.h
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948Dmp3Driver.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948Dmp3Driver.c
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948Dmp3Driver.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948Dmp3Driver.h
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948LoadFirmware.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948LoadFirmware.c
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948LoadFirmware.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948LoadFirmware.h
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948MPUFifoControl.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948MPUFifoControl.h
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948SelfTest.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948SelfTest.c
--------------------------------------------------------------------------------
/esp32/lib/ICM20948/src/Icm20948SelfTest.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/esp32/lib/ICM20948/src/Icm20948SelfTest.h
--------------------------------------------------------------------------------
/esp32/platformio.ini:
--------------------------------------------------------------------------------
1 | ; PlatformIO Project Configuration File
2 | ;
3 | ; Build options: build flags, source filter
4 | ; Upload options: custom upload port, speed and extra flags
5 | ; Library options: dependencies, extra library storages
6 | ; Advanced options: extra scripting
7 | ;
8 | ; Please visit documentation for the other options and examples
9 | ; https://docs.platformio.org/page/projectconf.html
10 |
11 | [platformio]
12 | src_dir = alphabot
13 |
14 | [env:esp32dev]
15 | platform = espressif32@4.0.0
16 | board = esp32dev
17 | framework = arduino
18 | monitor_speed = 115200
19 | monitor_filters = esp32_exception_decoder
20 | board_build.f_cpu = 240000000L
21 | board_build.partitions = huge_app.csv
22 |
--------------------------------------------------------------------------------
/pcb/alphabot_esp32_pcb/AlphabotESP32PCB_BOM_PCBWay.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/pcb/alphabot_esp32_pcb/AlphabotESP32PCB_BOM_PCBWay.xlsx
--------------------------------------------------------------------------------
/pcb/alphabot_esp32_pcb/AlphabotESP32PCB_Gerber.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/pcb/alphabot_esp32_pcb/AlphabotESP32PCB_Gerber.zip
--------------------------------------------------------------------------------
/pcb/alphabot_esp32_pcb/centroid.csv:
--------------------------------------------------------------------------------
1 | RefDes;Layer;LocationX;LocationY;Rotation
2 | ICMU1;Top;58.800;26.290;0
3 | C4;Top;69.220;32.000;0
4 | C2;Top;69.220;28.830;0
5 | ICMC1;Top;65.660;27.560;90
6 | Q1;Top;49.780;28.830;0
7 | Q3;Top;42.670;26.160;0
8 | Q4;Top;37.850;27.430;90
9 | R1;Top;60.452;4.191;0
10 | R2;Top;64.389;4.191;0
11 | R5;Top;35.560;31.880;0
12 | R6;Top;34.670;27.690;90
13 | R7;Top;46.610;26.290;0
14 | R11;Top;37.850;22.860;90
15 | R9;Top;38.480;18.540;0
16 | R10;Top;64.260;21.590;90
17 | U1;Top;31.240;28.580;90
18 | C1;Top;18.542;37.338;0
19 | C3;Top;8.890;37.338;0
20 | U2;Top;15.875;16.129;0
21 | U4;Top;11.811;29.464;180
22 |
--------------------------------------------------------------------------------
/pcb/dwm1000_adapter/DecawaveProMiniAdapter_BOM_PCBWay.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/pcb/dwm1000_adapter/DecawaveProMiniAdapter_BOM_PCBWay.xlsx
--------------------------------------------------------------------------------
/pcb/dwm1000_adapter/DecawaveProMiniAdapter_Gerber.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/pcb/dwm1000_adapter/DecawaveProMiniAdapter_Gerber.zip
--------------------------------------------------------------------------------
/pcb/dwm1000_adapter/DecawaveProMiniAdapter_vector.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/pcb/dwm1000_adapter/DecawaveProMiniAdapter_vector.pdf
--------------------------------------------------------------------------------
/pcb/dwm1000_adapter/centroid.csv:
--------------------------------------------------------------------------------
1 | RefDes;Layer;LocationX;LocationY;Rotation
2 | U1;Top;12.475;26.350;0
3 | U2;Top;12.475;22.550;0
4 | U3;Top;12.475;18.750;0
5 | C1;Top;8.250;13.200;90
6 | C3;Top;15.550;13.200;90
7 | C2;Top;10.150;13.200;90
8 | C4;Top;17.450;13.200;90
9 | C5;Top;2.550;8.100;90
10 | R1;Top;2.700;33.200;0
11 | R2;Top;23.200;39.450;90
12 | LDO;Top;12.700;12.750;90
13 | D1;Top;2.750;31.100;180
14 | J1;Top;12.750;4.100;270
15 | DWM1000;Top;12.700;44.150;0
16 |
--------------------------------------------------------------------------------
/positioning_anchor/.gitignore:
--------------------------------------------------------------------------------
1 | .pio
2 | .vscode/.browse.c_cpp.db*
3 | .vscode/c_cpp_properties.json
4 | .vscode/launch.json
5 | .vscode/ipch
6 |
--------------------------------------------------------------------------------
/positioning_anchor/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "platformio.platformio-ide"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/positioning_anchor/DWM1000_Anchor/DW1000CompileOptions.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016 by Ludwig Grill (www.rotzbua.de)
3 | * Decawave DW1000 library for arduino.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | * @file DW1000CompileOptions.h
18 | * Here are some options to optimize code and save some ram and rom
19 | *
20 | */
21 |
22 | #ifndef DW1000COMPILEOPTIONS_H
23 | #define DW1000COMPILEOPTIONS_H
24 |
25 | /**
26 | * Printable DW1000Time object costs about: rom: 490 byte ; ram: 58 byte
27 | * This option is needed because compiler can not optimize unused codes from inheritanced methods
28 | * Some examples or debug code use this
29 | * Set false if you do not need it and have to save some space
30 | */
31 | #define DW1000TIME_H_PRINTABLE true
32 |
33 | #endif // DW1000COMPILEOPTIONS_H
34 |
--------------------------------------------------------------------------------
/positioning_anchor/DWM1000_Anchor/deprecated.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016 by Ludwig Grill (www.rotzbua.de)
3 | * Simple deprecated workaround for Arduino IDE
4 | * IDE 1.6.8 use gcc 4.8 which do not support c++14 [[deprecated]]
5 | * Later versions should support c++14, then use c++14 syntax
6 | */
7 | #ifndef DEPRECATED_H
8 | #define DEPRECATED_H
9 |
10 | #ifdef __has_cpp_attribute
11 | #if __has_cpp_attribute(deprecated)
12 | #define DEPRECATED [[deprecated]]
13 | #define DEPRECATED_MSG(msg) [[deprecated(msg)]]
14 | #endif // __has_cpp_attribute(deprecated)
15 | #else
16 | #define DEPRECATED __attribute__((deprecated))
17 | #define DEPRECATED_MSG(msg) __attribute__((deprecated(msg)))
18 | #endif // __has_cpp_attribute
19 |
20 | #endif // DEPRECATED_H
21 |
--------------------------------------------------------------------------------
/positioning_anchor/DWM1000_Anchor/require_cpp11.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016 by Ludwig Grill (www.rotzbua.de)
3 | * Throws error if c++11 is not supported
4 | */
5 | #ifndef REQUIRE_CPP11_H
6 | #define REQUIRE_CPP11_H
7 |
8 | #if __cplusplus < 201103L
9 | #error "This library needs at least a C++11 compliant compiler, maybe compiler argument for C++11 support is missing or if you use Arduino IDE upgrade to version >=1.6.6"
10 | #endif
11 |
12 | #endif // REQUIRE_CPP11_H
13 |
--------------------------------------------------------------------------------
/positioning_anchor/platformio.ini:
--------------------------------------------------------------------------------
1 | ; PlatformIO Project Configuration File
2 | ;
3 | ; Build options: build flags, source filter
4 | ; Upload options: custom upload port, speed and extra flags
5 | ; Library options: dependencies, extra library storages
6 | ; Advanced options: extra scripting
7 | ;
8 | ; Please visit documentation for the other options and examples
9 | ; https://docs.platformio.org/page/projectconf.html
10 |
11 | [platformio]
12 | src_dir = DWM1000_Anchor
13 |
14 | [env:pro16MHzatmega328]
15 | platform = atmelavr
16 | board = pro16MHzatmega328
17 | framework = arduino
18 | monitor_speed = 115200
19 |
--------------------------------------------------------------------------------
/positioning_tag/.gitignore:
--------------------------------------------------------------------------------
1 | .pio
2 | .vscode/.browse.c_cpp.db*
3 | .vscode/c_cpp_properties.json
4 | .vscode/launch.json
5 | .vscode/ipch
6 |
--------------------------------------------------------------------------------
/positioning_tag/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "platformio.platformio-ide"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/positioning_tag/DWM1000_Tag/DW1000CompileOptions.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016 by Ludwig Grill (www.rotzbua.de)
3 | * Decawave DW1000 library for arduino.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | * @file DW1000CompileOptions.h
18 | * Here are some options to optimize code and save some ram and rom
19 | *
20 | */
21 |
22 | #ifndef DW1000COMPILEOPTIONS_H
23 | #define DW1000COMPILEOPTIONS_H
24 |
25 | /**
26 | * Printable DW1000Time object costs about: rom: 490 byte ; ram: 58 byte
27 | * This option is needed because compiler can not optimize unused codes from inheritanced methods
28 | * Some examples or debug code use this
29 | * Set false if you do not need it and have to save some space
30 | */
31 | #define DW1000TIME_H_PRINTABLE true
32 |
33 | #endif // DW1000COMPILEOPTIONS_H
34 |
--------------------------------------------------------------------------------
/positioning_tag/DWM1000_Tag/deprecated.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016 by Ludwig Grill (www.rotzbua.de)
3 | * Simple deprecated workaround for Arduino IDE
4 | * IDE 1.6.8 use gcc 4.8 which do not support c++14 [[deprecated]]
5 | * Later versions should support c++14, then use c++14 syntax
6 | */
7 | #ifndef DEPRECATED_H
8 | #define DEPRECATED_H
9 |
10 | #ifdef __has_cpp_attribute
11 | #if __has_cpp_attribute(deprecated)
12 | #define DEPRECATED [[deprecated]]
13 | #define DEPRECATED_MSG(msg) [[deprecated(msg)]]
14 | #endif // __has_cpp_attribute(deprecated)
15 | #else
16 | #define DEPRECATED __attribute__((deprecated))
17 | #define DEPRECATED_MSG(msg) __attribute__((deprecated(msg)))
18 | #endif // __has_cpp_attribute
19 |
20 | #endif // DEPRECATED_H
21 |
--------------------------------------------------------------------------------
/positioning_tag/DWM1000_Tag/require_cpp11.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016 by Ludwig Grill (www.rotzbua.de)
3 | * Throws error if c++11 is not supported
4 | */
5 | #ifndef REQUIRE_CPP11_H
6 | #define REQUIRE_CPP11_H
7 |
8 | #if __cplusplus < 201103L
9 | #error "This library needs at least a C++11 compliant compiler, maybe compiler argument for C++11 support is missing or if you use Arduino IDE upgrade to version >=1.6.6"
10 | #endif
11 |
12 | #endif // REQUIRE_CPP11_H
13 |
--------------------------------------------------------------------------------
/positioning_tag/platformio.ini:
--------------------------------------------------------------------------------
1 | ; PlatformIO Project Configuration File
2 | ;
3 | ; Build options: build flags, source filter
4 | ; Upload options: custom upload port, speed and extra flags
5 | ; Library options: dependencies, extra library storages
6 | ; Advanced options: extra scripting
7 | ;
8 | ; Please visit documentation for the other options and examples
9 | ; https://docs.platformio.org/page/projectconf.html
10 |
11 | [platformio]
12 | src_dir = DWM1000_Tag
13 |
14 | [env:pro16MHzatmega328]
15 | platform = atmelavr
16 | board = pro16MHzatmega328
17 | framework = arduino
18 | monitor_speed = 115200
19 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Car/Contracts/IPwmDevice.cs:
--------------------------------------------------------------------------------
1 | using System.Device.Pwm;
2 |
3 | namespace Alphabot.Net.Car.Contracts
4 | {
5 | public interface IPwmDevice
6 | {
7 | PwmChannel CreatePwmChannel(int channelPin);
8 | PwmChannel GetPwmChannel(int channelPin);
9 | double GetDutyCycle(int channelPin);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Car/Contracts/ISpeedController.cs:
--------------------------------------------------------------------------------
1 | namespace Alphabot.Net.Car.Contracts
2 | {
3 | public interface ISpeedController
4 | {
5 | ///
6 | /// Set indicated speed
7 | ///
8 | int Speed { get; set; }
9 | void AddPin(int speedControlPin);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Car/Contracts/ISteeringMethod.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace Alphabot.Net.Car.Contracts
4 | {
5 | public interface ISteeringMethod
6 | {
7 | Task CenterSteering();
8 | Task Calibrate();
9 |
10 | Task TurnRight(int absolutePosition);
11 | Task TurnLeft(int relativPosition);
12 | void Stop();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Car/Steering/SteeringMethod.cs:
--------------------------------------------------------------------------------
1 | namespace Alphabot.Net.Car.Steering
2 | {
3 | public enum SteeringMethod
4 | {
5 | AbsoluteSteering = 0,
6 | RelativSteering = 1,
7 | None = 2,
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Car/Steering/TurnDirection.cs:
--------------------------------------------------------------------------------
1 | namespace Alphabot.Net.Car.Steering
2 | {
3 | public enum TurnDirection
4 | {
5 | Left,
6 | Right,
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Cli/Alphabot.Net.Cli.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net5.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Alphabot.Net.Remote.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net5.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Commands/ActionCalibrateSteering.cs:
--------------------------------------------------------------------------------
1 | using Alphabot.Net.Shared.Logger;
2 |
3 | namespace Alphabot.Net.Remote.Commands
4 | {
5 | internal class ActionCalibrateSteering : AlphabotAction
6 | {
7 | public ActionCalibrateSteering() : base()
8 | {
9 | }
10 |
11 | public override void Perform()
12 | {
13 | _car.CalibrateActiveSteering();
14 | _logger.Log(LogLevel.Information, "AlphabotCalibrateSteeringAction.Perform done");
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Commands/ActionCenterSteering.cs:
--------------------------------------------------------------------------------
1 | using Alphabot.Net.Shared.Logger;
2 |
3 | namespace Alphabot.Net.Remote.Commands
4 | {
5 | internal class ActionCenterSteering : AlphabotAction
6 | {
7 | public ActionCenterSteering() : base()
8 | {
9 | }
10 |
11 | public override void Perform()
12 | {
13 | _car.CenterActiveSteering();
14 | _logger.Log(LogLevel.Information, "AlphabotCenterSteeringAction.Perform done");
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Commands/ActionSetCollisionPrevention.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Alphabot.Net.Remote.Commands
4 | {
5 | class ActionSetCollisionPrevention : AlphabotAction
6 | {
7 | public ActionSetCollisionPrevention(bool preventCollision) : base()
8 | {
9 | Args = new int[] { Convert.ToInt32(preventCollision) };
10 | }
11 |
12 | public override void Perform()
13 | {
14 | if (Args.Length >= 1)
15 | {
16 | if (Args[0] == 1)
17 | {
18 | // _car.StartCollisionPrevention();
19 | }
20 | if (Args[0] == 0)
21 | {
22 | // _car.StopCollisionPrevention();
23 | }
24 | }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Commands/ActionSetSpeed.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Alphabot.Net.Shared.Logger;
3 |
4 | namespace Alphabot.Net.Remote.Commands
5 | {
6 | class ActionSetSpeed : AlphabotAction
7 | {
8 | public ActionSetSpeed(int speed) : base()
9 | {
10 | Args = new int[] { speed };
11 | }
12 |
13 | public override void Perform()
14 | {
15 | int speed = Args[0];
16 |
17 | _logger.Log(LogLevel.Debug, "AlphabotAction", $"setspeed to: {speed}");
18 |
19 | if (speed > 0)
20 | {
21 | _car.SetSpeed(speed);
22 | _car.MoveForward();
23 | }
24 | else if (speed < 0)
25 | {
26 | _car.SetSpeed(-speed);
27 | _car.MoveBackward();
28 | }
29 | else
30 | {
31 | _car.SetSpeed(0);
32 | _car.Stop();
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Commands/ActionSetSteeringMethod.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Alphabot.Net.Car.Settings;
3 |
4 | namespace Alphabot.Net.Remote.Commands
5 | {
6 | internal class ActionSetSteeringMethod : AlphabotAction
7 | {
8 | Prefs _prefs = Prefs.GetInstance();
9 | public ActionSetSteeringMethod(bool isActiveSteering) : base()
10 | {
11 | Args = new int[] { Convert.ToInt32(isActiveSteering) };
12 | }
13 |
14 | public override void Perform()
15 | {
16 | //active steering
17 | // ass on / off
18 |
19 | if (Args.Length >= 1)
20 | {
21 | if (Args[0] == 1)
22 | {
23 | _prefs.DeviceSettings.ActiveSteering = true;
24 | }
25 | if (Args[0] == 0)
26 | {
27 | _prefs.DeviceSettings.ActiveSteering = false;
28 | }
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Commands/ActionTurn.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Alphabot.Net.Remote.Commands
4 | {
5 | internal class ActionTurn : AlphabotAction
6 | {
7 | public ActionTurn(int steer) : base()
8 | {
9 | Args = new int[] { steer };
10 | }
11 |
12 | public override void Perform()
13 | {
14 | int steer = Args[0];
15 |
16 | if (steer < 0)
17 | {
18 | _car.TurnLeft((int)Math.Round(steer * 2.28));
19 | }
20 | else if (steer > 0)
21 | {
22 | _car.TurnRight((int)Math.Round(steer * 2.28));
23 | }
24 | else
25 | {
26 | _car.CenterActiveSteering();
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Commands/AlphabotAction.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Alphabot.Net.Car;
3 | using Alphabot.Net.Car.Contracts;
4 | using Alphabot.Net.Remote.Contracts;
5 | using Alphabot.Net.Shared.Contracts;
6 | using Alphabot.Net.Shared.Logger;
7 |
8 | namespace Alphabot.Net.Remote.Commands
9 | {
10 | public abstract class AlphabotAction : IAlphabotAction
11 | {
12 | protected readonly IServiceLogger _logger = ServiceLogger.GetInstance().Current;
13 | protected readonly IAlphabotCar _car = RemoteCar.GetInstance().Current;
14 |
15 | public int[] Args { get; set; }
16 |
17 | public AlphabotAction()
18 | {
19 | if (_car is AlphabotCar)
20 | {
21 | _logger.Log(LogLevel.Debug, "ctor: AlphabotAction", "RC is AlphabotCar");
22 | }
23 | else
24 | {
25 | _logger.Log(LogLevel.Debug, "RC is DummyCar");
26 | }
27 | }
28 |
29 | public abstract void Perform();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Contracts/IAlphabotAction.cs:
--------------------------------------------------------------------------------
1 | namespace Alphabot.Net.Remote.Contracts
2 | {
3 | public interface IAlphabotAction
4 | {
5 | int[] Args { get; set; }
6 | void Perform();
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Contracts/IClientHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Alphabot.Net.Remote.Contracts
4 | {
5 | public interface IClientHandler
6 | {
7 | IReadOnlyList Sessions { get; }
8 | void AcceptClients();
9 | void Stop();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Contracts/IProtocolParser.cs:
--------------------------------------------------------------------------------
1 | namespace Alphabot.Net.Remote.Contracts
2 | {
3 | public interface IProtocolParser
4 | {
5 | string Request { get; }
6 | string GetCommand();
7 | string[] GetArgs();
8 |
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Contracts/IService.cs:
--------------------------------------------------------------------------------
1 | namespace Alphabot.Net.Remote.Contracts
2 | {
3 | public interface IService
4 | {
5 | void Start();
6 | void Stop();
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Contracts/ISessionHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Alphabot.Net.Remote.Contracts
4 | {
5 | public interface ISessionHandler
6 | {
7 | bool IsConnected { get; }
8 | void HandleSingleSession();
9 | void SendTextMessage(string message);
10 | void Close();
11 |
12 | event EventHandler SessionClosed;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Contracts/ITextRequestHandler.cs:
--------------------------------------------------------------------------------
1 | namespace Alphabot.Net.Remote.Contracts
2 | {
3 | public interface ITextRequestHandler
4 | {
5 | string GetResponse();
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Core/SystemHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Alphabot.Net.Car.Devices;
3 |
4 | namespace Alphabot.Net.Remote.Core
5 | {
6 | public class SystemHandler
7 | {
8 | private static SystemHandler _instance;
9 |
10 | public static SystemHandler GetInstance
11 | {
12 | get
13 | {
14 | if (_instance == null)
15 | {
16 | _instance = new SystemHandler();
17 | }
18 | return _instance;
19 | }
20 | }
21 |
22 | public PositioningSystem PositioningSystem { get; set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Remote/Core/ToggleSettings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Alphabot.Net.Shared.Responses;
3 |
4 | namespace Alphabot.Net.Remote.Core
5 | {
6 | public class ToggleSettings
7 | {
8 | private static ToggleSettings _instance;
9 |
10 | public static ToggleSettings GetInstance
11 | {
12 | get
13 | {
14 | if (_instance == null)
15 | {
16 | _instance = new ToggleSettings();
17 | }
18 | return _instance;
19 | }
20 | }
21 |
22 | public bool DoCollisionAvoidance { get; set; }
23 |
24 | public bool LogPositioning { get; set; }
25 |
26 | public bool DoPositioningSystem { get; set; }
27 |
28 | private ToggleSettings()
29 | {
30 | DoCollisionAvoidance = false;
31 | LogPositioning = true;
32 | DoPositioningSystem = true;
33 | }
34 |
35 | public ToggleResponse GetToggleResponse()
36 | {
37 | ToggleResponse res = new ToggleResponse();
38 |
39 | res.DoCollisionAvoidance = DoCollisionAvoidance;
40 | res.LogPositioning = LogPositioning;
41 | res.DoPositioningSystem = DoPositioningSystem;
42 |
43 | return res;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Alphabot.Net.Shared.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net5.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Contracts/IAlphabotRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Alphabot.Net.Shared.Contracts
4 | {
5 | public interface IAlphabotRequest
6 | {
7 | byte[] GetBytes();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Contracts/IAlphabotResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AlphabotClientLibrary.Shared.Contracts
4 | {
5 | public interface IAlphabotResponse
6 | {
7 | byte[] GetBytes();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Contracts/IServiceLogger.cs:
--------------------------------------------------------------------------------
1 | using Alphabot.Net.Shared.Logger;
2 |
3 | namespace Alphabot.Net.Shared.Contracts
4 | {
5 | public interface IServiceLogger
6 | {
7 | void Log(LogLevel logLevel, string message);
8 | void Log(LogLevel logLevel, string source, string message);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Contracts/ISocketReader.cs:
--------------------------------------------------------------------------------
1 | using System.Net.Sockets;
2 |
3 | namespace Alphabot.Net.Shared.Contracts
4 | {
5 | public interface ISocketReader
6 | {
7 | NetworkStream GetStream();
8 | string ReceiveText();
9 | byte[] ReceiveBytes();
10 | string ReadLine();
11 | void Close();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Contracts/ISocketWriter.cs:
--------------------------------------------------------------------------------
1 | using System.Net.Sockets;
2 |
3 | namespace Alphabot.Net.Shared.Contracts
4 | {
5 | public interface ISocketWriter
6 | {
7 | NetworkStream GetStream();
8 | void SendText(string message);
9 | void SendBytes(byte[] bytes);
10 | void WriteLine(string message);
11 | void Close();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Delegates.cs:
--------------------------------------------------------------------------------
1 | using AlphabotClientLibrary.Shared.Contracts;
2 |
3 | namespace Alphabot.Net.Shared
4 | {
5 | public static class Delegates
6 | {
7 | public delegate void ResponseSender(IAlphabotResponse response);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Logger/LogLevel.cs:
--------------------------------------------------------------------------------
1 | namespace Alphabot.Net.Shared.Logger
2 | {
3 | public enum LogLevel
4 | {
5 | Debug,
6 | ///
7 | /// Process is every normal log Information that isn't Critical or Warning.
8 | ///
9 | Information,
10 |
11 | ///
12 | /// Warning means something failed but it isn't a big deal.
13 | ///
14 | Warning,
15 | Error,
16 | ///
17 | /// Something happened that the program doesn't work like it should work.
18 | ///
19 | Critical,
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Logger/ServiceLogger.cs:
--------------------------------------------------------------------------------
1 | using Alphabot.Net.Shared.Contracts;
2 |
3 | namespace Alphabot.Net.Shared.Logger
4 | {
5 | public class ServiceLogger
6 | {
7 | IServiceLogger _serviceLogger;
8 | static readonly ServiceLogger _instance = new ServiceLogger();
9 |
10 | public IServiceLogger Current { get => _serviceLogger; set => _serviceLogger = value; }
11 |
12 | private ServiceLogger()
13 | {
14 | _serviceLogger = new ConsoleLogger();
15 | }
16 | public static ServiceLogger GetInstance()
17 | {
18 | return _instance;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Prefs/Prefs.cs:
--------------------------------------------------------------------------------
1 | namespace Alphabot.Net.Car.Settings
2 | {
3 | public class Prefs
4 | {
5 | static Prefs _instance = new Prefs();
6 |
7 | DeviceSettings _deviceSettings;
8 | ServiceSettings _serviceSettings;
9 |
10 | private Prefs()
11 | {
12 | _deviceSettings = new DeviceSettings();
13 | _serviceSettings = new ServiceSettings();
14 | }
15 |
16 | public DeviceSettings DeviceSettings { get => _deviceSettings; set => _deviceSettings = value; }
17 | public ServiceSettings ServiceSettings { get => _serviceSettings; set => _serviceSettings = value; }
18 |
19 | public static Prefs GetInstance()
20 | {
21 | return _instance;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Prefs/ServiceSettings.cs:
--------------------------------------------------------------------------------
1 | namespace Alphabot.Net.Car.Settings
2 | {
3 | public class ServiceSettings
4 | {
5 | int _alphabotServicePort = 9000;
6 |
7 | public ServiceSettings()
8 | {
9 | CommandParamSeparator = ' ';
10 | SocketBufferSize = 1024;
11 | }
12 |
13 | public char CommandParamSeparator { get; set; }
14 |
15 | public int AlphabotServicePort { get => _alphabotServicePort; set => _alphabotServicePort = value; }
16 |
17 | public int SocketBufferSize { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Requests/CalibrateSteeringRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Alphabot.Net.Shared.Contracts;
3 |
4 | namespace Alphabot.Net.Shared.Requests
5 | {
6 | public class CalibrateSteeringRequest : IAlphabotRequest
7 | {
8 | public byte[] GetBytes()
9 | {
10 | byte[] packetId = { 0x03 };
11 |
12 | return packetId;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Requests/ConfigurePositioningAnchorRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Alphabot.Net.Shared.Contracts;
4 |
5 | namespace Alphabot.Net.Shared.Requests
6 | {
7 | public class ConfigurePositioningAnchorRequest : IAlphabotRequest
8 | {
9 | public byte AnchorId { get; private set; }
10 |
11 | public Position Position { get; private set; }
12 |
13 | public ConfigurePositioningAnchorRequest(byte anchorId, Position position)
14 | {
15 | if (anchorId < 0 || anchorId > 2)
16 | throw new ArgumentException("AnchorID must be between 0 and 2");
17 |
18 | AnchorId = anchorId;
19 | Position = position;
20 | }
21 |
22 | public byte[] GetBytes()
23 | {
24 | byte[] packetId = { 0x07 }; // Packet ID 0x07
25 | byte[] data = GetDataBytes();
26 |
27 | return packetId.Concat(data).ToArray();
28 | }
29 |
30 | private byte[] GetDataBytes()
31 | {
32 | byte[] anchorId = { AnchorId };
33 | byte[] positionData = Position.ToByteArray();
34 |
35 | return anchorId.Concat(positionData).ToArray();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Requests/PingRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Alphabot.Net.Shared.Contracts;
4 | using Alphabot.Net.Shared.Responses;
5 |
6 | namespace Alphabot.Net.Shared.Requests
7 | {
8 | public class PingRequest : IAlphabotRequest
9 | {
10 | private byte[] _dataBytes;
11 |
12 | public PingRequest(byte[] dataBytes)
13 | {
14 | _dataBytes = dataBytes;
15 | }
16 |
17 | public byte[] GetBytes()
18 | {
19 | byte[] ret = new byte[9];
20 | ret[0] = 0x06;
21 | Array.Copy(_dataBytes, 0, ret, 1, 8);
22 | return ret;
23 | }
24 |
25 | public PingResponse GetPingResponse()
26 | {
27 | return new PingResponse(_dataBytes);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Requests/SpeedSteerRequest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Alphabot.Net.Shared.Contracts;
3 |
4 | namespace Alphabot.Net.Shared.Requests
5 | {
6 | public class SpeedSteerRequest : IAlphabotRequest
7 | {
8 | public sbyte _steer;
9 | public sbyte _speed;
10 |
11 | public SpeedSteerRequest(sbyte steer, sbyte speed)
12 | {
13 | _steer = steer;
14 | _speed = speed;
15 | }
16 |
17 | public byte[] GetBytes()
18 | {
19 | byte[] ret = new byte[3];
20 |
21 | ret[0] = 0x01; // Packet ID 0x01
22 |
23 | ret[1] = (byte) _speed;
24 | ret[2] = (byte) _steer;
25 |
26 | return ret;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Responses/ErrorResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using AlphabotClientLibrary.Shared.Contracts;
4 |
5 | namespace Alphabot.Net.Shared.Responses
6 | {
7 | public class ErrorResponse : IAlphabotResponse
8 | {
9 | public enum ErrorType
10 | {
11 | UnknownError = 0x00,
12 | UnknownProtocol = 0x01,
13 | NotSupportedProtocol = 0x02,
14 | UnknownPacketId = 0x03,
15 | WrongPayload = 0x04
16 | }
17 |
18 | public ErrorType Error { get; private set; }
19 |
20 | public byte Header { get; private set; }
21 |
22 | public byte[] Payload { get; private set; }
23 |
24 | public ErrorResponse(ErrorType errorType, byte[] packet)
25 | {
26 | Payload = new byte[packet.Length - 1];
27 | Header = packet[0];
28 | Array.Copy(packet, 1, Payload, 0, packet.Length - 1);
29 | Error = errorType;
30 | }
31 |
32 | public byte[] GetBytes()
33 | {
34 | byte[] firstThreeBytes = { 0x0D, (byte)Error, Header };
35 | byte[] ret = firstThreeBytes.Concat(Payload).ToArray();
36 |
37 | return ret;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Responses/PingResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace Alphabot.Net.Shared.Responses
5 | {
6 | public class PingResponse : IAlphabotResponse
7 | {
8 | private byte[] _dataBytes;
9 |
10 | public PingResponse(byte[] dataBytes)
11 | {
12 | _dataBytes = dataBytes;
13 | }
14 |
15 | public byte[] GetBytes()
16 | {
17 | byte[] ret = new byte[9];
18 | ret[0] = 0x05;
19 | Array.Copy(_dataBytes, 0, ret, 1, 8);
20 | return ret;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/Responses/PositioningResponse.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using AlphabotClientLibrary.Shared.Contracts;
3 |
4 | namespace Alphabot.Net.Shared.Responses
5 | {
6 | public class PositioningResponse : IAlphabotResponse
7 | {
8 | public Position Position { get; private set; }
9 |
10 | public PositioningResponse(Position position)
11 | {
12 | Position = position;
13 | }
14 |
15 | public byte[] GetBytes()
16 | {
17 | byte[] bytes = { 0x02, Position.ToByteArray()[0], Position.ToByteArray()[1], Position.ToByteArray()[2], Position.ToByteArray()[3] };
18 | return bytes;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Alphabot.Net.Shared/TcpConnectionLostException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Alphabot.Net.Shared
4 | {
5 | public class TcpConnectionLostException: Exception
6 | {
7 | public TcpConnectionLostException(string info): base(info)
8 | {
9 |
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Iot.Device.Bindings.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/Alphabot.Net/Iot.Device.Bindings.dll
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Microsoft.Extensions.Logging.Abstractions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/Alphabot.Net/Microsoft.Extensions.Logging.Abstractions.dll
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/Microsoft.Win32.SystemEvents.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/Alphabot.Net/Microsoft.Win32.SystemEvents.dll
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/SixLabors.ImageSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/Alphabot.Net/SixLabors.ImageSharp.dll
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/System.CodeDom.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/Alphabot.Net/System.CodeDom.dll
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/System.Device.Gpio.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/Alphabot.Net/System.Device.Gpio.dll
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/System.Drawing.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/Alphabot.Net/System.Drawing.Common.dll
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/System.IO.Ports.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/Alphabot.Net/System.IO.Ports.dll
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/System.Management.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/Alphabot.Net/System.Management.dll
--------------------------------------------------------------------------------
/rpi/Alphabot.Net/UnitsNet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/Alphabot.Net/UnitsNet.dll
--------------------------------------------------------------------------------
/rpi/sd_image/bcm2835-gpiomem/Makefile:
--------------------------------------------------------------------------------
1 | PWD := $(shell pwd)
2 | obj-m += bcm2835-gpiomem.o
3 |
4 | all:
5 | make ARCH=arm64 -C $(KERNEL) M=$(PWD) modules
6 |
7 | clean:
8 | make -C $(KERNEL) M=$(PWD) clean
9 |
--------------------------------------------------------------------------------
/rpi/sd_image/brcm-firmware/brcmfmac43430-sdio.raspberrypi,3-model-b.txt:
--------------------------------------------------------------------------------
1 | # SPDX-License-Identifier: GPL-2.0+
2 | # (C) Copyright 2018 Raspberry Pi (Trading) Ltd.
3 | # NVRAM config file for the BCM43430 WiFi/BT chip as found on the
4 | # Raspberry Pi 3 Model B
5 | aa2g=1
6 | ag0=255
7 | AvVmid_c0=0x0,0xc8
8 | boardflags=0x00404201
9 | boardflags3=0x08000000
10 | boardnum=22
11 | boardrev=0x1202
12 | boardtype=0x0726
13 | btc_mode=1
14 | btc_params1=0x7530
15 | btc_params8=0x4e20
16 | cckbw202gpo=0
17 | cckpwroffset0=5
18 | ccode=ALL
19 | # cldo_pwm is not set
20 | deadman_to=0xffffffff
21 | devid=0x43e2
22 | extpagain2g=0
23 | il0macaddr=00:90:4c:c5:12:38
24 | legofdmbw202gpo=0x66111111
25 | macaddr=00:90:4c:c5:12:38
26 | manfid=0x2d0
27 | maxp2ga0=84
28 | mcsbw202gpo=0x77711111
29 | muxenab=0x1
30 | nocrc=1
31 | ofdmdigfilttype=18
32 | ofdmdigfilttypebe=18
33 | pa0itssit=0x20
34 | pa2ga0=-168,7161,-820
35 | pacalidx2g=32
36 | papdendidx=61
37 | papdepsoffset=-36
38 | papdmode=1
39 | papdvalidtest=1
40 | prodid=0x0726
41 | propbw202gpo=0xdd
42 | spurconfig=0x3
43 | sromrev=11
44 | txpwrbckof=6
45 | vendid=0x14e4
46 | wl0id=0x431b
47 | xtalfreq=37400
48 |
--------------------------------------------------------------------------------
/rpi/sd_image/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | docker stop debian
4 | docker rm debian
5 | umount /tmp/raspi_debian/.//boot/firmware
6 | umount /tmp/raspi_debian
7 | kpartx -dsv raspi_alphabot.img
8 | rm -f raspi_alphabot.img
9 | rm -f dotnet-sdk-5.0.202-linux-arm64.tar.gz
10 | rm -f vmlinuz-*-arm64
11 | rm -f initrd.img
12 | rm -f bcm2*-rpi-*.dtb
13 |
--------------------------------------------------------------------------------
/rpi/sd_image/kernel-patches/class.h.patch:
--------------------------------------------------------------------------------
1 | --- a/include/linux/device/class.h
2 | +++ b/include/linux/device/class.h
3 | @@ -196,6 +196,8 @@
4 | const char *buf, size_t count);
5 | };
6 |
7 | +#define CLASS_ATTR(_name, _mode, _show, _store) \
8 | + struct class_attribute class_attr_##_name = __ATTR(_name, _mode, _show, _store)
9 | #define CLASS_ATTR_RW(_name) \
10 | struct class_attribute class_attr_##_name = __ATTR_RW(_name)
11 | #define CLASS_ATTR_RO(_name) \
12 |
--------------------------------------------------------------------------------
/rpi/sd_image/kernel-patches/dir.c.patch:
--------------------------------------------------------------------------------
1 | --- a/fs/sysfs/dir.c
2 | +++ b/fs/sysfs/dir.c
3 | @@ -57,7 +57,7 @@
4 | kobject_get_ownership(kobj, &uid, &gid);
5 |
6 | kn = kernfs_create_dir_ns(parent, kobject_name(kobj),
7 | - S_IRWXU | S_IRUGO | S_IXUGO, uid, gid,
8 | + S_IRWXU | S_IRWXG | S_IRUGO | S_IXUGO, uid, gid,
9 | kobj, ns);
10 | if (IS_ERR(kn)) {
11 | if (PTR_ERR(kn) == -EEXIST)
12 |
--------------------------------------------------------------------------------
/rpi/sd_image/raspi4-firmware/fixup4.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/sd_image/raspi4-firmware/fixup4.dat
--------------------------------------------------------------------------------
/rpi/sd_image/raspi4-firmware/fixup4cd.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/sd_image/raspi4-firmware/fixup4cd.dat
--------------------------------------------------------------------------------
/rpi/sd_image/raspi4-firmware/fixup4db.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/sd_image/raspi4-firmware/fixup4db.dat
--------------------------------------------------------------------------------
/rpi/sd_image/raspi4-firmware/fixup4x.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/sd_image/raspi4-firmware/fixup4x.dat
--------------------------------------------------------------------------------
/rpi/sd_image/raspi4-firmware/start4.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/sd_image/raspi4-firmware/start4.elf
--------------------------------------------------------------------------------
/rpi/sd_image/raspi4-firmware/start4cd.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/sd_image/raspi4-firmware/start4cd.elf
--------------------------------------------------------------------------------
/rpi/sd_image/raspi4-firmware/start4db.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/sd_image/raspi4-firmware/start4db.elf
--------------------------------------------------------------------------------
/rpi/sd_image/raspi4-firmware/start4x.elf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Filiprogrammer/AlphabotSZUCar/53939df9a7be4e01e605e71150a62dd85379858e/rpi/sd_image/raspi4-firmware/start4x.elf
--------------------------------------------------------------------------------
/rpi/sd_image/rootfs/boot/firmware/sysconf.txt:
--------------------------------------------------------------------------------
1 | # This file will be automatically evaluated and installed at next boot
2 | # time, and regenerated (to avoid leaking passwords and such information).
3 | #
4 | # To force it to be evaluated immediately, you can run (as root):
5 | #
6 | # /usr/sbin/rpi-set-sysconf
7 | #
8 | # You can disable the file evaluation by disabling the rpi-set-sysconf
9 | # service in systemd:
10 | #
11 | # systemctl disable rpi-set-sysconf
12 | #
13 | # Comments (all portions of a line following a '#' character) are
14 | # ignored. This file is read line by line. Valid
15 | # configuration lines are of the form 'key=value'. Whitespace around
16 | # 'key' and 'value' is ignored. This file will be _regenerated_ every
17 | # time it is evaluated.
18 | #
19 | # We follow the convention to indent with one space comments, and
20 | # leave no space to indicate the line is an example that could be
21 | # uncommented.
22 |
23 | # root_pw - Set a password for the root user (by default, it allows
24 | # for a passwordless login)
25 | root_pw=alphabot
26 |
27 | # root_authorized_key - Set an authorized key for a root ssh login
28 | #root_authorized_key=
29 |
30 | # hostname - Set the system hostname.
31 | hostname=alphabot
32 |
33 | # We found the following unhandled keys - That means, the
34 | # configuration script does not know how to handle them. Please
35 | # double-check them!
36 |
--------------------------------------------------------------------------------
/rpi/sd_image/rootfs/etc/dnsmasq.conf:
--------------------------------------------------------------------------------
1 | interface=wlan0
2 | no-dhcp-interface=eth0
3 | no-dhcp-interface=usb0
4 | dhcp-range=192.168.1.100,192.168.1.150,24h
5 | dhcp-option=option:dns-server,192.168.1.1
6 | no-resolv
7 |
--------------------------------------------------------------------------------
/rpi/sd_image/rootfs/etc/fstab:
--------------------------------------------------------------------------------
1 | # The root file system has fs_passno=1 as per fstab(5) for automatic fsck.
2 | LABEL=RASPIROOT / ext4 rw 0 1
3 | # All other file systems have fs_passno=2 as per fstab(5) for automatic fsck.
4 | LABEL=RASPIFIRM /boot/firmware vfat rw 0 2
5 |
--------------------------------------------------------------------------------
/rpi/sd_image/rootfs/etc/hostapd/hostapd.conf:
--------------------------------------------------------------------------------
1 | interface=wlan0
2 | hw_mode=g
3 | channel=1
4 | wmm_enabled=0
5 | macaddr_acl=0
6 | auth_algs=1
7 | ignore_broadcast_ssid=0
8 | wpa=2
9 | wpa_key_mgmt=WPA-PSK
10 | wpa_pairwise=TKIP
11 | rsn_pairwise=CCMP
12 | ssid=alphabot_raspi
13 | wpa_passphrase=alphabot2944
14 |
--------------------------------------------------------------------------------
/rpi/sd_image/rootfs/etc/initramfs-tools/hooks/fix_brcm_missing_firmware:
--------------------------------------------------------------------------------
1 | #!/bin/sh -e
2 | # Copy missing firmware files for brcmfmac driver
3 | PREREQ=""
4 | prereqs () { echo "${PREREQ}"; }
5 | case "${1}" in prereqs) prereqs; exit 0 ;; esac ;
6 | . /usr/share/initramfs-tools/hook-functions
7 | echo "Copying missing firmware files for brcmfmac..."
8 | cp /lib/firmware/brcm/brcmfmac43455-sdio.bin ${DESTDIR}/lib/firmware/brcm/
9 | #cp /lib/firmware/brcm/brcmfmac43455-sdio.clm_blob ${DESTDIR}/lib/firmware/brcm/
10 | cp /lib/firmware/brcm/brcmfmac43455-sdio.txt ${DESTDIR}/lib/firmware/brcm/
11 | cp /lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt ${DESTDIR}/lib/firmware/brcm/
12 | cp /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt ${DESTDIR}/lib/firmware/brcm/
13 | cp /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt ${DESTDIR}/lib/firmware/brcm/
14 |
--------------------------------------------------------------------------------
/rpi/sd_image/rootfs/etc/initramfs-tools/hooks/rpi-resizerootfs:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | #
5 | # List the soft prerequisites here. This is a space separated list of
6 | # names, of scripts that are in the same directory as this one, that
7 | # must be run before this one can be.
8 | #
9 | PREREQS=""
10 | case $1 in
11 | prereqs) echo "$PREREQS"; exit 0;;
12 | esac
13 |
14 | . /usr/share/initramfs-tools/hook-functions
15 |
16 | # XXX: tail and realpath are included by default, right?
17 | #copy_exec /usr/bin/realpath
18 | #copy_exec /usr/bin/tail
19 | copy_exec /sbin/blkid
20 | copy_exec /bin/lsblk
21 | copy_exec /sbin/sfdisk
22 | copy_exec /sbin/partprobe
23 | copy_exec /sbin/resize2fs
24 |
--------------------------------------------------------------------------------
/rpi/sd_image/rootfs/etc/initramfs-tools/scripts/local-bottom/rpi-resizerootfs:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | #
5 | # List the soft prerequisites here. This is a space separated list of
6 | # names, of scripts that are in the same directory as this one, that
7 | # must be run before this one can be.
8 | #
9 | PREREQS=""
10 | case $1 in
11 | prereqs) echo "$PREREQS"; exit 0;;
12 | esac
13 |
14 | . /scripts/functions
15 |
16 | # Given the root partition, get the underlying device and partition number
17 | rootpart=$(realpath $ROOT)
18 | rootpart_nr=$(blkid -sPART_ENTRY_NUMBER -o value -p $rootpart)
19 | rootdev="/dev/$(lsblk -no pkname "$rootpart")"
20 |
21 | # Check if there's free space on the device (note: we align the first
22 | # partition at 4MB, so there's always at least 3MB free)
23 | free_space="$(sfdisk -qF $rootdev | tail -n1 | grep -v [^0-9]3M)"
24 | if test -z "$free_space"; then
25 | # Great, we already resized; nothing left to do!
26 | exit 0
27 | fi
28 |
29 | log_begin_msg "$0 resizing $ROOT"
30 |
31 | # Unmount for safety
32 | umount "${rootmnt}"
33 |
34 | # Expand the partition size to fill the entire device
35 | sfdisk -f $rootdev -N $rootpart_nr <