Reload a component after recompiling

Hi,

I want to do the following: Stop and unload a specific component while the Deployer stays running, change and recompile the code of the component and then load the component again. If I do try this, it is the old version of the component that is reloaded. Is there like a "refresh/reload" command?

Thanks a lot,

Bert

Reload a component after recompiling

2011/6/24 bert [dot] willaert [..] ... <bert [dot] willaert [..] ...>:
> Hi,
>
> I want to do the following:
> Stop and unload a specific component while the Deployer stays running, change and recompile the code of the component and then load the component again.
> If I do try this, it is the old version of the component that is reloaded. Is there like a "refresh/reload" command?

Can you explain a bit more why you want that behaviour? Is there any
objection against creating two (nearly similar probably) components
and loading them both?
Or putting the differences into properties and creating two instances
of that component with different properties?

Regards,

Steven

>
> Thanks a lot,
>
> Bert
>
>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>

Re: Reload a component after recompiling

Steven Bellens wrote:
2011/6/24 bert [dot] willaert [..] ... <bert [dot] willaert [..] ...>: > Hi, >

> I want to do the following: > Stop and unload a specific component while the Deployer stays running, change and recompile the code of the component and then load the component again. > If I do try this, it is the old version of the component that is reloaded. Is there like a "refresh/reload" command?

Can you explain a bit more why you want that behaviour? Is there any objection against creating two (nearly similar probably) components and loading them both? Or putting the differences into properties and creating two instances of that component with different properties?

Regards,

Steven


I have a.o. the following 3 components from low to high level: soem_master_comp <-> signal_processing_comp <-> control_comp. The first two are 'ready' and they need some time/labor consuming action during configuration (moving the robot to some point e.g.). So I want to load the first two and configure them once and then keep them running for the rest of the day while I regularly unload control_comp, change stuff, recompile and load control_comp again... Does that make sense?Bert
 
>> Thanks a lot, >> Bert >> > -- > Orocos-Users mailing list > Orocos-Users [..] ... > http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users >

Reload a component after recompiling

On Fri, Jun 24, 2011 at 2:10 PM, <bert [dot] willaert [..] ...> wrote:
> Hi,
>
> I want to do the following:
> Stop and unload a specific component while the Deployer stays running, change and recompile the code of the component and then load the component again.
> If I do try this, it is the old version of the component that is reloaded. Is there like a "refresh/reload" command?

We used to support reloading components but it's always tricky and/or
leading to segfaults. Today, the import() statement will not try to
reload a package. You could setup a separate deployment process which
communicates with the running application and restart that process all
the time, using a startup script to automate the setup/connection
management.

Peter

Re: Reload a component after recompiling

peter wrote:
On Fri, Jun 24, 2011 at 2:10 PM, <bert [dot] willaert [..] ...> wrote: > Hi, >

> I want to do the following: > Stop and unload a specific component while the Deployer stays running, change and recompile the code of the component and then load the component again. > If I do try this, it is the old version of the component that is reloaded. Is there like a "refresh/reload" command?

We used to support reloading components but it's always tricky and/or leading to segfaults. Today, the import() statement will not try to reload a package. You could setup a separate deployment process which communicates with the running application and restart that process all the time, using a startup script to automate the setup/connection management.

Peter

---- Hmm, you mean starting once one deployer with as peers the components that should stay active and then starting and stopping another deployer with as peer the component I want to work on? But (how) can the peers of both Deployers communicate with each other?

Bert

Reload a component after recompiling

On Fri, Jun 24, 2011 at 3:04 PM, <bert [dot] willaert [..] ...> wrote:
>

peter wrote:
On Fri, Jun 24, 2011 at 2:10 PM,  <bert [dot] willaert [..] ...> wrote:
>> Hi,
>>
>> I want to do the following:
>> Stop and unload a specific component while the Deployer stays running, change and recompile the code of the component and then load the component again.
>> If I do try this, it is the old version of the component that is reloaded. Is there like a "refresh/reload" command?
>
> We used to support reloading components but it's always tricky and/or
> leading to segfaults. Today, the import() statement will not try to
> reload a package. You could setup a separate deployment process which
> communicates with the running application and restart that process all
> the time, using  a startup script to automate the setup/connection
> management.
>
> Peter
>
> ----
> Hmm, you mean starting once one deployer with as peers the components that should stay active and then starting and stopping another deployer with as peer the component I want to work on? But (how) can the peers of both Deployers communicate with each other?

Gosh, we really need some basic tutorials...

When communicating over ports, just use the ros transport to connect the ports:
http://www.ros.org/wiki/rtt_ros_integration

When calling operations, you can't use ros... you'll have to use
corba. Start deployer-corba-gnulinux instead of deployer-gnulinux (or
-xenomai).
And call the 'server("componentname",true)' operation at the end of
your script to make the soem app available to the other process.
You'll need the corba naming service running though...
http://people.mech.kuleuven.be/~orocos/pub/stable/documentation/rtt/v2.x...

The second process then also starts with deployer-corba-gnulinux, but
does a loadComponent("CORBA","componentname") which will bring the
remote component into your process. Then proceed as if the component
is available in the current process.

Peter
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users