0
$\begingroup$

Rosanswers logo

I'm testing simple navigation for my robot using Gazebo and RViz. Each time I set a 2D nav goal in RViz I get a log indicating that the local planner failed to find a path. This continues for a bit until it enters the rotate recovery behaviour and then immediately it finds a plan that works. Now I'm trying to find out why it doesn't work before the rotation but does after the rotation.

However the log doesn't tell me very much, so I'm wanting to increase the logging verbosity for the planner only. I've created a config file at /home/me/ros_ws/rosconsole.config to change the logging verbosity, with the following contents

log4j.logger.ros=INFO
log4j.logger.ros.dwa_local_planner=DEBUG

However that doesn't seem to do the trick.

My question is how can I figure out what the correct packages and type names are for the DWALocalPlanner(this one: https://github.com/ros-planning/navigation/blob/noetic-devel/dwa_local_planner/src/dwa_planner.cpp), the SimpleScoredSamplingPlanner (this one: https://github.com/ros-planning/navigation/blob/noetic-devel/base_local_planner/src/simple_scored_sampling_planner.cpp) and the different cost functions so that I can see what they are actually doing. The documentation just says that you need the correct names but not how to figure out from the source code what those names are. And the documentation for the DWA local planner doesn't mention log levels / package names etc. either.

And yes I'm aware of the rqt_gui but that doesn't show me the names for the specific types either.


Originally posted by petrik on ROS Answers with karma: 23 on 2022-03-08

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you want to edit specific nodes logging verbosity level you also have to tell the node to use your rosconsole.config file if its not found in default path

rosconsole will load a config file from $ROS_ROOT/config/rosconsole.config when it initializes.

This can be done by pointing the env variable named ROSCONSOLE_CONFIG_FILE to your config path. For example:

<launch>

  ...
  <env name="ROSCONSOLE_CONFIG_FILE" value="$(find my_config_pkg)/rosconsole.conf"/>

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
      <rosparam file="$(find my_robot_name_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" /> 
   </node>

  ...

</launch> 

Read more at: http://wiki.ros.org/rosconsole


Originally posted by Silvis with karma: 16 on 2022-03-10

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by petrik on 2022-03-10:
The documentation for rosconsole also states

rosconsole will load a config file from $ROS_ROOT/config/rosconsole.config when it initializes.

rosconsole also lets you define your own configuration file that will be used by log4cxx, defined by the 
ROSCONSOLE_CONFIG_FILE environment variable. Anything defined in this config file will override the
default config file.

And I have set the ROSCONSOLE_CONFIG_FILE environment variable to point to the file in the original post. My bad, I should have mentioned that.

Also I have tried the rqt gui with the logger settings but I can't find the settings for the DWALocalPlanner (not the DWAPlannerRos code).

Comment by petrik on 2022-03-17:
Ok I think I figured it out. I was thinking that the missing log messages from the DWALocalPlanner were due to me not setting the log level correctly, however it looks like the problem (in my case) is that the planner doesn't generate any plans until a recovery rotate happens. After that it finds a viable path and uses it. So the missing log messages weren't actually missing, the code that generates the log messages was never hit.

$\endgroup$

Your Answer

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