This project implements a robot trajectory tracking system using two different secret-sharing techniques: Reed-Solomon and Shamir. The system simulates a robot tracking a reference trajectory and where the controller is executed on a set of N clouds. The proposed schemes try to handle missing and incorrect shares in control inputs computed by the clouds.
- Custom Quantization: Implements a quantization method to handle floating-point values.
- Error Correction: Utilizes Reed-Solomon coding for robust control input reconstruction.
- Simulation: Simulates the robot's trajectory and computes position errors over time.
- Visualization: Generates plots for trajectory comparison, tracking errors, and share status.
- Python 3.x
- NumPy
- Matplotlib
- RSSecretSharing Class (Developed by using https://github.com/mortendahl/privateml.)
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install the required packages:
pip install numpy matplotlib
-
Ensure the RSSecretSharing library is available in your Python environment.
-
Prepare the reference trajectory files (
xr.txt
,yr.txt
,thetar.txt
) in the./Reference Trajectories/
directory. -
Run the simulation:
python robot-code.py
-
The simulation will generate plots showing:
- Robot trajectory vs. reference trajectory
- Position errors over time
- Share status table indicating errors and NaN values
The following files will be generated in the working directory:
trajectory_tracking_comparison.eps
: A plot comparing the robot's trajectory with the reference trajectory.tracking_errors.eps
: A plot showing the position errors over time.share_status_table.eps
: A table visualizing the status of shares during the simulation.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.