Yaskawa-Global / motoros2

ROS 2 (rcl, rclc & micro-ROS) node for MotoPlus-compatible Yaskawa Motoman robot controllers
96 stars 20 forks source link

Cycle-switch-mode during setup procedure #203

Closed ted-miller closed 3 months ago

ted-miller commented 8 months ago

Re: https://github.com/Yaskawa-Global/motoros2/discussions/201#discussioncomment-8224715

Need to add this to setup procedure. Perhaps we can also detect this in real time via CIO.

(I vaguely recall this being an issue in the past. But I can't find anything about it in the repos.)

ted-miller commented 8 months ago

Looks like we can detect with these:

image

gavanderhoorn commented 6 months ago

@ted-miller: did we forget to add something to the setup documentation about this?

ted-miller commented 6 months ago

It looks like I added to the motoros1 wiki, but didn't do it here.

ted-miller commented 6 months ago

It just occurred to me that there is an API for mpSetCycle.

@yai-rosejo @gavanderhoorn

I vote that instead of documenting the step of setting cycle, we should automate it. Right after we enable servos, we can set cycle and then start the INIT_ROS job.

Thoughts?

gavanderhoorn commented 6 months ago

Hm. Changing 'global' controller configuration for a single application in an automagic way?

Not sure.

ted-miller commented 6 months ago

It's not global. It's instantaneous.

When the user switches the key-switch, the robot's "saved" configuration is restored.

(At least I think that's true. Need to verify.)

gavanderhoorn commented 6 months ago

If that's true (ie: it reverts) automating it seems like it would improve UX.

related btw: I've never had my YRC1 configured with continuous and never really ran into any issues. Was I just lucky?

ted-miller commented 6 months ago

The default value is cycle, which will run one cycle of the job.

For the normal use-case this should work. Normally, the job should only 'finish' if traj_mode is stopped. In that case, you'd have to re-enable the job from the start.

So really, I now think that https://github.com/Yaskawa-Global/motoros2/pull/212 may be too restrictive. (I've just now started getting these errors for the first time.) It should allow auto or cycle. But, this point is moot if we automate it.