ai-winter / ros_motion_planning

Motion planning and Navigation of AGV/AMR:ROS planner plugin implementation of A*, JPS, D*, LPA*, D* Lite, Theta*, RRT, RRT*, RRT-Connect, Informed RRT*, ACO, PSO, Voronoi, PID, LQR, MPC, DWA, APF, Pure Pursuit etc.
GNU General Public License v3.0
2.29k stars 346 forks source link

Catkin_make error at 93%. QObject’ is an inaccessible base of ‘rviz::_AdditionalTopicSubscriber’ #72

Closed hasel17 closed 6 months ago

hasel17 commented 7 months ago

I already install dekstop-full ROS Noetic and the needed dependences from readme.md. but catkin_make error at compaling. can anyone help me solve the problem?

here's the log

' [ 93%] Building CXX object third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/src/moc_social_activities_display.cpp.o In file included from /opt/ros/noetic/include/rviz/message_filter_display.h:40, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/person_display_common.h:40, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/social_relations_display.h:36, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/social_relations_display.cpp:36: /opt/ros/noetic/include/rviz/properties/ros_topic_property.h: In instantiation of ‘rviz::RosTopicProperty::RosTopicProperty(const QString&, const QString&, const QString&, const QString&, rviz::Property, Func&&, const R) [with Func = const char (&)[15]; R = rviz::_AdditionalTopicSubscriber]’: /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topic_subscriber.h:71:125: required from here /opt/ros/noetic/include/rviz/properties/ros_topic_property.h:59:5: error: ‘QObject’ is an inaccessible base of ‘rviz::_AdditionalTopicSubscriber’ 59 | connect(receiver, std::forward(changed_slot)); | ^~~ In file included from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topic_subscriber.h:52, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/tracked_persons_cache.h:40, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/tracked_persons_cache.cpp:31: /opt/ros/noetic/include/rviz/properties/ros_topic_property.h: In instantiation of ‘rviz::RosTopicProperty::RosTopicProperty(const QString&, const QString&, const QString&, const QString&, rviz::Property, Func&&, const R) [with Func = const char (&)[15]; R = rviz::_AdditionalTopicSubscriber]’: /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topic_subscriber.h:71:125: required from here /opt/ros/noetic/include/rviz/properties/ros_topic_property.h:59:5: error: ‘QObject’ is an inaccessible base of ‘rviz::_AdditionalTopicSubscriber’ 59 | connect(receiver, std::forward(changed_slot)); | ^~~ In file included from /opt/ros/noetic/include/rviz/message_filter_display.h:40, from /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/../../../../../src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/person_display_common.h:40, from /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/../../../../../src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/social_activities_display.h:39, from /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/moc_social_activities_display.cpp:9: /opt/ros/noetic/include/rviz/properties/ros_topic_property.h: In instantiation of ‘rviz::RosTopicProperty::RosTopicProperty(const QString&, const QString&, const QString&, const QString&, rviz::Property, Func&&, const R) [with Func = const char (&)[15]; R = rviz::_AdditionalTopicSubscriber]’: /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/../../../../../src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topic_subscriber.h:71:125: required from here /opt/ros/noetic/include/rviz/properties/ros_topic_property.h:59:5: error: ‘QObject’ is an inaccessible base of ‘rviz::_AdditionalTopicSubscriber’ 59 | connect(receiver, std::forward(changed_slot)); | ^~~ In file included from /opt/ros/noetic/include/rviz/message_filter_display.h:40, from /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/../../../../../src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/person_display_common.h:40, from /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/../../../../../src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/social_relations_display.h:36, from /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/moc_social_relations_display.cpp:9: /opt/ros/noetic/include/rviz/properties/ros_topic_property.h: In instantiation of ‘rviz::RosTopicProperty::RosTopicProperty(const QString&, const QString&, const QString&, const QString&, rviz::Property, Func&&, const R) [with Func = const char (&)[15]; R = rviz::_AdditionalTopicSubscriber]’: /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/../../../../../src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topic_subscriber.h:71:125: required from here /opt/ros/noetic/include/rviz/properties/ros_topic_property.h:59:5: error: ‘QObject’ is an inaccessible base of ‘rviz::_AdditionalTopicSubscriber’ 59 | connect(receiver, std::forward(changed_slot)); | ^~~ In file included from /opt/ros/noetic/include/rviz/message_filter_display.h:40, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/person_display_common.h:40, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/tracked_groups_display.h:40, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/tracked_groups_display.cpp:35: /opt/ros/noetic/include/rviz/properties/ros_topic_property.h: In instantiation of ‘rviz::RosTopicProperty::RosTopicProperty(const QString&, const QString&, const QString&, const QString&, rviz::Property, Func&&, const R) [with Func = const char (&)[15]; R = rviz::_AdditionalTopicSubscriber]’: /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topic_subscriber.h:71:125: required from here /opt/ros/noetic/include/rviz/properties/ros_topic_property.h:59:5: error: ‘QObject’ is an inaccessible base of ‘rviz::_AdditionalTopicSubscriber’ 59 | connect(receiver, std::forward(changed_slot)); | ^~~ In file included from /opt/ros/noetic/include/rviz/message_filter_display.h:40, from /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/../../../../../src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/person_display_common.h:40, from /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/../../../../../src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/tracked_groups_display.h:40, from /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/moc_tracked_groups_display.cpp:9: /opt/ros/noetic/include/rviz/properties/ros_topic_property.h: In instantiation of ‘rviz::RosTopicProperty::RosTopicProperty(const QString&, const QString&, const QString&, const QString&, rviz::Property, Func&&, const R) [with Func = const char (&)[15]; R = rviz::_AdditionalTopicSubscriber]’: /home/nazrin/ros_motion_planning/build/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/../../../../../src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topic_subscriber.h:71:125: required from here /opt/ros/noetic/include/rviz/properties/ros_topic_property.h:59:5: error: ‘QObject’ is an inaccessible base of ‘rviz::_AdditionalTopicSubscriber’ 59 | connect(receiver, std::forward(changed_slot)); | ^~~ In file included from /opt/ros/noetic/include/rviz/message_filter_display.h:40, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/person_display_common.h:40, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/human_attributes_display.h:39, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/human_attributes_display.cpp:35: /opt/ros/noetic/include/rviz/properties/ros_topic_property.h: In instantiation of ‘rviz::RosTopicProperty::RosTopicProperty(const QString&, const QString&, const QString&, const QString&, rviz::Property, Func&&, const R) [with Func = const char (&)[15]; R = rviz::_AdditionalTopicSubscriber]’: /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topic_subscriber.h:71:125: required from here /opt/ros/noetic/include/rviz/properties/ros_topic_property.h:59:5: error: ‘QObject’ is an inaccessible base of ‘rviz::_AdditionalTopicSubscriber’ 59 | connect(receiver, std::forward(changed_slot)); | ^~~ In file included from /opt/ros/noetic/include/rviz/message_filter_display.h:40, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/person_display_common.h:40, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/social_activities_display.h:39, from /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/social_activities_display.cpp:36: /opt/ros/noetic/include/rviz/properties/ros_topic_property.h: In instantiation of ‘rviz::RosTopicProperty::RosTopicProperty(const QString&, const QString&, const QString&, const QString&, rviz::Property, Func&&, const R) [with Func = const char (&)[15]; R = rviz::_AdditionalTopicSubscriber]’: /home/nazrin/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topic_subscriber.h:71:125: required from here /opt/ros/noetic/include/rviz/properties/ros_topic_property.h:59:5: error: ‘QObject’ is an inaccessible base of ‘rviz::_AdditionalTopicSubscriber’ 59 | connect(receiver, std::forward(changed_slot)); | ^~~ make[2]: [third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/build.make:264: third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/src/moc_social_activities_display.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: [third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/build.make:186: third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/src/tracked_persons_cache.cpp.o] Error 1 make[2]: [third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/build.make:251: third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/src/moc_social_relations_display.cpp.o] Error 1 make[2]: [third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/build.make:134: third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/src/social_relations_display.cpp.o] Error 1 make[2]: [third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/build.make:238: third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/src/moc_tracked_groups_display.cpp.o] Error 1 make[2]: [third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/build.make:121: third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/src/tracked_groups_display.cpp.o] Error 1 make[2]: [third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/build.make:160: third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/src/human_attributes_display.cpp.o] Error 1 make[2]: [third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/build.make:147: third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/src/social_activities_display.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:7528: third_party/rviz_plugins/spencer_tracking_rviz_plugin/CMakeFiles/spencer_tracking_rviz_plugin.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 Invoking "make -j8 -l8" failed '

