【问题标题】:ROS objects introspection in PythonPython中的ROS对象自省
【发布时间】:2016-05-10 14:53:09
【问题描述】:

如何查看 ROS 对象的属性和方法?我可以使用 Python 的检查模块吗?

就像在 python 中一样,我可以使用 dir()、type() 命令。

【问题讨论】:

    标签: python oop introspection ros


    【解决方案1】:

    我知道一些 Python 模块的技巧。请执行以下操作。

    import os
    print os.getcwd() # to get the current working directory
    print os.listdir(os.getcwd()) # to get the contents of the current working directory
    

    【讨论】:

      猜你喜欢
      • 2013-10-12
      • 2016-03-09
      • 2010-10-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多