Dear all, typedef actionlib::SimpleActionClient MoveBaseClient; MoveBaseClient _move_base_client; if( actionlib::SimpleClientGoalState::ACTIVE == _move_base_client.getState().state_ || actionlib::SimpleClientGoalState::PENDING == _move_base_client.getState().state_ ) { _move_base_client.cancelAllGoals(); } leads to ERROR] [1290088710.616548792]: To transition to a succeeded state, the goal must be in a preempting or active state, it is currently in state: 2 or [ERROR] [1290088710.631738950]: To transition to a cancelled state, the goal must be in a pending, recalling, active, or preempting state, it is currently in state: 2 state=2 should be RECALLED or am I wrong. If the state is 2 than cancelAllGoals should never be called.