-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathmain.cpp
More file actions
28 lines (23 loc) · 856 Bytes
/
Copy pathmain.cpp
File metadata and controls
28 lines (23 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "quadruped_wheel/qw_state_machine.hpp"
#ifdef USE_SIMULATION
#define BACKWARD_HAS_DW 1
#include "backward.hpp"
namespace backward{
backward::SignalHandling sh;
}
#endif
using namespace types;
MotionStateFeedback StateBase::msfb_ = MotionStateFeedback();
int main(int argc, char** argv){
std::cout << "State Machine Start Running" << std::endl;
rclcpp::init(argc, argv);
// Choose the input interface by changing RemoteCommandType below:
// kKeyBoard = 0: keyboard (default); kGamepad = 1: gamepad;
// kRos2 = 2: ROS 2 topics. Rebuild and restart rl_deploy after changing it.
std::shared_ptr<StateMachineBase> fsm = std::make_shared<qw::QwStateMachine>(RobotName::M20, RemoteCommandType::kKeyBoard);
fsm->Start();
fsm->Run();
fsm->Stop();
rclcpp::shutdown();
return 0;
}