Fixes issue with dangling reference and invalid initialization.
The JntArray initialization fix was causing KDL_test_1 to fail because it checked that the ChainIkSolverPos_NR_JL::CartToJnt checks that output JntArray has the correct size.
The SNSPositionIK change (passing in a reference to chain) fixes an issue with a dangling reference - m_positionFK and m_jacobianSolver only hold a reference to the chain they are passed so it's necessary that the copy be kept alive somewhere. When it was passed by value, a temporary copy was made and then destroyed.
This fixes the tests for me locally in Ubuntu 18.04 and melodic.
Fixes issue with dangling reference and invalid initialization.
The JntArray initialization fix was causing KDL_test_1 to fail because it checked that the ChainIkSolverPos_NR_JL::CartToJnt checks that output JntArray has the correct size.
The SNSPositionIK change (passing in a reference to chain) fixes an issue with a dangling reference - m_positionFK and m_jacobianSolver only hold a reference to the chain they are passed so it's necessary that the copy be kept alive somewhere. When it was passed by value, a temporary copy was made and then destroyed.
This fixes the tests for me locally in Ubuntu 18.04 and melodic.