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

Geoffrey Biggs geoffrey.biggs @ aist.go.jp
2010年 11月 10日 (水) 10:29:47 JST


Hi Tony,

On 09/11/10 16:28, Tony Kuo wrote:
> Hi Geoff:
> 
> I looked through the new component,
> it's using RTC::RangeData which is much better and easier to use.

That is why we implemented it. :)

> In my component that connect to the provider service port in the
> previous hokuyo_aist component in Gearbox.
> I was calling double tmp = m_hokuyoPort->GetStartAngle() in function
> onActivited()
> 
> I understand that I was getting nil reference becoz it was not connected,
> but I have no way to check the connection or reconnect if it's not
> connected.

You can tell if a port is connected through the port object's API. If it
is connected, get_connector_profiles() will return a list of the
connector profiles. If you know the ID of the connection you expect then
you can use get_connector_profile() to check if it exists.

While it is possible to connect a port from inside a component, it's
extremely ugly and a hack that noone should ever do. Ensuring that a
port is connected before a component is activated is a deployment
problem, which is external to components. If a component requires that a
port is connected when it is activated, it should fail onActivated and
go into the error state when the port isn't connected.

We are still working on the deployment tools for OpenRTM-aist. The tools
in rtsshell are useful, but we don't consider them to be perfect nor to
be the final solution.

> Another thing I am finding difficult in developing with the hokuyo aist
> component
> is that there is no way I know of, allow me to visualise the laser data
> from the component.

OpenRTM-python includes a laser range data viewer as one of its sample
components. The released version uses a different format for the range
data, but the trunk version has been updated to use RTC::RangeData. You
can get it here:

http://openrtp.jp/openrtm/svn/OpenRTM-aist-Python/branches/RELENG_1_0/OpenRTM-aist-Python/OpenRTM_aist/examples/TkLRFViewer/


Geoff



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