Exploration stack on p3dx
I am setting up exploration stack on p3dx with gmapping.
When I launch the exploration node I get the following warning repeatedly
The base_scan observation buffer has not been updated for 3.05 seconds, and it should be updated every 0.20 seconds.
How should I resolve this? The robot rotates in the same position and after a while the exploration stops. Any problem with the base_scan topic here? Is this problem causing exploration to stop early?
Update
Just to verify what I did. 1) I set staticmap to false and rollingwindow to "true" 2) I am not running amcl node for localization 3) Set the expectedupdaterate for base_scan to 0.2
Am I right?
The "base_scan not updated" warning comes from the explore node.
The following warning comes from move_base node
The robot's start position is off the global costmap. Planning will always fail, are you sure the robot has been properly localized?
Should I post all my configuration files?
Update
globalcostmapparams.yaml
globalcostmap:
globalframe: /map
robotbaseframe: baselink
updatefrequency: 5.0
static_map: false
localcostmapparams.yaml
localcostmap: globalframe: odom
robotbaseframe: baselink
updatefrequency: 5.0
publishfrequency: 2.0
staticmap: false
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.05
baselocalplanner_params.yaml
TrajectoryPlannerROS:
maxvelx: 0.45
minvelx: 0.1
maxrotationalvel: 1.0
mininplacerotationalvel: 0.4
acclimth: 3.2
acclimx: 2.5
acclimy: 2.5
holonomic_robot: true
costmapcommonparams.yaml
obstaclerange: 3.0
raytracerange: 3.5
footprint: [[-0.2, 0.2], [-0.2, -0.2], [0.2, 0.2], [0.2, -0.2]]
inflationradius: 0.55
observationsources: laserscansensor
laserscansensor: {sensorframe: /laser, datatype: LaserScan, topic: basescan, marking: true, clearing: true, expectedupdate_rate: 0.5}
Update
move_base log
[roscppinternal] [2011-03-19 18:07:31,567] [thread 0xb6906740]: [DEBUG] XML-RPC call [searchParam] returned an error (-1): [Cannot find parameter [footprintpadding] in an upwards search]
[roscppinternal] [2011-03-19 18:07:37,936] [thread 0xb6906740]: [DEBUG] Publisher update for [/odom]: already have these connections:
[roscpp_internal] [2011-03-19 18:07:37,962] [thread 0xb6906740]: [DEBUG] XML-RPC call [searchParam] returned an error (-1): [Cannot find parameter [controllerfrequency] in an upwards search]
[ros.baselocalplanner] [2011-03-19 18:07:37,962] [thread 0xb6906740]: [INFO] Sim period is set to 0.05
[roscppinternal] [2011-03-19 18:07:38,002] [thread 0xb6906740]: [DEBUG] XML-RPC call [getParam] returned an error (-1): [Parameter [/movebase/TrajectoryPlannerROS/backupvel] is not set]
[roscpp_internal] [2011-03-19 18:07:38,003] [thread 0xb6906740]: [DEBUG] XML-RPC call [getParam] returned an error (-1): [Parameter [/movebase/TrajectoryPlannerROS/escapevel] is not set]
[roscpp_internal] [2011-03-19 18:07:38,010] [thread 0xb6906740]: [DEBUG] XML-RPC call [getParam] returned an error (-1): [Parameter [/movebase/TrajectoryPlannerROS/yvels] is not set]
[ros.costmap_2d] [2011-03-19 18:07:39,407] [thread 0xa869fb70]: [WARN] The basescan observation buffer has not been updated for 0.79 seconds, and it should be updated every 0.50 seconds.
[ros.costmap2d] [2011-03-19 18:07:40,407] [thread 0xa869fb70]: [WARN] The basescan observation buffer has not been updated for 1.79 seconds, and it should be updated every 0.50 seconds.
Launch files
robotconfiguration.launch
<launch >
<node pkg="p2os
dashboard" type="p2osdashboard" name="p2osdashboard" output="screen" >
< /node >
<node pkg="p2os_driver" type="p2os" name="p2os" output="screen" >
</node>
<node pkg="sicktoolbox_wrapper" type="sicklms" name="sicklms" output="screen">
<param name="port" value="/dev/ttyUSB1" />
<param name="baud" value="38400" />
<param name="resolution" value="1.0" />
</node>
</launch>
move_base.launch
<launch> <!-- Run the map server --> <node name="map_server" pkg="map_server" type="map_server" args="$(find navigation_pkg)/map.yaml"/> <!--- Run AMCL --> <include file="$(find amcl)/examples/amcl_diff.launch" /> <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"> <rosparam file="$(find navigation_pkg)/costmap_common_params.yaml" command="load" ns="global_costmap" /> <rosparam file="$(find navigation_pkg)/costmap_common_params.yaml" command="load" ns="local_costmap" /> <rosparam file="$(find navigation_pkg)/local_costmap_params.yaml" command="load" /> <rosparam file="$(find navigation_pkg)/global_costmap_params.yaml" command="load" /> <rosparam file="$(find navigation_pkg)/base_local_planner_params.yaml" command="load" /> </node> </launch>
Asked by Aravindhan K Krishnan on 2011-03-16 02:06:10 UTC
Answers
Can you tell which node is throwing this warning? You can use rxconsole for that.
I think one of your node expects laser scans at 5 Hz and your hardware is somehow not powerful enough to deliver the scans on time. I would be on the local costmap and the parameter update_frequency, but I am not sure.
check for example local_costmap_params.yaml:
local_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.05
If I am right, check the documentation of costmap_2d and this navigation tutorial, it explains how to set your parameters. If you find which node throws this warning, you can look at its parameters in the wiki.
Relative to the rotation behavior, have a look at these posts on the ros user list. They discuss the problem of rotating robots.
- Navigation stack: robot starts rotating upon recieving goal
- Navigation Stack: the robot rotates most of the time after receiving a goal
Please post your findings, I am curious. :)
Raph
Asked by raphael favier on 2011-03-16 10:17:46 UTC
Comments
I have posted the move_base log above. Might be helpful. This is the log after the crash
Asked by Aravindhan K Krishnan on 2011-03-19 00:49:18 UTC
What should I do if the laser_scans are not transformed to the global frame at the expected rate.? I have changed the update_frequency to 1.0 in the configuration files. Still, the same problem. Anything else I should try?
Asked by Aravindhan K Krishnan on 2011-03-19 00:43:20 UTC
I am now trying a very basic setup of the navigation stack, without the explore node. I get the "The base_scan observation buffer has not been updated" warning from move_base node and later move_base crashes with the following error "terminate called after throwing an instance of std::bad_alloc"
Asked by Aravindhan K Krishnan on 2011-03-19 00:41:05 UTC
I think it may also be possible to see that warning if the costmaps cannot transform the laser scans into their global_frame at the expected rate, but I can't remember if that is definitely the case.
Asked by Eric Perko on 2011-03-16 11:16:14 UTC
Hello Aradvindhan,
May I ask a few more questions, exploring Eric's suggestion:
Which laser scanner are you using? Can you actually see your laser scans in rviz in a simple setup? What frame are they published in (are you sure their frame is /laser?
When you run rosrun tf view_frames while your nodes are running, it generates a tf graph with the publishing frequencies of each transform. Have a look at the transform tree from your laser scanner (/laser) to the robot frame (/base_link), what are the publishing rates for these transforms?
Raph
Asked by raphael favier on 2011-03-19 00:58:22 UTC
Comments
I added the missing parameters in base_local_planner_params.yaml. It didn't make any difference.
Asked by Aravindhan K Krishnan on 2011-03-20 02:40:41 UTC
Ok all is good on that side then. From the move_base log, it seems one node is not running (move_base cannot find some parameters). Can you post your launchfiles?
Asked by raphael favier on 2011-03-19 01:29:54 UTC
I am using SICK LMS 200. Yes, I can see the laser scans in rviz, and the frame is /laser. I can see this when I do "rosrun tf view_frames". The tf tree is map->odom->base_link->laser. Is this the right tf? The publishing rates are 9.57, 10.20 and 10.19 Hz respectively.
Asked by Aravindhan K Krishnan on 2011-03-19 01:19:56 UTC
Comments
I guess memory allocation is failing in move_base.cpp. There were few memory allocations in move_base.cpp.
Asked by Aravindhan K Krishnan on 2011-03-19 22:55:23 UTC
I am not sure if this observation would help, bringing it to notice though. When "base_scan observation buffer.." warning comes up, there is a rapid increase in memory usage. The free memory (command - "free -m") reduces rapidly from 2GB to 100 MB and then the bad_alloc exception is thrown.
Asked by Aravindhan K Krishnan on 2011-03-19 22:52:54 UTC
I am publishing base_link->laser tf using static transform publisher. When I do "rosrun tf view_frames" "The Most recent transform" for base_link->laser says " -0.040 secs old" . Curious to know if the negative value is fine.. For other tfs its positive i.e, 0.078 and 0.073.
Asked by Aravindhan K Krishnan on 2011-03-19 21:08:05 UTC
Added the parameters footprint_padding and controller_frequency.. No luck.!
Asked by Aravindhan K Krishnan on 2011-03-19 20:37:36 UTC
try to add the parameters footprint_padding and controller_frequency as in http://www.ros.org/wiki/move_base_stage/Tutorials/stage%20and%20navigation%20stack section 7.6 in move_base.yaml/ Also, please try to format your posts a bit more. Use the GUI and the preview field. It gets very hard reading this conversation
Asked by raphael favier on 2011-03-19 07:20:19 UTC
The warning in my initial question comes from /explore node
Asked by Aravindhan K Krishnan on 2011-03-17 05:03:49 UTC
yes.. I did follow the same tutorial.. Will post the configuration files in couple of mins.
Asked by Aravindhan K Krishnan on 2011-03-17 04:54:43 UTC
Also check the comment of Eric. He thinks that the problem might come from a tf publisher not publishing fast enough the transform between your laser sensor and the global frame (chosen in the config files). You could check your tf frames by running your software and running "rosrun tf view_frames" in another terminal. Generaly, did you follow this tutorial when setting your robot up? http://www.ros.org/wiki/navigation/Tutorials/RobotSetup
Asked by raphael favier on 2011-03-17 04:23:58 UTC
mmmhhh.. but which nodes gives you the warning you wrote in your initial question? I guess you must have 3 or 4 config files. Could you post all of them?
Asked by raphael favier on 2011-03-17 04:19:37 UTC
/explore node gives "base_scan not updated warning". /move_node gives "The robot's start position.. " warning.. The rxgraph can be found at https://picasaweb.google.com/110788714639433489887/ROSExplorationStack#5585070225405574658. Any specific configuration file you want me to post?
Asked by Aravindhan K Krishnan on 2011-03-17 03:25:50 UTC
Aravindhan, please tell us which node is throwing the warnings. (use rxconsole). Can you also post a screenshot of your rxgraph. Posting your config files can help too.
Asked by raphael favier on 2011-03-17 02:30:13 UTC