硬件:jetson nano ,TI_mmwave IWR1443 进行Autonomous Robotics with ROS for mmWave时错误记录1。
问题描述:在ros工作区catkin_make,出现错误:
/home/jetbot/TI_ws/src/turtlebot/turtlebot_apps/turtlebot_follower/src/follower.cpp:317:24: error: expected constructor, destructor, or type conversion before ‘(’ token PLUGINLIB_DECLARE_CLASS(turtlebot_follower, TurtlebotFollower, turtlebot_follower::TurtlebotFollower, nodelet::Nodelet);
解决方案:定位到上述文件位置,打开follower.cpp,将 PLUGINLIB_DECLARE_CLASS(turtlebot_follower, TurtlebotFollower, turtlebot_follower::TurtlebotFollower, nodelet::Nodelet); 更改为: PLUGINLIB_EXPORT_CLASS(TurtlebotFollower , nodelet::Nodelet);
建议不要用:PLUGINLIB_DECLARE_CLASS,以PLUGINLIB_EXPORT_CLASS替换。其中PLUGINLIB_DECLARE_CLASS的参数为4个,而PLUGINLIB_EXPORT_CLASS的参数为两个。