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

#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;

/*define channel enable output pins*/
int ENA=5;
int ENB=11;
int ABS = 100;

void move_robot(const std_msgs::UInt8& msg)
{ 
  switch(msg.data)
  {
   case 0:
   {
     analogWrite(ENA,ABS);
     analogWrite(ENB,ABS);
     digitalWrite(in1,LOW);
     digitalWrite(in2,HIGH);
     digitalWrite(in3,HIGH);
     digitalWrite(in4,LOW);
     
     nh.logdebug("Moving forward");
     break;
   }
   case 1:
   { 
     analogWrite(ENA,ABS);
     analogWrite(ENB,ABS);
     digitalWrite(in1,HIGH);
     digitalWrite(in2,LOW);
     digitalWrite(in3,LOW);
     digitalWrite(in4,HIGH);
     
     nh.logdebug("Moving back");
     break;
   } 
   case 2:
   {
     analogWrite(ENA,ABS);
     analogWrite(ENB,ABS);
     digitalWrite(in1,HIGH);
     digitalWrite(in2,LOW);
     digitalWrite(in3,HIGH);
