From: Jose V. S. M. <jos...@ac...> - 2008-11-13 09:03:00
|
Hello, I didn't send the code because I copied and pasted the code from the LaserFeatureExtractor component. I also forgot to say that I am using Orca 2.10. The relevant code in my header file is: // Consumers orcaifaceimpl::StoringRangeScanner2dConsumerImplPtr laserConsumer_; // Context orcaice::Context context_; I have the following fuction to create the comsumer: void MainThread::connectToLaser() { laserConsumer_->subscribeWithTag( "LaserScanner2d", this, subsysName() ); context_.tracer().info( "Connected to laser." ); } I could not find any call not 'new' then I added: void MainThread::connectToLaser() { laserConsumer_(new orcaifaceimpl::StoringRangeScanner2dConsumerImplPtr( context_ ); laserConsumer_->subscribeWithTag( "LaserScanner2d", this, subsysName() ); context_.tracer().info( "Connected to laser." ); } After this I got a compilation error: *original= error: no se encuentra una funcion coincidente para la llamada a* *translation= error: no matching function for call to * ‘IceUtil::Handle<orcaifaceimpl::StoringConsumerImpl< IceInternal::ProxyHandle<IceProxy::orca::RangeScanner2d>, orca::RangeScanner2dConsumer, IceInternal::ProxyHandle<IceProxy::orca::RangeScanner2dConsumer>, IceInternal::Handle<orca::RangeScanner2dData> > >::Handle(orcaice::Context&)’ /usr/include/IceUtil/Handle.h:163: note: *original= los candidatos son:* *translation= candidates are:* IceUtil::Handle<T>::Handle(const IceUtil::Handle<T>&) [with T = orcaifaceimpl::StoringConsumerImpl< IceInternal::ProxyHandle<IceProxy::orca::RangeScanner2d>, orca::RangeScanner2dConsumer, IceInternal::ProxyHandle<IceProxy::orca::RangeScanner2dConsumer>, IceInternal::Handle<orca::RangeScanner2dData> >] /usr/include/IceUtil/Handle.h:142: note: IceUtil::Handle<T>::Handle(T*) [with T = orcaifaceimpl::StoringConsumerImpl< IceInternal::ProxyHandle<IceProxy::orca::RangeScanner2d>, orca::RangeScanner2dConsumer, IceInternal::ProxyHandle<IceProxy::orca::RangeScanner2dConsumer>, IceInternal::Handle<orca::RangeScanner2dData> >] Regards, José Vicente Sogorb Morón -----Mensaje original----- De: Alex Makarenko [mailto:al...@ca...] Enviado el: miércoles, 12 de noviembre de 2008 23:44 Para: Jose Vicente Sogorb Moron; orc...@li... Asunto: RE: [Orca-robotics-users] Laser Consumer Hi Jose, Without seeing the code my guess is that the laser consumer is not created. In laserfeatureextractor the laserConsumer_ is defined as a smart pointer so one has to call 'new' to actually create it. This is done in the constructor of MainThread: ... laserConsumer_(new orcaifaceimpl::StoringRangeScanner2dConsumerImpl(context)), ... Do you have this in your component? Cheers, Alex m. > -----Original Message----- > From: Jose Vicente Sogorb Moron > [mailto:jos...@ac...] > Sent: Thursday, 13 November 2008 4:56 AM > To: orc...@li... > Subject: [Orca-robotics-users] Laser Consumer > > Hello, > > > > I am trying to create a laser consumer to get the laser data. > I took as reference the LaserFeatureExtractor as a base for > my component and I copied the code from it but I am not able > to subcribe to the LaserScanner2d interface successfully. It > compiles without problem but I get the following message when > I try to run it: > > > > [ 11/12/08 17:41:36.104 Robot/mylasercomp: error: > SubsystemThread::run() MainThread: Caught unexpected > exception: /usr/include/IceUtil/Handle.h:46: > IceUtil::NullHandleException ] > > > > [ 11/12/08 17:41:36.104 Robot/mylasercomp: error: > LocalStatus: MainThread issued fault : > 'SubsystemThread::run() MainThread: Caught unexpected > exception: /usr/include/IceUtil/Handle.h:46: > IceUtil::NullHandleException' ] > > > > I tried to connect the LaserFeatureExtractor, and it works > fine. I also checked that the Laser2d Component is working well. > > > > Can anybody help me with this. > > > > Regards, > > > > José Vicente Sogorb Morón > > > > > > Este mensaje se dirige exclusivamente a su destinatario, y > puede contener información confidencial sometida a secreto > profesional, o cuya divulgación esté legalmente prohibida. > Cualquier opinión en él contenida es exclusiva de su autor y > no representa necesariamente la opinión de la empresa. Si ha > recibido este mensaje por error, le rogamos nos lo comunique > de forma inmediata por esta misma vía y proceda a su > eliminación, así como a la de cualquier documento adjunto al > mismo. El correo electrónico vía Internet no es seguro y no > se puede garantizar que no haya errores ya que puede ser > interceptado, modificado, perdido o destruido, o contener > virus. Cualquier persona que se ponga en contacto con > nosotros por correo electrónico se considerará que asume > estos riesgos. > > This e-mail is addressed exclusively to the recipient and may > contain privileged information under a professional > confidential agreement or it may be against the law to > disclose its contents. Any opinion contained in it belongs > exclusively to his/her author and does not necessarily > reflect the company’s view. If you receive this e-mail in > error, please let us know immediately (by return e-mail) and > proceed to its destruction, as well as any document attached > to it. The sending of e-mails through the Internet is not > safe and, therefore, error-free communications cannot be > guaranteed, as they can be intercepted, changed, misled or > destroyed or they might contain a virus. Any user contacting > us through e-mails shall be understood to be assuming these risks. > > Este mensaje se dirige exclusivamente a su destinatario, y puede contener información confidencial sometida a secreto profesional, o cuya divulgación esté legalmente prohibida. Cualquier opinión en él contenida es exclusiva de su autor y no representa necesariamente la opinión de la empresa. Si ha recibido este mensaje por error, le rogamos nos lo comunique de forma inmediata por esta misma vía y proceda a su eliminación, así como a la de cualquier documento adjunto al mismo. El correo electrónico vía Internet no es seguro y no se puede garantizar que no haya errores ya que puede ser interceptado, modificado, perdido o destruido, o contener virus. Cualquier persona que se ponga en contacto con nosotros por correo electrónico se considerará que asume estos riesgos. This e-mail is addressed exclusively to the recipient and may contain privileged information under a professional confidential agreement or it may be against the law to disclose its contents. Any opinion contained in it belongs exclusively to his/her author and does not necessarily reflect the company’s view. If you receive this e-mail in error, please let us know immediately (by return e-mail) and proceed to its destruction, as well as any document attached to it. The sending of e-mails through the Internet is not safe and, therefore, error-free communications cannot be guaranteed, as they can be intercepted, changed, misled or destroyed or they might contain a virus. Any user contacting us through e-mails shall be understood to be assuming these risks. |