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

Implementing basic roam/avoid behaviours?

asked 2015-02-03 06:16:03 -0500

MarkyMark2012 gravatar image


Looking for advise on what is a reasonable approach re: initially implementing a simple roam/avoid behaviour?

I do want to get this to progress to autonomous map building and navigation. I'm not sure what the best way to build up to this.

One way I know I can achieve this is to have a node subscribing to the laser scan and issuing fwd/left/right/rev commands depending on the distances reported from the laser scan. I wanted to know if there is a more "out of the box" ROS way to achieve this?

I have the raw messages and topics available (tf, odom, cmd_vel, laser_scan) and I've used "steering" in rqt to drive the robot and have looked at the links below, not sure if they are quite what I want at the moment (I know I'll need them later)



edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-02-03 06:27:50 -0500

Sebastian Kasperski gravatar image

updated 2015-02-06 02:25:55 -0500

We did something similar in a robotics project some time ago. Our nodes for basic obstacle avoidance and autonomous mapping can be found at . Maybe this can help.

There are 3 particularly important packages/nodes:

  • nav2d_operator (basic obstacle avoidance) drives in a desired direction avoiding anything in the path
  • nav2d_navigator (path planner) uses a map to navigate to a given goal
  • nav2d_karto (slam) generates a map of the environment while driving
edit flag offensive delete link more


Hi Sebastian,

Thanks for this - which node is responsible for just roaming around (Will is just issue drive fwd until the sensor detects an obstical adn then turn away?)- from looking at is it its building a map regardless?



MarkyMark2012 gravatar image MarkyMark2012  ( 2015-02-06 01:56:20 -0500 )edit

Thanks - I'll start off looking at nav2d_operator and see how I get on.

MarkyMark2012 gravatar image MarkyMark2012  ( 2015-02-06 08:46:15 -0500 )edit

Hi Sebastian - where would I find this cmd.h file - getting compilation error



fatal error: nav2d_operator/cmd.h: No such file or directory
#include <nav2d_operator/cmd.h>
MarkyMark2012 gravatar image MarkyMark2012  ( 2015-02-09 15:06:33 -0500 )edit

This is a ROS-message header, which should be created during the build process and go into ...catkin_ws/devel/include/nav2d_operator/cmd.h

Sebastian Kasperski gravatar image Sebastian Kasperski  ( 2015-02-10 10:30:41 -0500 )edit

Question Tools

1 follower


Asked: 2015-02-03 06:16:03 -0500

Seen: 191 times

Last updated: Feb 06 '15