HKUST-Aerial-Robotics / Teach-Repeat-Replan

Teach-Repeat-Replan: A Complete and Robust System for Aggressive Flight in Complex Environments
GNU General Public License v3.0
962 stars 252 forks source link

A minor fix in pluginlib for those using Ubuntu 18.04 and ROS melodic #34

Closed syangav closed 4 years ago

syangav commented 4 years ago

In Ubuntu 18.04 and ROS melodic, the following compilation error will occur (ubuntu 16.04 & ROS kinetic works fine however): error: expected constructor, destructor, or type conversion before ‘(’ token PLUGINLIB_DECLARE_CLASS(router, RouterNode, RouterNode, nodelet::Nodelet);

The solution is to change the line from: PLUGINLIB_DECLARE_CLASS(router, RouterNode, RouterNode, nodelet::Nodelet); to: PLUGINLIB_EXPORT_CLASS(RouterNode, nodelet::Nodelet);

Note that this issue is caused by different versions of pluginlib and this similar issue will happen 3 times (CascadeControllerNode, MissionTemplateNode, RouterNode). Just using similar fixes will be fine.

One can find the references from 1, 2, 3.

bigsuperZZZX commented 4 years ago

Thank you very much for correction. I will post it to readme.md, hoping to help more people that use Ubuntu 18.04 and ROS melodic.

958117216 commented 4 years ago

太感谢了!!!!!!!!

Akashleena commented 3 years ago

Having the same problem in ROS Noetic and Ubuntu 20.04