Ask Your Question
0

pcl_to_octree cannot compile. Octomap bug?

asked 2011-05-02 01:24:52 -0600

raphael favier gravatar image

Hello,

I am trying to compile the package next_best_view which depends on pcl_to_octree. Pcl_to_octree's compilation fails due to an inner octomap function.

From the line

/opt/ros/diamondback/stacks/octomap_mapping/octomap/octomap/include/octomap/OcTreeBase.hxx:484: error: no matching function for call to ‘octomap::OcTreeBase<octomap::OcTreeNodePCL>::genCoordFromKey(short unsigned int&, double&) const’

of my build output, it seems that the error is due to a cast double->float cast problem.

As the function calling genCoordFromKey is in a /opt/ros directory, I'm starting to think I might have found a bug in octomap itself. Could someone tell me if I am correct? Or am I plainly wrong?

Thanks in advance

Raph

----------

here is the compilation log:

[rosmake-0] Starting >>> pcl_to_octree [ make ]                                                                                                              
[ rosmake ] Last 40 linesl_to_octree: 5.3 sec ]                                                                                   [ 1 Active 43/44 Complete ]
{-------------------------------------------------------------------------------
  -- Build files have been written to: /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build
  cd build && make -l2
  make[1]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[2]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[3]: Leaving directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[3]: Leaving directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[3]: Leaving directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  [ 14%] Building CXX object CMakeFiles/octree_pcl.dir/src/pcl_to_octree/octree/OcTreePCL.o
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp: In member function ‘unsigned int octomap::OcTreePCL::memoryUsage() const’:
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp:73: warning: ‘void octomap::OcTreeBase<NODE>::getLeafNodes(std::list<std::pair<octomath::Vector3, double>, std::allocator<std::pair<octomath::Vector3, double> > >&, unsigned int) const [with NODE = octomap::OcTreeNodePCL]’ is deprecated (declared at /opt/ros/diamondback/stacks/octomap_mapping/octomap/octomap/include/octomap/OcTreeBase.hxx:550)
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp: In member function ‘void octomap::OcTreePCL::insertScanUniform(const octomap::ScanNode&, double)’:
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp:224: warning: ‘double octomath::Vector3::norm2() const’ is deprecated (declared at /opt/ros/diamondback/stacks/octomap_mapping/octomap/octomap/include/octomap/math/Vector3.h:272)
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp:238: warning: ‘octomath::Vector3 octomath::Vector3::unit() const’ is deprecated (declared at /opt/ros/diamondback/stacks/octomap_mapping/octomap/octomap/include/octomap/math/Vector3.h:289)
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp:251: warning: ‘void octomap::OcTreeBase<NODE>::getLeafNodes(std::list<std::pair<octomath::Vector3, double>, std::allocator<std::pair<octomath::Vector3, double> > >&, unsigned int) const [with NODE = octomap::CountingOcTreeNode]’ is deprecated (declared at /opt ...
(more)
edit retag flag offensive close merge delete

Comments

Raph, give me a couple of hours and I'll fix this. D.
dejanpan gravatar imagedejanpan ( 2011-05-02 03:11:14 -0600 )edit
Thanks Dejan. I can wait a bit more if you need ;)
raphael favier gravatar imageraphael favier ( 2011-05-02 03:19:31 -0600 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2011-05-02 09:03:56 -0600

dejanpan gravatar image

Hey Raphael, run "git pull --rebase" and the fixes shall be there and compile against ros-diamondback-octomap-mapping. I still get some deprecation warning which I will fix after talking to Armin or Kai.

cheers, D.

edit flag offensive delete link more
0

answered 2011-05-03 01:16:20 -0600

raphael favier gravatar image

updated 2011-05-04 01:11:20 -0600

Dejan,

thanks a lot. As you said, pcl_to_octree compiles smoothly. Only 10 warnings left. next_best_view compiles too and outputs only 3 warnings.

I will certainly try next_best_view within this week so I can give you more feedback related to runtime behaviour.

Thanks again for the quick fixing

Raph

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-05-02 01:24:52 -0600

Seen: 383 times

Last updated: May 04 '11