Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*** stack smashing detected ***: terminated #20

Open
Akumar201 opened this issue May 29, 2024 · 0 comments
Open

*** stack smashing detected ***: terminated #20

Akumar201 opened this issue May 29, 2024 · 0 comments

Comments

@Akumar201
Copy link

I have created code to send the arm to manual or emergency switch mode. The code are following , I am not sure why when I run any of this my code fails

message is EmergencyStop
Emergency Stop for Arm has been engaged
*** stack smashing detected ***: terminated
Main process exited, code=killed, status=6/ABRT
Failed with result 'signal'.

Manual Mode Code looks like

void XArmWrapper::ManualMode()
{
 // if (arm->error_code != 0) arm->clean_error();
 // if (arm->warn_code != 0) arm->clean_warn();
 arm->motion_enable(false);
 arm->motion_enable(true);
 arm->clean_error();
 arm->clean_warn();
 arm->set_mode(0);
 arm->set_state(0);
 arm->set_mode(2);
 arm->set_state(0);
}

emergency switch code looks like


bool XArmWrapper::EmergencyStop()
{
 if (arm != nullptr)
 {
   arm->motion_enable(false);
   std::cout << "arm value is " << arm << std::endl;

   return true;
 }
 else
 {
   std::cerr << "Error: Arm is not initialized" << std::endl;
   return false;
 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant