Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting C++ Pinocchio #163

Open
nmansard opened this issue May 12, 2016 · 4 comments
Open

Documenting C++ Pinocchio #163

nmansard opened this issue May 12, 2016 · 4 comments
Assignees

Comments

@nmansard
Copy link
Contributor

We need to start to a general framework to produce the documentation of Pinocchio. Two documentations would be useful: one for the C++ API; a second one for the Python interface.

I open the discussion here about the C++ documentation. The best candidate for documentation is Doxygen. Then main issue is to hide the CRTP complexity in the documentation. Right now, I consider that the Doxygen HTML is not usable by novice.

I take a look at Eigen documentation.
http://eigen.tuxfamily.org/dox/index.html
The documentation is organized by "modules". See for example the modules "QR", "LLT", etc for the dense solvers of Eigen:
http://eigen.tuxfamily.org/dox/group__DenseLinearSolvers__Reference.html

In addition, the modules are wrapped in a tutorial-style chapter organization. Finally, the class are listed (while hiding internal classes).

I like the organization by modules. We could have the following modules:

  • spatial
  • multibody model
  • joints
  • algorithms
  • python interface ===> maybe not to document

I think that it would also be important to accurately select which C++ objects, types, classes and namespaces we want to expose to the documentation. If we reason module by module, it should be pretty evident to chose which to hide.

The bad point is that I do not understand (yet) how the documentation of Eigen is generated. They used advance doxygen features that I do not fully catch.

From the exposition in the doc of the main classes organized by modules, we can complete the doc with presentation pages, tutorials, etc.

@olivier-stasse
Copy link
Member

Stating the obvious, I do not think the documentation is inside the header files.

@jmirabel
Copy link
Contributor

👍 for a documentation by modules.

Is this an ongoing process ?

@nmansard
Copy link
Contributor Author

Yes somehow. A template of the new doxygen is in, which wait for completion. We did not share the documentation work yet.

@jmirabel
Copy link
Contributor

Doxygen uses the C-preprocessor of CPP files, so the section with:

#ifdef WITH_HPP_FCL
...
#endif

are hidden in the doc.

To enable them, either deactivate the preprocessing via ENABLE_PREPROCESSING = NO or use PREDEFINED = WITH_HPP_FCL to define the right preprocessor variable.

For further reading, see https://www.stack.nl/~dimitri/doxygen/manual/preprocessing.html

@fvalenza fvalenza mentioned this issue Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants