Converted the code into a ROS node