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

Navigation Stack for only forward motion

asked 2015-07-20 05:31:48 -0500

miguel gravatar image

updated 2015-07-20 05:34:05 -0500

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-20 07:21:47 -0500

mgruhler gravatar image

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)

edit flag offensive delete link more

Comments

Thank you, that makes sense, would it be a bad idea to do this for any reason?

miguel gravatar image miguel  ( 2015-07-20 09:56:02 -0500 )edit

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.

mgruhler gravatar image mgruhler  ( 2015-07-20 10:07:16 -0500 )edit

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?

miguel gravatar image miguel  ( 2015-07-20 10:32:57 -0500 )edit

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.

mgruhler gravatar image mgruhler  ( 2015-07-21 00:43:22 -0500 )edit

Oh ok I understand, so the controller is the one who decides how to interpret the Twist message. Thanks for your help.

miguel gravatar image miguel  ( 2015-07-21 02:09:02 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-07-20 05:31:48 -0500

Seen: 800 times

Last updated: Jul 20 '15