You find Drake useful, but it is too heavy for your project. All you need is a library to compute the kinematics and dynamics of the robot. Or you just want the optimization part. And
bazel is not compatible with your current code base.
Don't worry, you can still use Drake!