ros2_control icon indicating copy to clipboard operation
ros2_control copied to clipboard

Handling the job such as initialize, homing, clear alarm, etc by topic or service or action.

Open byeongkyu opened this issue 4 years ago • 3 comments

Many robots has multiple joints. Some joints needs initializing procedure for example, find origin point. Now, the hardware_interface has only init->read->write loop and it it not accept any commands by external.

How can I implement the jobs that said above?

byeongkyu avatar Oct 13 '21 02:10 byeongkyu

Hi @byeongkyu,

This is very fascinating topic and I will write here how I am solving this issues with my customers.

I wanted to explain you this today, but I will probably not manage it. I will try to make a full description, a figure and few PR which could help you over the weekend.

Stay tuned!

destogl avatar Oct 15 '21 08:10 destogl

Hi @byeongkyu,

sorry for taking me so long time. Here the explanation "how I would solve this":

  • There is now lifecycle of the hardware also according to the LifecycleNode
  • The full lifecycle will be called when hardware is starting, or has to be started.
  • If you want to do initialization each time when starting hardware add simply this procedure in the on_configure callback.
  • If you want to control it, export specialized command interfaces for this functionality and use a ForwardCommandController to trigger this. (We will have soon GPIOController which will be more suitable for this. You can find very complicated, initial implementation of it in UR driver repository).

Please also consider following figure to better understand callback and lifecycle of the hardware in ros2_control

hardware_interface_lifecycle

destogl avatar Oct 19 '21 23:10 destogl