ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One Idea: Subscribe to current pose topic and publish to /cmd_vel.

Using your current robot pose and desired pose you can write a simple P controller. Based on how far they are apart and how your reference frame of you robot.

Random example:

twist_.linear.x = 2.0; // or based on distance between(current pose, desired pose) twist_.linear.y = 0.0; twist_.linear.z = 0.0; twist_.angular.x = 0.0; twist_.angular.y = 0.0; twist_.angular.z = -pGain*sin();

One Idea: Subscribe to current pose topic and publish to /cmd_vel.

Using your current robot pose and desired pose you can write a simple P controller. Based on how far they are apart and how your reference frame of you robot.

Random example:

twist_.linear.x = 2.0; // or based on distance between(current pose, desired pose)
twist_.linear.y = 0.0;
twist_.linear.z = 0.0;
twist_.angular.x = 0.0;
twist_.angular.y = 0.0;
twist_.angular.z = -pGain*sin();

-pGain*sin();

One Idea: Subscribe to current pose topic and publish to /cmd_vel.

Using your current robot pose and desired pose you can write a simple P controller. Based on how far they are apart and how your reference frame of you robot.

Random example:

geometry_msgs::Twist twist_;
twist_.linear.x = 2.0; // or based on distance between(current pose, desired pose)
twist_.linear.y = 0.0;
twist_.linear.z = 0.0;
twist_.angular.x = 0.0;
twist_.angular.y = 0.0;
twist_.angular.z = -pGain*sin();