Re: [ros-users] Rostopic + python

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Ugo Cupcic
日付:  
To: ros-users
題目: Re: [ros-users] Rostopic + python
Dear Sacha,

You can find this in rostopic.py.

Here is a small code sample that works:

import rosgraph.masterapi
master = rosgraph.masterapi.Master('/rostopic')
print master.getPublishedTopics('/')

Cheers,

Ugo

On Thu, 2010-07-01 at 13:07 +0100, Sacha Aury wrote:
> Hi,
>
> I would like to know if it is possible to get the list of published ros
> topic in a python script.
>
> The solution I am using is to use subprocess with rostopic list as a
> bash command, but it is a bit slow (and not very fancy)
>
> Thanks.
>
> Sacha
>
> _______________________________________________
> ros-users mailing list
>
> https://code.ros.org/mailman/listinfo/ros-users
>



-- 
Ugo Cupcic         |  Shadow Robot Company | 
Software Engineer  |    251 Liverpool Road |
need a Hand?       |    London  N1 1LX     | +44 20 7700 2487
http://www.shadowrobot.com/hand/              @shadowrobot