# hector_quadrotor not responding cmd_vel message [closed]

Hello, I am having the 1.6.16s ros-fuerte-simulator gazebo with Ubuntu 12.04 (64bit). I am having a similar problem as this post:

The difference is I can control the quadrotor in the two demos but not when I tried to control the robot with my own code. The one extra thing is my robot pose is not updated as well after I publish the msg. So basically right now when I publish a twist message to '/cmd_vel' and then I check the state with /gazebo/get_model_state', the linear and angular component under twist are all zero. Does anyone know why? Here's my code (without the part that I set my robot's pose):

def __init__(self, proj, shared_data, velocityTopic='/cmd_vel'):

    self.pose_handler = proj.h_instance['pose']
print self.pose_handler.model_name
try:
#open a publisher for the base controller of the robot
self.pub = rospy.Publisher(velocityTopic, Twist)

# for the pr2, use /base_controller/command
# the turtlebot takes /cmd_vel
except:
print 'Problem setting up Locomotion Command Node'

def sendCommand(self, cmd):

#Twist is the message type and consists of x,y,z linear velocities
#and roll, pitch, yaw orientation velocities (x,y,z)
twist=Twist()

#Positive x is forward on robots in Gazebo
twist.linear.x=cmd[0]*4

#Angluar z is yaw or rotation in the xy plane
twist.angular.z=cmd[1]*1.5

try:
#Publish the command to the robot
self.pub.publish(twist)
rospy.wait_for_service('/gazebo/get_model_state')
gms = rospy.ServiceProxy('/gazebo/get_model_state', GetModelState)
resp = gms(self.pose_handler.model_name,'world')
print >>sys.__stdout__,'resp:' + str(resp)
except:
print 'Error publishing Twist Command'