   } 
 }
 
-ros::Subscriber<std_msgs::UInt8> robot_car_subscriber("robot_car_arduino", &moveRobot);
+int get_distance()   
+{
+  digitalWrite(Trig, LOW);   
+  delayMicroseconds(2);
+  digitalWrite(Trig, HIGH);  
+  delayMicroseconds(20);
+  digitalWrite(Trig, LOW);   
+  
+  float distance = pulseIn(Echo, HIGH);  
+  distance= distance/58; 
+  
+  return (int)distance;
+}  
+
+ros::Subscriber<std_msgs::UInt8> steering_subscriber("robot_car_steering", &move_robot);
+
+std_msgs::Int16 ultrasonic_sensor_message;
+ros::Publisher ultrasonic_sensor_publisher("robot_car_ultrasonic_sensor", &ultrasonic_sensor_message);
 
 void setup() 
 {

#include <ros.h>
#include <std_msgs/UInt8.h>

ros::NodeHandle nh;

/*define logic control output pin*/
int in1=6;
int in2=7;
int in3=8;

   } 
   case 3:
   {
     analogWrite(ENA,ABS);
     analogWrite(ENB,ABS);
     digitalWrite(in1,LOW);
     digitalWrite(in2,HIGH);
     digitalWrite(in3,LOW);
