Currently, the implementation of add_collision_link requires the index.
However, the pybullet link indexing might be different from the name counting on kinematic chains.
Therefore, it is favorable to add collision links based on the name given in the urdf file.
Currently, the implementation of add_collision_link requires the index. However, the pybullet link indexing might be different from the name counting on kinematic chains. Therefore, it is favorable to add collision links based on the name given in the urdf file.
https://github.com/maxspahn/gym_envs_urdf/blob/286914754b1f99fd7da4959060f7388c2dca9e1c/examples/panda_reacher.py#L23C1-L28C6