KDL's use of assert's

There are a bunch of assert() checks in the SVD_eigen related code in KDL. We've started triggering those asserts - haven't yet debugged what in particular in the robot configuration is causing this.

Shouldn't svd_eigen_HH.cpp return an error instead of exiting the application? Is there a particular reason assert's were used here?

I will work up a patch to replace the asserts with something more reasonable, and less spectactular on program reliability.

Stephen

KDL's use of assert's

On Friday 24 September 2010 15:36:13 S Roderick wrote:
> There are a bunch of assert() checks in the SVD_eigen related code in KDL.
> We've started triggering those asserts - haven't yet debugged what in
> particular in the robot configuration is causing this.
>
> Shouldn't svd_eigen_HH.cpp return an error instead of exiting the
> application? Is there a particular reason assert's were used here?
>
> I will work up a patch to replace the asserts with something more
> reasonable, and less spectactular on program reliability.

I agree here. asserts don't work when -DNDEBUG is used (cmake Release builds)
so should only be triggered for developers / internal consistency / or unit
tests.

In all other cases, an error code must be returned.

Peter