Commit 819353ad authored by Andrea Del Prete's avatar Andrea Del Prete
Browse files

[c++] Fix bug in initialization of several tasks, which did not initializa the...

[c++] Fix bug in initialization of several tasks, which did not initializa the reference. This was making the software crash in case the user forgot to set a reference for the task.
parent d4ea3dc4
...@@ -40,6 +40,7 @@ namespace tsid ...@@ -40,6 +40,7 @@ namespace tsid
m_L.setZero(3); m_L.setZero(3);
m_dL.setZero(3); m_dL.setZero(3);
m_dL_des.setZero(3); m_dL_des.setZero(3);
m_ref.resize(3);
} }
int TaskAMEquality::dim() const int TaskAMEquality::dim() const
......
...@@ -38,6 +38,7 @@ namespace tsid ...@@ -38,6 +38,7 @@ namespace tsid
m_p_com.setZero(3); m_p_com.setZero(3);
m_v_com.setZero(3); m_v_com.setZero(3);
m_a_des_vec.setZero(3); m_a_des_vec.setZero(3);
m_ref.resize(3);
m_mask.resize(3); m_mask.resize(3);
m_mask.fill(1.); m_mask.fill(1.);
setMask(m_mask); setMask(m_mask);
......
...@@ -31,6 +31,7 @@ m_constraint(name, 3, 3), ...@@ -31,6 +31,7 @@ m_constraint(name, 3, 3),
m_contact_name("") m_contact_name("")
{ {
m_normal << 0, 0, 1; m_normal << 0, 0, 1;
m_ref.setZero();
} }
void TaskCopEquality::setContactList(const std::vector<std::shared_ptr<ContactLevel> > *contacts) void TaskCopEquality::setContactList(const std::vector<std::shared_ptr<ContactLevel> > *contacts)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment