Robotics StackExchange | Archived questions

Compiler error: Expected constructor, destructor, or type conversion in octomap_server_nodelet.cpp

I'm currently trying to build a project found here : https://github.com/mariogianni/trav_nav_indigo_ws I'm using ROS Medolic on Ubuntu 18. 04.3 LTS

When running catkin_make -j8 i get the following error:

/home/rwilliams/trav_nav_indigo_ws/src/ms_octomap_server/src/octomap_server_nodelet.cpp:60:24: error: expected constructor, destructor, or type conversion before ‘(’ token
 PLUGINLIB_DECLARE_CLASS(ms_octomap_server, OctomapServerNodelet, ms_octomap_server::OctomapServerNodelet, nodelet::Nodelet);

I have checked that I have the packages required installed.

Any ideas on how to fix this issue?

Asked by anonymous49656 on 2019-11-22 07:12:46 UTC

Comments

Answers

Replace

PLUGINLIB_DECLARE_CLASS(depthimage_to_laserscan, DepthImageToLaserScanNodelet, depthimage_to_laserscan::DepthImageToLaserScanNodelet, nodelet::Nodelet);

with

PLUGINLIB_EXPORT_CLASS(depthimage_to_laserscan::DepthImageToLaserScanNodelet, nodelet::Nodelet);

this should work!!

Asked by mr.sid_shete on 2022-06-24 03:24:49 UTC

Comments