ANYbotics / elevation_mapping

Robot-centric elevation mapping for rough terrain navigation
BSD 3-Clause "New" or "Revised" License
1.36k stars 446 forks source link

/opt/ros/melodic/lib/libtf.so: undefined reference to `tf2_ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)' #143

Closed kashifzr closed 4 years ago

kashifzr commented 4 years ago

I am trying to install elevation_mapping, when i used the command given on installation page then create issues like

 catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
Traceback (most recent call last):
  File "/usr/bin/catkin", line 11, in <module>
    load_entry_point('catkin-tools==0.6.1', 'console_scripts', 'catkin')()
  File "/home/abc/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/abc/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/home/abc/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/home/abc/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/abc/.local/lib/python2.7/site-packages/catkin_tools/commands/catkin.py", line 28, in <module>
    from catkin_tools.common import is_tty
  File "/home/abc/.local/lib/python2.7/site-packages/catkin_tools/common.py", line 24, in <module>
    import asyncio
ImportError: No module named asyncio

I normally used catkin_make for installation of all the dependencies, like kindr, kindr_ros, grid_map, but in case of elevation_mapping neither catkin_make nor catkin build works

[ 60%] Built target costmap_2d
[ 65%] Built target grid_map_filters
[ 66%] Built target grid_map_loader
[ 69%] Built target grid_map_visualization
[ 71%] Built target grid_map_pcl
[ 71%] Linking CXX executable /home/abc/catkin_geometry_ws/devel/lib/elevation_mapping/elevation_mapping
/opt/ros/melodic/lib/libtf.so: undefined reference to `tf2_ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)'
collect2: error: ld returned 1 exit status
elevation_mapping/elevation_mapping/CMakeFiles/elevation_mapping.dir/build.make:321: recipe for target '/home/abc/catkin_geometry_ws/devel/lib/elevation_mapping/elevation_mapping' failed
make[2]: *** [/home/abc/catkin_geometry_ws/devel/lib/elevation_mapping/elevation_mapping] Error 1
CMakeFiles/Makefile2:17080: recipe for target 'elevation_mapping/elevation_mapping/CMakeFiles/elevation_mapping.dir/all' failed
make[1]: *** [elevation_mapping/elevation_mapping/CMakeFiles/elevation_mapping.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

Any Help to resolve this issue,