Skip to content
Snippets Groups Projects
Commit 4d347093 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Add Key frame assert to FrameBase::link

parent ab448243
No related branches found
No related tags found
1 merge request!362WIP: Resolve "std::set and std::map instead of std::list in wolf nodes"
Pipeline #5451 failed
...@@ -287,6 +287,7 @@ void FrameBase::link(TrajectoryBasePtr _trj_ptr) ...@@ -287,6 +287,7 @@ void FrameBase::link(TrajectoryBasePtr _trj_ptr)
{ {
assert(!is_removing_ && "linking a removed frame"); assert(!is_removing_ && "linking a removed frame");
assert(this->getTrajectory() == nullptr && "linking an already linked frame"); assert(this->getTrajectory() == nullptr && "linking an already linked frame");
assert(isKey() && "Trying to link a non keyframe");
if(_trj_ptr) if(_trj_ptr)
{ {
......
...@@ -55,7 +55,7 @@ TEST_F(HasStateBlocksTest, Notifications_setKey_add) ...@@ -55,7 +55,7 @@ TEST_F(HasStateBlocksTest, Notifications_setKey_add)
Notification n; Notification n;
ASSERT_FALSE(problem->getStateBlockNotification(sbp0, n)); ASSERT_FALSE(problem->getStateBlockNotification(sbp0, n));
// F0->link(problem->getTrajectory()); ASSERT_DEATH(F0->link(problem->getTrajectory()), "Assertion `isKey()");
// ASSERT_FALSE(problem->getStateBlockNotification(sbp0, n)); // ASSERT_FALSE(problem->getStateBlockNotification(sbp0, n));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment