{"action":"created","issue":{"url":"https://api.github.com/repos/ros-planning/navigation/issues/299","labels_url":"https://api.github.com/repos/ros-planning/navigation/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/ros-planning/navigation/issues/299/comments","events_url":"https://api.github.com/repos/ros-planning/navigation/issues/299/events","html_url":"https://github.com/ros-planning/navigation/pull/299","id":54467103,"number":299,"title":"Stop global planner at reset, preventing unwanted movement towards old goal","user":{"login":"OkkeHendriks","id":3514136,"avatar_url":"https://avatars.githubusercontent.com/u/3514136?v=3","gravatar_id":"","url":"https://api.github.com/users/OkkeHendriks","html_url":"https://github.com/OkkeHendriks","followers_url":"https://api.github.com/users/OkkeHendriks/followers","following_url":"https://api.github.com/users/OkkeHendriks/following{/other_user}","gists_url":"https://api.github.com/users/OkkeHendriks/gists{/gist_id}","starred_url":"https://api.github.com/users/OkkeHendriks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OkkeHendriks/subscriptions","organizations_url":"https://api.github.com/users/OkkeHendriks/orgs","repos_url":"https://api.github.com/users/OkkeHendriks/repos","events_url":"https://api.github.com/users/OkkeHendriks/events{/privacy}","received_events_url":"https://api.github.com/users/OkkeHendriks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-15T16:07:41Z","updated_at":"2015-01-17T23:24:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ros-planning/navigation/pulls/299","html_url":"https://github.com/ros-planning/navigation/pull/299","diff_url":"https://github.com/ros-planning/navigation/pull/299.diff","patch_url":"https://github.com/ros-planning/navigation/pull/299.patch"},"body":"The robot keeps navigating towards an old goal, either for undetermined period of time or until the global planner finds a new path. \r\n\r\nIn order to recreate this:\r\n* Give a navigation goal\r\n* While the robot is navigating, preempt the goal.\r\n* Give another navigation goal to a point which is, at that moment, unreachable (such that the global planner cannot plan a path immediately). It will then continue to move toward the old goal. \r\n\r\nEven when the global planner does not find a goal at all, the local planner will still follow the last plan it got.\r\n\r\nThis happens, in my believe, due to the fact that the planThread in move base (https://github.com/ros-planning/navigation/blob/hydro-devel/move_base/src/move_base.cpp) can generate a new plan after the goal has been preempted and thereby advances the move_base state-machine to the CONTROLLING state (https://github.com/ros-planning/navigation/blob/hydro-devel/move_base/src/move_base.cpp#L643).\r\n\r\nThis happens even though the state-machine has been reset to PLANNING (https://github.com/ros-planning/navigation/blob/hydro-devel/move_base/src/move_base.cpp#L753, https://github.com/ros-planning/navigation/blob/hydro-devel/move_base/src/move_base.cpp#L1154).\r\n\r\nIn order to fix this runPlanner_ should be set to false at the resetState function, before setting the state-machine to PLANNING."},"comment":{"url":"https://api.github.com/repos/ros-planning/navigation/issues/comments/70389093","html_url":"https://github.com/ros-planning/navigation/pull/299#issuecomment-70389093","issue_url":"https://api.github.com/repos/ros-planning/navigation/issues/299","id":70389093,"user":{"login":"mikeferguson","id":899410,"avatar_url":"https://avatars.githubusercontent.com/u/899410?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeferguson","html_url":"https://github.com/mikeferguson","followers_url":"https://api.github.com/users/mikeferguson/followers","following_url":"https://api.github.com/users/mikeferguson/following{/other_user}","gists_url":"https://api.github.com/users/mikeferguson/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeferguson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeferguson/subscriptions","organizations_url":"https://api.github.com/users/mikeferguson/orgs","repos_url":"https://api.github.com/users/mikeferguson/repos","events_url":"https://api.github.com/users/mikeferguson/events{/privacy}","received_events_url":"https://api.github.com/users/mikeferguson/received_events","type":"User","site_admin":false},"created_at":"2015-01-17T23:24:40Z","updated_at":"2015-01-17T23:24:40Z","body":"Looks like you can fix this branch by doing:\r\n\r\n```\r\ngit reset HEAD~1\r\n```\r\n\r\nto get rid of that merge (thats how I got https://github.com/mikeferguson/navigation/tree/bug/stop_global_planner_at_preempt)\r\n"}}