Merge pull request #22 from ROBOTIS-GIT/develop

changed a button to operate
This commit is contained in:
Kayman 2018-05-31 10:38:44 +09:00 committed by GitHub
commit 5dc8dca9b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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