-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3422f5
commit 9d909db
Showing
8 changed files
with
367 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
...cebot_mine_ue/include/sm_dancebot_mine_ue/states/st_navigate_reverse_mine_waypoints_x.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright 2021 RobosoftAI Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/***************************************************************************************************************** | ||
* | ||
* Authors: Pablo Inigo Blasco, Brett Aldrich | ||
* | ||
******************************************************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include <smacc2/smacc.hpp> | ||
|
||
namespace sm_dancebot_mine_ue | ||
{ | ||
|
||
// STATE DECLARATION | ||
struct StNavigateReverseMineWaypointsX : smacc2::SmaccState<StNavigateReverseMineWaypointsX, MsDanceBotRunMode> | ||
{ | ||
using SmaccState::SmaccState; | ||
|
||
// CUSTOM TRANSITION TAGS | ||
struct TRANSITION_1 : SUCCESS{}; | ||
struct TRANSITION_2 : SUCCESS{}; | ||
struct TRANSITION_3 : SUCCESS{}; | ||
struct TRANSITION_4 : SUCCESS{}; | ||
struct TRANSITION_5 : SUCCESS{}; | ||
struct TRANSITION_6 : SUCCESS{}; | ||
|
||
// TRANSITION TABLE | ||
typedef mpl::list< | ||
Transition<cl_nav2z::EvWaypointFinal, StFinalState, SUCCESS>, | ||
Transition<EvCbSuccess<CbNavigateNextWaypointFree, OrNavigation>, StNavigateReverseMineWaypointsX, TRANSITION_1> | ||
>reactions; | ||
|
||
// STATE FUNCTIONS | ||
static void staticConfigure() | ||
{ | ||
configure_orthogonal<OrNavigation, CbNavigateNextWaypointFree>(); | ||
} | ||
|
||
void onEntry() | ||
{ | ||
} | ||
|
||
void runtimeConfigure() {} | ||
|
||
void onExit(ABORT) | ||
{ | ||
} | ||
}; | ||
} // namespace sm_dancebot_mine_ue |
58 changes: 58 additions & 0 deletions
58
...ference_library/sm_dancebot_mine_ue/include/sm_dancebot_mine_ue/states/st_turn_around.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Copyright 2021 RobosoftAI Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/***************************************************************************************************************** | ||
* | ||
* Authors: Pablo Inigo Blasco, Brett Aldrich | ||
* | ||
******************************************************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include <smacc2/smacc.hpp> | ||
|
||
namespace sm_dancebot_mine_ue | ||
{ | ||
using namespace smacc2::default_events; | ||
using smacc2::client_behaviors::CbSleepFor; | ||
using namespace std::chrono_literals; | ||
|
||
// STATE DECLARATION | ||
struct StTurnAround : smacc2::SmaccState<StTurnAround, MsDanceBotRunMode> | ||
{ | ||
using SmaccState::SmaccState; | ||
|
||
// TRANSITION TABLE | ||
typedef mpl::list< | ||
// Transition<EvCbSuccess<CbPureSpinning, OrNavigation>, StNavigateReverseMineWaypointsX, SUCCESS> | ||
Transition<EvCbSuccess<CbSleepFor, OrNavigation>, StNavigateReverseMineWaypointsX, SUCCESS> | ||
|
||
>reactions; | ||
|
||
// STATE FUNCTIONS | ||
static void staticConfigure() | ||
{ | ||
// configure_orthogonal<OrNavigation, CbPureSpinning>(M_PI, 0.8); | ||
configure_orthogonal<OrNavigation,CbSleepFor>(2s); | ||
configure_orthogonal<OrNavigation, sm_dancebot_mine_ue::CbLoadWaypointsFile>("waypoints_mine_reverse", "sm_dancebot_mine_ue"); | ||
} | ||
|
||
void runtimeConfigure() | ||
{ | ||
// auto spinningBehavior = this->getOrthogonal<OrNavigation>()->getClientBehavior<CbPureSpinning>(); | ||
// spinningBehavior->yaw_goal_tolerance_rads_ = 0.2; | ||
|
||
} | ||
}; | ||
} // namespace sm_dancebot_ue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.