[openrtm-users 01457] Re: RTコンポーネントリリース | New RT-Component release: RTC:HokuyoAist

Geoffrey Biggs geoffrey.biggs @ aist.go.jp
2010年 11月 9日 (火) 16:32:55 JST


On 08/11/10 18:32, Tony Kuo wrote:
> Dear Geoffrey and OpenRTM ML:
> 
> Actually I just started using the hokuyo_aist OpenRTM component in the
> Gearbox project.
> 
> I quickly looked through the new RTC:HokuyoAist component,
> it's very different to the one in Gearbox.
> 
> I wonder what was the reason behind this major change??

The new component meets the hokuyo_aist-2.0 API, which is an overhaul of
the 1.0 API. The component in the Gearbox repository is not compatible
with the latest version of the hokuyo_aist library.

> The link to download on the webpage
> (http://www.openrtm.org/openrtm/ja/content/rtchokuyoaist-0)
> is not correctly formated. Please check.
> 
> Another thing not so related is that,
> I actually have been trying to write a component with a consumer service
> port to link with the control port (provider service)
> on the old hokuyo_aist component in Gearbox for the whole day today. But
> have not had any success.
> 
> It should be quite straight forward, but I couldn't find out why it's
> not connecting
> I have code like this.
> h:/
> RTC::CorbaPort m_hokuyo_aistPort;
> RTC::CorbaConsumer<hokuyo_aist_control> m_hokuyoPort;
> cpp:/
> onInitialize()
> m_hokuyo_aistPort.registerConsumer("hokuyoPort", "hokuyo_aist_control",
> m_hokuyoPort);
> addPort(m_hokuyo_aistPort);
> 
> but whenever I call a function like below.
> double tmp = m_hokuyoPort->GetStartAngle();
> 
> It throws an error complaining
> omniORB: ERROR -- the application attempted to invoke an operation on a
> nil reference.
> Error in service port.
> 
> Do you know Is there anyway I can check the connection between service
> ports after they are initialise ?
> or what I am doing wrong?

I should check, just to be sure: did you connect the two service ports?
Service ports have to be connected, just like data ports. Having a nil
reference is a symptom of trying to use an unconnected port.

Are you trying to use the service ports in onInitialize()? You can't use
them at that point as the component is still initialising. You should do
any setting up that requires communication with the outside world in
onActivated().

Geoff



openrtm-users メーリングリストの案内