multiple gazebo robots acts differently while given the same order.

asked 2016-11-20 00:55:33 -0600

ganam gravatar image

updated 2016-11-21 01:33:52 -0600

i'm running a simulation where I spawn two models of my robot in gazebo and give them the same order to walk in a circle I'm using different name spaces for every robot and able to publish each robot's order separately. i defined two publishers for each robot :

 ros::Publisher publisher =
 n.advertise<geometry_msgs::Twist>("/gazebo/robot1/velocity_command", 10);

  ros::Publisher publisher1 =
 n.advertise<geometry_msgs::Twist>("/gazebo/robot2/velocity_command", 10);

then i published the same predefined geometry message for each one :

 while (ros::ok())
           { 
          publisher.publish(msg);
           publisher1.publish(msg);
           ros::spinOnce();
           loop_rate.sleep();
           }

both robots move well for a short time. then they start to deviate from each other drastically. I just can't imagine what would cause this.

edit retag flag offensive close merge delete