RabbitMQ RPC system: www.rabbitmq.com/tutorials/tutorial-six-python
The best practice is to try out the code and work along with it instead of copy/paste. Once you have an idea of how it works, have fun with it!
E.g. Under RabbitMQ RPC example, instead of printing the Fibonacci number, do this:
Allow the server and client to connect with each other using a custom queue name. This is what we have for our Telemetry (be crazy with it): self.channel.queue_declare(queue=f"telemetry_{self.vehicleName}")
Make sure to follow the Before running your code in the README file. and use the command-ip branch, not main. To test run this code base, you can do the following:
Commands:
on 2 separate terminals
Commands/Commands_GCS.py (GCS side)
Commands/RabbitMQ.py (vehicle side)
Check out the following documents to familiarize yourself with our current stage of VI.
E.g. Under RabbitMQ RPC example, instead of printing the Fibonacci number, do this:
self.channel.queue_declare(queue=f"telemetry_{self.vehicleName}")
Since we made a Python library for the vehicle teams to use, check out this document if you want to know how we got our python library: https://medium.com/analytics-vidhya/how-to-create-a-python-library-7d5aea80cc3f
Finally, test run our code:
Make sure to follow the Before running your code in the README file. and use the command-ip branch, not main. To test run this code base, you can do the following:
Commands: on 2 separate terminals Commands/Commands_GCS.py (GCS side) Commands/RabbitMQ.py (vehicle side)
Telemetry: Telemetry/Telemetry_GCS.py (GCS side) Telemtry/RabbitMQ.py (vehicle side)