Skip to content

Mode Switch timeout is too short for some drives #457

@aatb-ch

Description

@aatb-ch

I have successfully setup canopen_motor_node on a Festo CMMP-AS drive, took me a while to get all parameters corrects by following various Q&As and issues, but the last nagging thing turned out to be a vendor-specific behavior:

When switching to Profile Position mode, no problem, it instantly switches mode, but I need Interpolated Position with a Joint Trajectory Controller, and it seemingly has been starting or crashing randomly. I read through all the Festo docs and once all params are set correctly and mode switch 7 is asked the drive returns mode -1 while it goes through a synchronization phase, after which it will return mode 7.

It just so happens that this phase takes between 3 to 6 seconds, randomly varying at each mode switch. The timeout for mode switching is hardcoded at 5s, I recompiled from source by setting it to 20s and the drive will switch to mode 7 every single time.

time_point abstime = get_abs_time(boost::chrono::seconds(5));

Maybe would be good to have this as a YAML parameter for the motor layer? I would happily try to get a PR going but my C++ skills are not the sharpest.. I could give it a try though.

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