how do I implement a proportional drive in stageros? [closed]

asked 2015-10-19 20:50:49 -0600

ryuuka gravatar image

updated 2015-10-20 03:50:35 -0600

gvdhoorn gravatar image

my omnidirectional robot on stageros can follow a graph.. what's the easiest way to implement a proportional drive in this situation?

 while (ros :: ok())
    {

            geometry_msgs::Twist msg;


        if((grafo[0][1])&&t)
        {
            msg.linear.x = (nodos[v[t-1]].x-nodos[v[t]].x)/(grafo[0][1]);
            msg.linear.y = (nodos[v[t-1]].y-nodos[v[t]].y)/(grafo[0][1]);

            if(fabs(start.y-(nodos[v[t-1]].y))<1&&fabs(start.x-(nodos[v[t-1]].x))<1)
            {
                t--;
            }
        }

            pub.publish(msg);

            ros :: spinOnce();
            rate.sleep();
    }
}
edit retag flag offensive reopen merge delete

Closed for the following reason Question does not follow our guidelines for questions. Please see: http://wiki.ros.org/Support for more details. by tfoote
close date 2015-10-27 17:13:41.250106

Comments

Please reask your question with more details. There is not enough information here to reproduce or diagnose your problem. See http://wiki.ros.org/Support for guidelines on asking questions.

tfoote gravatar image tfoote  ( 2015-10-27 17:13:35 -0600 )edit