Littledragon-wxl commented 6 months ago

Hello, have you resolved this issue? If so, could you explain it to me?

ai-winter commented 6 months ago

@Littledragon-wxl

It seems to be a compatibility issue between QT and Rviz. Please provide the versions of both.

Littledragon-wxl commented 6 months ago

@ai-winter The version of QT is 5.12.8, and the version of Rviz is 1.14.23

ai-winter commented 6 months ago

@Littledragon-wxl

Could you try reinstall Rviz and compile again?

ParasRanaa commented 6 months ago

Is this issue resolved?

MoyuXiansheng commented 6 months ago

Is this issue resolved?

jusemat commented 6 months ago

I has a similar problem with another pkg that use the spencer_tracking_rviz_plugin after update recently the rviz version via apt update command (from version 1.14.20 to 1.14.23). I just solve the problem by change the QObject heritance to public in the additional_topic_subscriber.h file In your case probably must to change the line 63 in _your_workspace/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topicsubscriber.h from "class _AdditionalTopicSubscriber: QObject" to "class _AdditionalTopicSubscriber: public QObject"

mohd109 commented 6 months ago

@jusemat Thanks a lot, that solved my issue.

XinJingHao commented 4 days ago

I has a similar problem with another pkg that use the spencer_tracking_rviz_plugin after update recently the rviz version via apt update command (from version 1.14.20 to 1.14.23). I just solve the problem by change the QObject heritance to public in the additional_topic_subscriber.h file In your case probably must to change the line 63 in _your_workspace/ros_motion_planning/src/third_party/rviz_plugins/spencer_tracking_rviz_plugin/src/additional_topicsubscriber.h from "class _AdditionalTopicSubscriber: QObject" to "class _AdditionalTopicSubscriber: public QObject"

Solved, thanks a lot!