{"action":"closed","issue":{"url":"https://api.github.com/repos/ros-planning/navigation/issues/408","labels_url":"https://api.github.com/repos/ros-planning/navigation/issues/408/labels{/name}","comments_url":"https://api.github.com/repos/ros-planning/navigation/issues/408/comments","events_url":"https://api.github.com/repos/ros-planning/navigation/issues/408/events","html_url":"https://github.com/ros-planning/navigation/issues/408","id":121699076,"number":408,"title":"With Rolling Window on, costmap_2d not properly updating bounds and costs in the static layer","user":{"login":"palmieri","id":5583059,"avatar_url":"https://avatars.githubusercontent.com/u/5583059?v=3","gravatar_id":"","url":"https://api.github.com/users/palmieri","html_url":"https://github.com/palmieri","followers_url":"https://api.github.com/users/palmieri/followers","following_url":"https://api.github.com/users/palmieri/following{/other_user}","gists_url":"https://api.github.com/users/palmieri/gists{/gist_id}","starred_url":"https://api.github.com/users/palmieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palmieri/subscriptions","organizations_url":"https://api.github.com/users/palmieri/orgs","repos_url":"https://api.github.com/users/palmieri/repos","events_url":"https://api.github.com/users/palmieri/events{/privacy}","received_events_url":"https://api.github.com/users/palmieri/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-11T12:23:56Z","updated_at":"2016-01-17T23:35:20Z","closed_at":"2016-01-17T23:35:20Z","body":"Hi All,\r\n\r\nWhen setting `rolling_window` to true and `static_map` to false and having as loaded plugins a `Static Layer` , an `Obstacle Layer` and the `Inflation Layer`, the costmap_2d is not properly updating the bounds and the costs of the rolling map.\r\n\r\nExample\r\n\r\nInitial Map:\r\n![initialmap](https://cloud.githubusercontent.com/assets/5583059/11742832/1f6321a4-a003-11e5-825c-ec5ad696e545.png)\r\n\r\nWhile Moving: \r\n![rviz_screenshot_2015_12_11-12_29_16](https://cloud.githubusercontent.com/assets/5583059/11742804/ea471016-a002-11e5-8dba-b4d115ebfb75.png)\r\n\r\nHere the parameters used to launch the costmap:\r\n[globalcostmap.txt](https://github.com/ros-planning/navigation/files/59338/globalcostmap.txt)\r\n\r\n\r\nWhile rolling the costmap_2d is updating the costs only in a smaller window, the bounds are not properly updated.\r\n\r\n\r\nTo avoid the issue, the lines 261-2 of the file `costmap_2d/plugins/static_layer.cpp`\r\n```c++\r\n  if (!map_received_ || !(has_updated_data_ || has_extra_bounds_))\r\n    return;\r\n```\r\n\r\ncould be changed into:\r\n```c++\r\n  if( !layered_costmap_->isRolling() ){\r\n    if ( !map_received_ || !(has_updated_data_ || has_extra_bounds_))\r\n        return;\r\n  }\r\n```\r\n\r\nI hope I didn't miss anything in the parameters that would solve this issue. If it is needed I can create a pull request for that.\r\n\r\n\r\nBest,\r\n\r\nLuigi\r\n"}}