When implementing a new joint, you will primarily interact with the following directory structure:
include/pinocchio/multibody/joint/: Core joint implementation (C++ headers). Your new joint header (e.g., joint-<name>.hpp) goes here.include/pinocchio/parsers/graph/: Graph integration for URDF support.src/parsers/graph/: Graph visitor implementations (C++ source files).bindings/python/: Python bindings for exposing joints to Python users.unittest/: Unit tests. Create unittest/joint-<name>.cpp for your joint tests.examples/: Usage examples. Create <name>-joint-kinematics.py for your examples.
pinocchio/
├── include/pinocchio/
│ ├── multibody/
│ │ ├── joint/
│ │ │ ├── fwd.hpp
│ │ │ ├── joints.hpp
│ │ │ ├── joint-collection.hpp
│ │ │ ├── joint-revolute.hpp
│ │ │ ├── joint-spherical-ZYX.hpp
│ │ │ └── joint-<name>.hpp # Your new joint goes here
│ │ ├── model.hpp
│ │ └── data.hpp
│ ├── parsers/
│ │ └── graph/
│ │ ├── joints.hpp
│ │ ├── graph-visitor.hpp
│ │ └── model-configuration-converter.hxx
│ └── serialization/
│ ├── joints-model.hpp
│ └── joints-data.hpp
├── src/
│ └── parsers/
│ └── graph/
│ ├── model-graph.cpp
│ └── model-graph-algo.cpp
├── bindings/python/
│ ├── multibody/joint/
│ │ ├── joints-models.hpp
│ │ └── joints-datas.hpp
│ └── parsers/graph/
│ └── expose-edges.cpp
├── unittest/
│ ├── joint-<name>.cpp # Your joint tests go here
│ ├── model-graph.cpp
│ ├── model-configuration-converter.cpp
│ └── CMakeLists.txt
└── examples/
└── <name>-joint-kinematics.py # Your example goes here