0
$\begingroup$

Rosanswers logo

Is it possible to implement the navigation stack only allowing forward motion on a differential drive robot?

The reason being that gmapping is sending reverse commands and I only have sensors on the front of the robot, therefore sometimes it reverses into things. Im using frontier exploration if that information is needed.

Also I suppose would frontier exploration need backwards motion?


Originally posted by miguel on ROS Answers with karma: 170 on 2015-07-20

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi Miguel,

I'll try to shed some light on this.

Obviously, you can implement the desired behaviour yourself. This would mean implementing a local planner following the 'nav_core::BaseLocalPlanner' interface (see the nav_core documentation).

gmapping is actually "just" doing map building, thus, it does not send any commands. frontier_exploration also just sends goals in terms of geometry_msgs::PoseStamped using the move_base_msgs/MoveBaseAction interface to the move_basenode. move_base is actually the one creating the movement commands.

Thus, you would need to adapt the parameters of you local planner (and probably of you global planner) to achieve the respective behaviour.

Check out the move_base documentation and especially the one for the dwa_local_planner. I guess you can achieve what you want by setting the parameter ~<name>/min_vel_x for the dwa_local_planner, if you have configured it as local planner in the move_basenode. (I'm not sure, if this works for base_local_planner as well)


Originally posted by mgruhler with karma: 12390 on 2015-07-20

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by miguel on 2015-07-20:
Thank you, that makes sense, would it be a bad idea to do this for any reason?

Comment by mgruhler on 2015-07-20:
You mean only driving forwards? As long as the robot is able to turn on the spot, I don't see any drawback. Otherwise, you might get trapped.

Comment by miguel on 2015-07-20:
But turning on the spot would require one of the wheels to go backwards? Or will it just turn one wheel forward rather than one back and one forward?, Or is this separate from actually reversing?

Comment by mgruhler on 2015-07-21:
This actually depends on the robot you have. move_base has a geometry_msgs::Twist interface. It just sends velocities with respect to the base_link (usually). Thus, if it sends the command to turn, i.e. only rotational velocity, it depends of the controller of your robot what it actually does.

Comment by miguel on 2015-07-21:
Oh ok I understand, so the controller is the one who decides how to interpret the Twist message. Thanks for your help.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.