How rethinkrobotics-opensource/sns_ik works
SNS-IK is a ROS/C++ library for computing constrained inverse kinematics on redundant robot chains. The main workflow configures a solver with a chain and joint limits, accepts a Cartesian pose or velocity task, and returns joint-space results; velocity algorithms also support prioritized/null-space goals, and the library includes a position solver and acceleration-level base solvers. The graph reflects documented solver variants and sampled initialization/solver internals. Several algorithm implementations were not sampled, so their wiring is shown only where the public facade explicitly selects solver types.
Main entry points: sns_ik.cpp SNS IK facade · sns_ik_base.cpp Shared solver base · sns_vel_ik_base.cpp Base velocity IK · sns_linear_solver.cpp Linear solver
Components 19
Public interface
- SNS IK facade
sns_ik_lib/src/sns_ik.cpp - Solver API
sns_ik_lib/include/sns_ik/sns_ik.hpp - Position IK
sns_ik_lib/src/sns_position_ik.cpp - Chain Jacobian
sns_ik_lib/src/sns_ik.cpp
Velocity algorithms
- SNS velocity
sns_ik_lib/src/sns_velocity_ik.cpp - Optimal SNS
sns_ik_lib/src/osns_velocity_ik.cpp - Margin optimal
sns_ik_lib/src/osns_sm_velocity_ik.cpp - Fast SNS
sns_ik_lib/src/fsns_velocity_ik.cpp - Fast optimal
sns_ik_lib/src/fosns_velocity_ik.cpp
Base solvers
- Base velocity IK
sns_ik_lib/src/sns_vel_ik_base.cpp - Base solver interface
sns_ik_lib/src/sns_vel_ik_base_interface.cpp - Base acceleration IK
sns_ik_lib/src/sns_acc_ik_base.cpp
Numerical support
- Shared solver base
sns_ik_lib/src/sns_ik_base.cpp - Linear solver
sns_ik_lib/utilities/sns_linear_solver.cpp - IK math utilities
sns_ik_lib/utilities/sns_ik_math_utils.cpp
Other components
- IK caller
- ROS parameter server
- Robot description
- KDL kinematics
Connections 18
- IK caller → SNS IK facade: requests IK
- SNS IK facade → IK caller: returns joints
- Solver API → SNS IK facade: defines API
- SNS IK facade → Position IK: solves pose
- SNS IK facade → SNS velocity: dispatches velocity
- SNS IK facade → Optimal SNS: selects variant
- SNS IK facade → Margin optimal: selects variant
- SNS IK facade → Fast SNS: selects variant
- SNS IK facade → Fast optimal: selects variant
- SNS IK facade → Chain Jacobian: creates solver
- SNS IK facade → ROS parameter server: reads parameters
- ROS parameter server → Robot description: supplies description
- SNS IK facade → KDL kinematics: builds chain
- Base solver interface → Base velocity IK: uses base
- Base velocity IK → Shared solver base: uses shared state
- Base acceleration IK → Shared solver base: uses shared state
- Shared solver base → Linear solver: decomposes systems
- Linear solver → IK math utilities: uses legacy inverse