Skip to content

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

@Akumar201

Description

@Akumar201

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;
 }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions