Stop Start Components from ROS

In our robot we use etherCAT for the realtime control of the robot. For this, the soem_master component is deployed in Orocos and the controllers are connected to this component.

However, it might sometimes be usefull to enable only certain controllers, like only the wheels. But due to the current layout we can only deploy all the components at once because they all communicate with the soem_master component.

If one component goes into an error state for whatever reason, the whole deployment needs to be restarted.

Now I'm writing a graphical user interface to be able to reset the controllers etc.

There are several questions I have:

- Is it possible to leave the soem_master running at all time? We use this to measure the batteries for example, as I understand corba communication is not realtime so multiple additional deployers for the controllers would not work.

- What is the recommended way to stop and start components from ROS? In this case we can all load the components in advance, but only start them if they are needed.

- What is the correct way to kill a deployer? If you launch a deployer with a launch file on a different machine and you type ctrl+C you get a "Killing on exit" and the process is killed after a 10 second timeout, not a very nice way I guess.

Unrelated: - When is the toolchain available on electric through the debian packages?

> Hello everybody,
>
> In our robot we use etherCAT for the realtime control of the robot. For this, the soem_master component is deployed in Orocos and the controllers are connected to this component.
>
> However, it might sometimes be usefull to enable only certain controllers, like only the wheels. But due to the current layout we can only deploy all the components at once because they all communicate with the soem_master component.
>
> If one component goes into an error state for whatever reason, the whole deployment needs to be restarted.

Not necessarily! The SOEM master is responsible for the Ethercat
communication; each component on top of that has its own life cycle state
machine, so it can be "stopped" and "started" at will. (In principle; that
is, their implementation has to foresee this functionality.)

> Now I'm writing a graphical user interface to be able to reset the controllers etc.
>
> There are several questions I have:
>
> - Is it possible to leave the soem_master running at all time? We use this to measure the batteries for example, as I understand corba communication is not realtime so multiple additional deployers for the controllers would not work.

There is nothing inherently non-realtime about the CORBA specification;
realtimeness is a property of the _implementations_, and those vary widely
wrt their realtime properties.

> - What is the recommended way to stop and start components from ROS? In
> this case we can all load the components in advance, but only start them
> if they are needed.

ROS nodes do not have a default life cycle state machine; but there is also
nothing that prevents you from implementing this.

(This kind of generic ROS questions are always to be answered in this same
"it depends on what you put inside the nodes" way, because "ROS" is not a
clear concept, let alone a clear set of functionalities or properties...)

> - What is the correct way to kill a deployer? If you launch a deployer
> with a launch file on a different machine and you type ctrl+C you get a
> "Killing on exit" and the process is killed after a 10 second timeout,
> not a very nice way I guess.

Killing is never a nice way! The nice way is to communicate with a
component, asking it to stop itself. Maybe you want to receive an event
from that component as confirmation that it is indeed going to stop (or
not).

> Unrelated:
> - When is the toolchain available on electric through the debian packages?

On Thu, Sep 8, 2011 at 2:21 AM, <t [dot] t [dot] g [dot] clephas [..] ...> wrote:
> Hello everybody,
>
> In our robot we use etherCAT for the realtime control of the robot. For this, the soem_master component is deployed in Orocos and the controllers are connected to this component.
>
> However, it might sometimes be usefull to enable only certain controllers, like only the wheels. But due to the current layout we can only deploy all the components at once because they all communicate with the soem_master component.
>
> If one component goes into an error state for whatever reason, the whole deployment needs to be restarted.
>
> Now I'm writing a graphical user interface to be able to reset the controllers etc.
>
>
> There are several questions I have:
>
> - Is it possible to leave the soem_master running at all time? We use this to measure the batteries for example, as I understand corba communication is not realtime so multiple additional deployers for the controllers would not work.
>
> - What is the recommended way to stop and start components from ROS? In this case we can all load the components in advance, but only start them if they are needed.
>
> - What is the correct way to kill a deployer? If you launch a deployer with a launch file on a different machine and you type ctrl+C you get a "Killing on exit" and the process is killed after a 10 second timeout, not a very nice way I guess.
>
>
> Unrelated:
> - When is the toolchain available on electric through the debian packages?

Are you talking about the "orocos_toolchain_ros" stack? It hasn't been
released into Electric yet, so that explains the lack of Debians. It
would be great to see an official release into Electric!

On Thu, 2011-09-08 at 18:27 +0200, Wim Meeussen wrote:
> On Thu, Sep 8, 2011 at 2:21 AM, <t [dot] t [dot] g [dot] clephas [..] ...> wrote:
> > Hello everybody,
> >
> > In our robot we use etherCAT for the realtime control of the robot. For this, the soem_master component is deployed in Orocos and the controllers are connected to this component.
> >
> > However, it might sometimes be usefull to enable only certain controllers, like only the wheels. But due to the current layout we can only deploy all the components at once because they all communicate with the soem_master component.
> >
> > If one component goes into an error state for whatever reason, the whole deployment needs to be restarted.
> >
> > Now I'm writing a graphical user interface to be able to reset the controllers etc.
> >
> >
> > There are several questions I have:
> >
> > - Is it possible to leave the soem_master running at all time? We use this to measure the batteries for example, as I understand corba communication is not realtime so multiple additional deployers for the controllers would not work.
> >
> > - What is the recommended way to stop and start components from ROS? In this case we can all load the components in advance, but only start them if they are needed.
> >
> > - What is the correct way to kill a deployer? If you launch a deployer with a launch file on a different machine and you type ctrl+C you get a "Killing on exit" and the process is killed after a 10 second timeout, not a very nice way I guess.
> >
> >
> > Unrelated:
> > - When is the toolchain available on electric through the debian packages?
>
> Are you talking about the "orocos_toolchain_ros" stack? It hasn't been
> released into Electric yet, so that explains the lack of Debians. It
> would be great to see an official release into Electric!
>
> Wim

That's what I mean yes. Is there a releasedate for this?

Because now it means installing the git version on every PC in the lab
if we want to switch to electric.
And falling back to diamondback is then hard because two versions of the
toolchain would be present in the path.
Not to mention reverting everything when it is finally released in
electric.

On Thursday 15 September 2011 11:51:04 Tim Clephas wrote:
> On Thu, 2011-09-08 at 18:27 +0200, Wim Meeussen wrote:
> > On Thu, Sep 8, 2011 at 2:21 AM, <t [dot] t [dot] g [dot] clephas [..] ...> wrote:
> > > Hello everybody,
> > >
> > > In our robot we use etherCAT for the realtime control of the robot. For
> > > this, the soem_master component is deployed in Orocos and the
> > > controllers are connected to this component.
> > >
> > > However, it might sometimes be usefull to enable only certain
> > > controllers, like only the wheels. But due to the current layout we
> > > can only deploy all the components at once because they all
> > > communicate with the soem_master component.
> > >
> > > If one component goes into an error state for whatever reason, the
> > > whole deployment needs to be restarted.
> > >
> > > Now I'm writing a graphical user interface to be able to reset the
> > > controllers etc.
> > >
> > >
> > > There are several questions I have:
> > >
> > > - Is it possible to leave the soem_master running at all time? We use
> > > this to measure the batteries for example, as I understand corba
> > > communication is not realtime so multiple additional deployers for the
> > > controllers would not work.
> > >
> > > - What is the recommended way to stop and start components from ROS? In
> > > this case we can all load the components in advance, but only start
> > > them if they are needed.
> > >
> > > - What is the correct way to kill a deployer? If you launch a deployer
> > > with a launch file on a different machine and you type ctrl+C you get
> > > a "Killing on exit" and the process is killed after a 10 second
> > > timeout, not a very nice way I guess.
> > >
> > >
> > > Unrelated:
> > > - When is the toolchain available on electric through the debian
> > > packages?
> >
> > Are you talking about the "orocos_toolchain_ros" stack? It hasn't been
> > released into Electric yet, so that explains the lack of Debians. It
> > would be great to see an official release into Electric!
> >
> > Wim
>
> That's what I mean yes. Is there a releasedate for this?
>
> Because now it means installing the git version on every PC in the lab
> if we want to switch to electric.
> And falling back to diamondback is then hard because two versions of the
> toolchain would be present in the path.
> Not to mention reverting everything when it is finally released in
> electric.

We are preparing the packages for electric and have done some pre-release
tests. However, the orocos_toolchain_ros stack will *not* exist in electric.
It will be split up in 4 stacks. More news about this later today on the
orocos-dev mailing list.

> On Thu, 8 Sep 2011, t [dot] t [dot] g [dot] clephas [..] ... wrote:
>
> > Hello everybody,
> >
> > In our robot we use etherCAT for the realtime control of the robot. For
> this, the soem_master component is deployed in Orocos and the controllers
> are connected to this component.
> >
> > However, it might sometimes be usefull to enable only certain
> controllers, like only the wheels. But due to the current layout we can only
> deploy all the components at once because they all communicate with the
> soem_master component.
> >
> > If one component goes into an error state for whatever reason, the whole
> deployment needs to be restarted.
>
> Not necessarily! The SOEM master is responsible for the Ethercat
> communication; each component on top of that has its own life cycle state
> machine, so it can be "stopped" and "started" at will. (In principle; that
> is, their implementation has to foresee this functionality.)
>
> > Now I'm writing a graphical user interface to be able to reset the
> controllers etc.
> >
> > There are several questions I have:
> >
> > - Is it possible to leave the soem_master running at all time? We use
> this to measure the batteries for example, as I understand corba
> communication is not realtime so multiple additional deployers for the
> controllers would not work.
>
> There is nothing inherently non-realtime about the CORBA specification;
> realtimeness is a property of the _implementations_, and those vary widely
> wrt their realtime properties.
>
> > - What is the recommended way to stop and start components from ROS? In
> > this case we can all load the components in advance, but only start them
> > if they are needed.
>
> ROS nodes do not have a default life cycle state machine; but there is also
> nothing that prevents you from implementing this.
>
> (This kind of generic ROS questions are always to be answered in this same
> "it depends on what you put inside the nodes" way, because "ROS" is not a
> clear concept, let alone a clear set of functionalities or properties...)
>
> > - What is the correct way to kill a deployer? If you launch a deployer
> > with a launch file on a different machine and you type ctrl+C you get a
> > "Killing on exit" and the process is killed after a 10 second timeout,
> > not a very nice way I guess.
>
> Killing is never a nice way! The nice way is to communicate with a
> component, asking it to stop itself. Maybe you want to receive an event
> from that component as confirmation that it is indeed going to stop (or
> not).
>
> > Unrelated:
> > - When is the toolchain available on electric through the debian
> packages?
>
>
The current master branch should be working under Electric. If you are in a
hurry you can compile from sources.