ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

rosdoc_lite doesn't find modules

asked 2015-04-15 07:14:19 -0600

Morv gravatar image

Hello there,

I'm fairly new to both Python and ROS and I reached a point where I'm supposed to document my code. I'm programming a Baxter robot and while programming with Python isn't much of a trouble, generating the documentation currently is.

So what I did is the following:

Jokes aside, I'm getting warnings in this style:

/home/ies-labor/devel/baxter_ws/src/baxter_ies_sdk/doc/Baxter.rst:4: WARNING: autodoc: failed to import module u'Baxter'; the following exception was raised:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/sphinx/ext/", line 335, in import_object
ImportError: No module named Baxter

My sources are found in /package/src and there are several files like, etc. For each of them I receive an error. I also get warnings about each of the source files' .rst file:

/home/ies-labor/devel/baxter_ws/src/baxter_ies_sdk/doc/Baxter.rst:: WARNING: document isn't included in any toctree

At the end no documentation is produced except the index template. The folders .build, .static and .templates are empty.

My workstation is using Ubuntu 14.04.2 with kernel 3.13.0-49 and ROS release used is Indigo.

Thanks for any help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-15 19:52:46 -0600

joq gravatar image

updated 2015-04-17 13:27:04 -0600

This page explains most of what is needed to use Spinx with rosdoc_lite. It should probably be easier to find. Suggestions for making that easier are welcome.

It is hard to tell exactly where your documentation is failing. If you still have trouble after following the directions above, please post more details by editing your question.

EDIT: Standard ROS practice is to place Python modules under the src/your_package subdirectory or your package, making the top-level module name the same as your package. Python requires that directory to have an file, too.

See: the catkin Python howto for more details.

edit flag offensive delete link more


Although I welcome an answer, I already read that page as described above including the link and url. So i did exactly follow the directions given on that site but it sure fails, that's why I am asking. I'd rather have it working wihtout problem but it simply won't.

Thanks so far.

Morv gravatar image Morv  ( 2015-04-17 06:13:48 -0600 )edit

Are your Python modules are in /home/ies-labor/devel/baxter_ws/src/baxter_ies_sdk/src or in .../src/baxter_ies_sdk?

joq gravatar image joq  ( 2015-04-17 13:20:49 -0600 )edit

They're in the first path. baxter_ws is catkin root workspace, baxter_ies_sdk among others are catkin sub workspaces. May this be a problem? The generation of the eclipse project didn't like the sub workspaces either. I had to create a project inside of the root workspace.

Sorry for the late answer

Morv gravatar image Morv  ( 2015-04-21 06:43:39 -0600 )edit

Okay. It was my own fault. I'm fairly new to ROS and the whole catkin stuff and also I'm the only one working at it at my department. The reason it didn't work was the wrong placement of my source files. They have to be placed in packages with just as you said.

Now it's working, thanks.

Morv gravatar image Morv  ( 2015-04-21 09:09:50 -0600 )edit

Question Tools


Asked: 2015-04-15 07:14:19 -0600

Seen: 344 times

Last updated: Apr 17 '15