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

How to move a differential drive robot to target Co-ordinates?

asked 2016-11-02 15:30:09 -0500

Kishore Kumar gravatar image

I want to move a differential drive robot to a target co-ordinate(X = 50, Y = -50 ) from home position (X=0, Y=0) and return back to home position. The max distance the robot has to move is 20 meters.

I don't want to complicate it using navigation stack because it is very simple application. How to accomplish this in ROS using odometry feedback.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-03 10:38:12 -0500

lucasw gravatar image

Every update step you could find the transform of the target frame in your robot vehicle frame, and then extract the x linear distance to the target, and the yaw rotation (see for a recent example), and give your differential drive a linear x command proportional to the x distance and an angular z command proportional to the yaw. Ideally your differential drive accepts a cmd_vel Twist message and that linear x and angular z go straight into it.

edit flag offensive delete link more



If your drive doesn't take Twist messages but rather individual wheel values, you can use the code from my cmd_vel linear and angular relationship post.

kramer gravatar image kramer  ( 2016-11-04 07:38:37 -0500 )edit

Question Tools

1 follower


Asked: 2016-11-02 15:30:09 -0500

Seen: 968 times

Last updated: Nov 03 '16