krishauser / Klampt

Kris' Locomotion and Manipulation Planning Toolkit
BSD 3-Clause "New" or "Revised" License
378 stars 96 forks source link

Flagging off the 'printf' call in SetupSolver #162

Closed jstmn closed 1 year ago

jstmn commented 1 year ago

Hi,

I'm running the IK solver in robotik.cpp on many (200+) target poses as part of a project with seeds that may be out of the robots' joint limits. As a result I'm getting many printouts from this (line)[https://github.com/krishauser/Klampt/blob/master/Python/klampt/src/robotik.cpp#L613]:

IKSolver:: Joint limits on joint 8 exceeded: -2.8973 <= -2.95596 <= 2.8973. Clamping to limits...

Could we add a flag disable_joint_clamping_warnings or something to remove this printout? They are cluttering up my terminal so I'd love to be able to disable them! I'm happy to submit a pr for this.

Thanks, Jeremy

krishauser commented 1 year ago

What's the intended behavior? Do you want it to clamp the joint angles silently, or ignore the joint limits? In the former, you can silence the errors by clamping the seed configuration manually.

jstmn commented 1 year ago

The intended behavior would be for the solver to silently clamp the joint angles.

I'll go ahead with your suggestion of clamping on the client side, that's an easy solution.