Skip to content

Stop the current controller within the starting method #521

@captain-yoshi

Description

@captain-yoshi

See this issue fzi-forschungszentrum-informatik/cartesian_controllers#170 for context.

I was wondering if there is a way to stop the controller within the controller API after starting it ? Is there a way to stop it before it sends (in this case) joint positions ? If not, I can set a safe position (e.g not clamped) but I would still want a way to stop the controller...

The controller does not override the method aborting. Not sure if it is necessary to stop the controller.

This is what I'm trying to do:

void JointPositionController::starting(const ros::Time& time)
{
  ...

  // Make sure joint is within limits, if not stop the controller
  bool error = validateJointLimits(pos_command);
  
  // Stop the controller
  if (error)
    this->abortRequest(ros::Time::now()) // Not working... 

  ...
}

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