Converting the code into a ROS node.