Use Drake as part of your project
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
bazelis not compatible with your current code base.
Don't worry, you can still use Drake!