Hi,
I currently want to create a component that would control another component
on another computer with an orocos's script program. I'm getting
segmentation fault, here is what I have written :
RemoteComponentLoader.cpp :
//... usual code here
void RemoteComponentLoader::configureHook()
{
ControlTaskProxy* pRemoteTaskContext =
Corba::ControlTaskProxy::Create("DEPLOYER_NAME",false);
addPeer(pRemoteTaskContext);
scripting()->loadPrograms("testScript.ops");
}
testScript.ops :
program sysConfigProgram {
var string testStr
set testStr=VCarrierSimulator.Target
}
The problem occurs when executing <<
scripting()->loadPrograms("testScript.ops"); >>. I have also observed that
the script could use "method","Command", and boolean,but accessing to any
other types like double,int,string,array produce segmentation fault.
Could you help me?
Simon
Script reading on ControlTask that has ControlTaskProxy as peers
On Sunday 05 April 2009 20:43:15 Simon Pelletier-Thibault wrote:
> Hi,
>
> I currently want to create a component that would control another component
> on another computer with an orocos's script program. I'm getting
> segmentation fault, here is what I have written :
>
> RemoteComponentLoader.cpp :
> //... usual code here
> void RemoteComponentLoader::configureHook()
> {
> ControlTaskProxy* pRemoteTaskContext =
> Corba::ControlTaskProxy::Create("DEPLOYER_NAME",false);
> addPeer(pRemoteTaskContext);
> scripting()->loadPrograms("testScript.ops");
> }
>
> testScript.ops :
>
> program sysConfigProgram {
> var string testStr
> set testStr=VCarrierSimulator.Target
> }
>
> The problem occurs when executing <<
> scripting()->loadPrograms("testScript.ops"); >>. I have also observed that
> the script could use "method","Command", and boolean,but accessing to any
> other types like double,int,string,array produce segmentation fault.
Thanks for reporting. I could reproduce/fix this. Could you apply the patch in
attachment to your orocos-rtt directory and let us now if that fixes all your
problems ?
cd orocos-rtt-1.8.1
patch -p1 < fix-corba-assignment-crash.patch
and make all install both RTT and OCL.
Having such concrete information on how to reproduce the bug really helps in
finding and fixing. Thanks !
Peter
Script reading on ControlTask that has ControlTaskProxy as peers
The script loading is now working correctly thanks. I'm going to test it
more in details. I added a connectRemote method to the ControlTaskProxy
class in order to facilitate the reconnection when connection is lost. Could
you check it and add it to the next Orocos 1.8.x release if possible?
I would like to use the reconnection in a component that would control
another component on another computer. The code will look like this with my
current patch.
try
{
if(pRemoteTaskContext == NULL )
{
//remote task instantiation
pRemoteTaskContext=Corba::ControlTaskProxy::Create("VCarrierSimulator",false,true);
addPeer(pRemoteTaskContext);
}
else if(pRemoteTaskContext->ready() == false)
{
log(Info) << "Trying to reconnect"<<endlog();
if(pRemoteTaskContext->connectRemote(true) == true)
{
log(Info) << "reconnect successful"<<endlog();
}
}
}
catch(...)
{
// connection error
}
Thanks,
>
Script reading on ControlTask that has ControlTaskProxy as peers
The "script loading" still have problems when loading methods or commands.
That part was working correctly on rtt1.8.0. Now it looks like it can not
find methods or commands on the remote object.
I built an example to illustrate the problem.
1. untar it
2. type "make"
3. type "./startHello"
4. ./main
It will call configure on a component named World which is loading a remote
component and loading a script that uses this component.
thanks,
On Tue, Apr 7, 2009 at 2:22 PM, Simon Pelletier-Thibault <
simon [dot] pelletiert [..] ...> wrote:
> The script loading is now working correctly thanks. I'm going to test it
> more in details. I added a connectRemote method to the ControlTaskProxy
> class in order to facilitate the reconnection when connection is lost. Could
> you check it and add it to the next Orocos 1.8.x release if possible?
>
> I would like to use the reconnection in a component that would control
> another component on another computer. The code will look like this with my
> current patch.
>
> try
> {
> if(pRemoteTaskContext == NULL )
> {
> //remote task instantiation
>
> pRemoteTaskContext=Corba::ControlTaskProxy::Create("VCarrierSimulator",false,true);
> addPeer(pRemoteTaskContext);
>
> }
> else if(pRemoteTaskContext->ready() == false)
> {
> log(Info) << "Trying to reconnect"<<endlog();
> if(pRemoteTaskContext->connectRemote(true) == true)
> {
> log(Info) << "reconnect successful"<<endlog();
> }
> }
> }
> catch(...)
> {
> // connection error
> }
>
> Thanks,
>
Script reading on ControlTask that has ControlTaskProxy as peers
On Thursday 09 April 2009 16:14:34 Simon Pelletier-Thibault wrote:
> The "script loading" still have problems when loading methods or commands.
> That part was working correctly on rtt1.8.0. Now it looks like it can not
> find methods or commands on the remote object.
>
> I built an example to illustrate the problem.
> 1. untar it
> 2. type "make"
> 3. type "./startHello"
> 4. ./main
You forgot the attachment ? I won't have time for this until the 20th.
Peter