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

How to detect when move_base is executing recovery behaviors

asked 2020-01-31 08:05:00 -0500

schizzz8 gravatar image

Hi all,

My problem is the following. When a robot is stuck and move_base is not able to find a valid plan I can see on rqt_console the corresponding ERROR and WARN messages:

image description

In this case, there's no path to the goal and move_base starts its recovery behaviors.

My question is: if I want to write a simple subscriber that is able to detect this situation (e.g. so that it can warn somehow the user) to which topic should I listen and how can I intercept this message?

Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2020-02-02 01:24:03 -0500

the page about rqt_console has the answer to this "rqt_console is a viewer in the rqt package that displays messages being published to rosout". You would also be able to see this in rqt_graph by deselecting the hide debug box so that nodes that are providing information about the system are visible (nodes considered debug are hidden by default as they involved in introspecting the system, rather than directly contributing to the robots behaviour, so are usually a distraction to what you are trying to see in the graph).

edit flag offensive delete link more
1

answered 2021-04-08 08:43:20 -0500

Ahmed Osman gravatar image

you can subscribe to /move_base/recovery_status topic

edit flag offensive delete link more

Comments

When I subscribe teh topic, I meet the error: error: ‘RecoveryStatus’ in namespace ‘move_base_msgs’ does not name a type 7 | void RecoveryCallback(const move_base_msgs::RecoveryStatus msg){ and below as my code :

include <ros ros.h="">

include <iostream>

include <geometry_msgs twist.h="">

include <unistd.h>

include <move_base_msgs movebaseactiongoal.h="">

void RecoveryCallback(const move_base_msgs::RecoveryStatus msg){

} using namespace std; int main(int argc,char** argv) { ros::init(argc, argv, "cmdveltest"); ros::NodeHandle nh; ros::Subscriber sub_recovery = nh.subscribe("/move_base/recovery_status", RecoveryCallback); ros::spin(); return 0; }

lsw gravatar image lsw  ( 2021-09-09 08:46:51 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-01-31 08:05:00 -0500

Seen: 648 times

Last updated: Apr 08 '21