Skip to content

[PV][fix] Remove Reset function from constructor

Tong Fu requested to merge fix/RemoveResetFromConstructor into master

Goal

Previously, Reset function is called in constructor. But some behaviors are not wished in the constructor, such as SetInitialSlam.

Instead of calling Reset function, only the necessary function is called in constructor.

Issue description

After applying slam filter, when a user want to init slam with a map and a initial pose, a warning is displayed but it is not wished. Please see relevant code here. This is because that Reset function is called in constructor and SetInitialSlam function is called In the reset function. It adds an additional identical pose into the current slam.

(Relevant MR !419 (merged))

Changes

  • Call AddLastPosesToTrajectory in SetInitialSlam function.

    The initial pose provided by a user is added into log states. So this pose should be displayed in PV.

  • Remove Reset function from constructor of vtkSlam.

Edited by Tong Fu

Merge request reports