Create octree
Hi!
This question is really simple I think but I can't figure it out. This code:
#include <octomap_msgs/Octomap.h>//Octomap Binary
#include <octomap/OcTree.h>
#include <octomap_msgs/conversions.h>
int main(int argc, char **argv)
{
ros::init(argc, argv, "mapper");
ros::NodeHandle n;
octomap::OcTree* octomap_ = new octomap::OcTree(0.1f);
ros::spin();
return 0;
}
Gives this compile error
CMakeFiles/mapper_node.dir/src/nodes/mapper_node.cpp.o: In function `octomath::Pose6D::Pose6D(octomath::Pose6D const&)':
mapper_node.cpp:(.text._ZN8octomath6Pose6DC2ERKS0_[_ZN8octomath6Pose6DC5ERKS0_]+0x3a): undefined reference to `octomath::Quaternion::Quaternion(octomath::Quaternion const&)'
CMakeFiles/mapper_node.dir/src/nodes/mapper_node.cpp.o: In function `octomap::OcTreeNode::updateOccupancyChildren()':
mapper_node.cpp:(.text._ZN7octomap10OcTreeNode23updateOccupancyChildrenEv[_ZN7octomap10OcTreeNode23updateOccupancyChildrenEv]+0x14): undefined reference to `octomap::OcTreeNode::getMaxChildLogOdds() const'
CMakeFiles/mapper_node.dir/src/nodes/mapper_node.cpp.o: In function `octomap::OcTreeBaseImpl<octomap::OcTreeNode, octomap::AbstractOccupancyOcTree>::OcTreeBaseImpl(double)':
mapper_node.cpp:(.text._ZN7octomap14OcTreeBaseImplINS_10OcTreeNodeENS_23AbstractOccupancyOcTreeEEC2Ed[_ZN7octomap14OcTreeBaseImplINS_10OcTreeNodeENS_23AbstractOccupancyOcTreeEEC5Ed]+0x1a): undefined reference to `octomap::AbstractOccupancyOcTree::AbstractOccupancyOcTree()'
Isn't this the simplest possible initialization? What am I missing?
octree 1.6.9, indigo