ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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();
2 | No.2 Revision |
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 = 3 | No.3 Revision |
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();