Fix #29048: iTaSC solver crash on certain compilers/platforms, due to memory

alignment issues with Eigen. Patch by Tobias Oelgarte.
This commit is contained in:
Brecht Van Lommel 2011-11-13 12:25:14 +00:00
parent 11c83d8432
commit d0550758af
2 changed files with 5 additions and 2 deletions

@ -34,7 +34,8 @@ namespace KDL {
*/
class Chain {
private:
std::vector<Segment> segments;
// Eigen allocator is needed for alignment of Eigen data types
std::vector<Segment, Eigen::aligned_allocator<Segment> > segments;
unsigned int nrOfJoints;
unsigned int nrOfSegments;
public:

@ -27,12 +27,14 @@
#include <string>
#include <map>
#include <Eigen/Core>
namespace KDL
{
//Forward declaration
class TreeElement;
typedef std::map<std::string,TreeElement> SegmentMap;
// Eigen allocator is needed for alignment of Eigen data types
typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<std::string, TreeElement> > > SegmentMap;
class TreeElement
{