ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Issue compling with ROS Diagnostic [Melodic]

asked 2020-11-03 16:48:04 -0500

mr337 gravatar image

updated 2020-11-03 16:57:53 -0500

Hi,

I am having issues with compiling a working codebase originally built in Kinetic for Melodic. So far the issues have been minor except for the ROS diagnostic package.

It looks like the diagnostic_updater is having a hard time finding the vtable entry. I am not for sure where else to go from here.

CMakeFiles/pid.dir/src/pid/pid.cpp.o: In function `diagnostic_updater::TimeStampStatus::TimeStampStatus(diagnostic_updater::TimeStampStatusParam const&)':
/opt/ros/melodic/include/diagnostic_updater/update_functions.h:300: undefined reference to `vtable for diagnostic_updater::TimeStampStatus'
CMakeFiles/pid.dir/src/pid/pid.cpp.o: In function `diagnostic_updater::TimeStampStatus::~TimeStampStatus()':
/opt/ros/melodic/include/diagnostic_updater/update_functions.h:267: undefined reference to `vtable for diagnostic_updater::TimeStampStatus'
collect2: error: ld returned 1 exit status

Upon compiling it looks like there is

  • More info
  • ROS Melodic X86 Ubuntu 18.04
  • Main ros-diagnostic version: 1.9.7-1bionic.20200930.074903

Following packages

  • ros-diagnostic-msgs - Messages relating to Robot OS diagnostic, definitions
  • ros-melodic-diagnostic-aggregator - diagnostic_aggregator
  • ros-melodic-diagnostic-aggregator-dbgsym - debug symbols for ros-melodic-diagnostic-aggregator
  • ros-melodic-diagnostic-analysis - The diagnostic_analysis package can convert a log of diagnostics data into a series of CSV files.
  • ros-melodic-diagnostic-common-diagnostics - diagnostic_common_diagnostics
  • ros-melodic-diagnostic-msgs - This package holds the diagnostic messages which provide the standardized interface for the diagnostic and runtime monitoring systems in ROS.
  • ros-melodic-diagnostic-updater - diagnostic_updater contains tools for easily updating diagnostics.
  • ros-melodic-diagnostics - diagnostics
  • ros-melodic-rosdiagnostic - Command to print aggregated diagnostic contents to the command line

GCC Version

 gcc -v    
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

ENV

$ env | grep -i ros

CMAKE_PREFIX_PATH=/home/mr337/Dev/robomow/devel:/opt/ros/melodic
LD_LIBRARY_PATH=/home/mr337/Dev/robomow/devel/lib:/opt/ros/melodic/lib
PATH=/opt/ros/melodic/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/mr337/.screenlayout/:/opt/anki/bin:/home/mr337/.screenlayout/:/opt/anki/bin
PKG_CONFIG_PATH=/home/mr337/Dev/robomow/devel/lib/pkgconfig:/opt/ros/melodic/lib/pkgconfig
PYTHONPATH=/home/mr337/Dev/robomow/devel/lib/python2.7/dist-packages:/opt/ros/melodic/lib/python2.7/dist-packages
ROSLISP_PACKAGE_DIRECTORIES=/home/mr337/Dev/robomow/devel/share/common-lisp
ROS_DISTRO=melodic
ROS_ETC_DIR=/opt/ros/melodic/etc/ros
ROS_MASTER_URI=http://localhost:11311
ROS_PACKAGE_PATH=/home/mr337/Dev/robomow/src:/opt/ros/melodic/share
ROS_PYTHON_VERSION=2
ROS_ROOT=/opt/ros/melodic/share/ros
ROS_VERSION=1
edit retag flag offensive close merge delete

Comments

were you able to solve the issue? I am getting the exact same error.

utkarshjp7 gravatar image utkarshjp7  ( 2020-11-06 00:39:29 -0500 )edit

I have not :( For now just to get past I have commented out the code and will take another whack very soon.

mr337 gravatar image mr337  ( 2020-11-06 14:34:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-11-06 14:47:51 -0500

utkarshjp7 gravatar image

Add diagnostic_updater in your CMakeLists.txt

find_package(catkin REQUIRED
    COMPONENTS
    diagnostic_updater
)
edit flag offensive delete link more

Comments

Thank you! I can't believe I overlooked that and amazed that has worked before.

mr337 gravatar image mr337  ( 2020-11-07 12:23:10 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-11-03 16:48:04 -0500

Seen: 450 times

Last updated: Nov 06 '20