From 6c28e17e48bb208de09cb9f8d69b5ffc14d13321 Mon Sep 17 00:00:00 2001 From: Kayman Date: Thu, 31 May 2018 10:23:31 +0900 Subject: [PATCH] changed a button to operate --- op3_read_write_demo/src/read_write.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/op3_read_write_demo/src/read_write.cpp b/op3_read_write_demo/src/read_write.cpp index 2f2dc66..1b87dc4 100644 --- a/op3_read_write_demo/src/read_write.cpp +++ b/op3_read_write_demo/src/read_write.cpp @@ -36,8 +36,8 @@ void torqueOff(const std::string& body_side); enum ControlModule { None = 0, - Framework = 1, - DirectControlModule = 2, + DirectControlModule = 1, + Framework = 2, }; const int SPIN_RATE = 30; @@ -116,17 +116,17 @@ int main(int argc, char **argv) void buttonHandlerCallback(const std_msgs::String::ConstPtr& msg) { // starting demo using robotis_controller - if (msg->data == "start") + if (msg->data == "mode") { control_module = Framework; - ROS_INFO("Button : start | Framework"); + ROS_INFO("Button : mode | Framework"); readyToDemo(); } // starting demo using direct_control_module - else if (msg->data == "mode") + else if (msg->data == "start") { control_module = DirectControlModule; - ROS_INFO("Button : mode | Direct control module"); + ROS_INFO("Button : start | Direct control module"); readyToDemo(); } // torque on all joints of ROBOTIS-OP3