orocos / orocos_kinematics_dynamics

Orocos Kinematics and Dynamics C++ library
710 stars 409 forks source link

Path_RoundedComposite::Clone() doesn't copy F_base_start and F_base_via #445

Open DobbyPeng opened 1 year ago

DobbyPeng commented 1 year ago

I'm trying to use Path_RoundedComposite::Clone() to clone a Path_RoundedComposite object. But I found that Path_RoundedComposite::Clone() doesn't clone F_base_start and F_base_via. If I call Path_RoundedComposite::Finish() on the clone, it doesn't know the last pose.

https://github.com/orocos/orocos_kinematics_dynamics/blob/b35de34ab6ca9cb9a776531f519d95d973f83d7f/orocos_kdl/src/path_roundedcomposite.cpp#L198-L200

MatthijsBurgh commented 1 year ago

According to the constructor: https://github.com/orocos/orocos_kinematics_dynamics/blob/b35de34ab6ca9cb9a776531f519d95d973f83d7f/orocos_kdl/src/path_roundedcomposite.cpp#L55-L59 Everything is taken into account correctly. So the problem is somewhere else.

The variables F_base_start and F_base_via are marked as cache in the header. But I am not really sure that is correct.

But this code is really old and I don't have a clue about what is and should be doing. So please make your case why things need to change in a PR.

DobbyPeng commented 1 year ago

In my case, I want to create a composite path of serval target poses. And in progress, I want to check if poses in the path can be reached by the robot.

So, I want to clone a path and call the Finish() on the clone. Then get every 1 mm(just for example) of pose for inspection.