In this project, we developed a system for conversion from one measuring unit to another. This method allow users to convert amount from pound to kilogram using ROS parameter. It also allow user to change the conversion rate from parameter file (param.yaml) to get desired output.
We have developed this system in ROS using publisher, subscriber nodes and the parameter where:
-
Converter_pub.py: a publisher node where user will be asked to enter the amount for conversion which will be published on a topic named as ‘Convert’.
-
Converter_sub.py: a subscriber node which will subscribe to this ‘Convert’ topic for reading the published message and fetch the converting rate from the user-defined parameter using get_param feature. This value is changeable as we created param.yaml file in order to modify settings in our program without having to re-compile anything.
-
Linux OS - Ubuntu 20.04
-
Python 3.7 or above
First, we need to load the param.yaml file as given in the above description section and follow the same steps as provided in Live Weather Update repository to run this code as well. Following shows the output of the program.