Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build ufomap_rviz_plugins #15

Closed
cmakelabs opened this issue Jun 17, 2024 · 6 comments · May be fixed by #19
Closed

Cannot build ufomap_rviz_plugins #15

cmakelabs opened this issue Jun 17, 2024 · 6 comments · May be fixed by #19

Comments

@cmakelabs
Copy link

cmakelabs commented Jun 17, 2024

Hello, I am trying to build ufomap, but I encountered the following issue:

Errors     << ufomap_rviz_plugins:make /home/nuc/ufo_ws/logs/ufomap_rviz_plugins/build.make.001.log                                        
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qnamespace.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:46,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QObject:1,
                 from /opt/ros/noetic/include/rviz/properties/property.h:34,
                 from /opt/ros/noetic/include/rviz/properties/status_property.h:32,
                 from /opt/ros/noetic/include/rviz/display.h:38,
                 from /home/nuc/ufo_ws/src/ufomap/ufomap_ros/ufomap_rviz_plugins/include/ufomap_rviz_plugins/ufomap_display.h:56,
                 from /home/nuc/ufo_ws/src/ufomap/ufomap_ros/ufomap_rviz_plugins/src/ufomap_display.cpp:44:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h: In instantiation of ‘static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = void (rviz::Property::*)(); Func2 = std::nullptr_t; typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1), QMetaObject::Connection>::type = QMetaObject::Connection; typename QtPrivate::FunctionPointer<Func>::Object = rviz::Property]’:
/opt/ros/noetic/include/rviz/properties/property.h:187:94:   required from ‘typename std::enable_if<(! QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction), QMetaObject::Connection>::type rviz::Property::connect(const QObject*, Func&&, Qt::ConnectionType) [with Func = std::nullptr_t; typename std::enable_if<(! QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction), QMetaObject::Connection>::type = QMetaObject::Connection]’
/opt/ros/noetic/include/rviz/properties/string_property.h:56:5:   required from ‘rviz::StringProperty::StringProperty(const QString&, const QString&, const QString&, rviz::Property*, Func&&, const R*) [with Func = std::nullptr_t; R = ufomap_ros::rviz_plugins::UFOMapDisplay]’
/home/nuc/ufo_ws/src/ufomap/ufomap_ros/ufomap_rviz_plugins/src/ufomap_display.cpp:80:88:   required from here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:314:9: error: static assertion failed: Signal and slot arguments are not compatible.
  314 |         Q_STATIC_ASSERT_X((FunctorArgumentCount >= 0),
      |         ^~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:50,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:46,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QObject:1,
                 from /opt/ros/noetic/include/rviz/properties/property.h:34,
                 from /opt/ros/noetic/include/rviz/properties/status_property.h:32,
                 from /opt/ros/noetic/include/rviz/display.h:38,
                 from /home/nuc/ufo_ws/src/ufomap/ufomap_ros/ufomap_rviz_plugins/include/ufomap_rviz_plugins/ufomap_display.h:56,
                 from /home/nuc/ufo_ws/src/ufomap/ufomap_ros/ufomap_rviz_plugins/src/ufomap_display.cpp:44:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h: In instantiation of ‘struct QtPrivate::FunctorReturnType<std::nullptr_t, QtPrivate::List<> >’:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:317:158:   required from ‘static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = void (rviz::Property::*)(); Func2 = std::nullptr_t; typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1), QMetaObject::Connection>::type = QMetaObject::Connection; typename QtPrivate::FunctionPointer<Func>::Object = rviz::Property]’
/opt/ros/noetic/include/rviz/properties/property.h:187:94:   required from ‘typename std::enable_if<(! QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction), QMetaObject::Connection>::type rviz::Property::connect(const QObject*, Func&&, Qt::ConnectionType) [with Func = std::nullptr_t; typename std::enable_if<(! QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction), QMetaObject::Connection>::type = QMetaObject::Connection]’
/opt/ros/noetic/include/rviz/properties/string_property.h:56:5:   required from ‘rviz::StringProperty::StringProperty(const QString&, const QString&, const QString&, rviz::Property*, Func&&, const R*) [with Func = std::nullptr_t; R = ufomap_ros::rviz_plugins::UFOMapDisplay]’
/home/nuc/ufo_ws/src/ufomap/ufomap_ros/ufomap_rviz_plugins/src/ufomap_display.cpp:80:88:   required from here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:367:52: error: request for member ‘operator()’ in ‘QtPrivate::FunctorReturnType<std::nullptr_t, QtPrivate::List<> >::dummy<std::nullptr_t>()’, which is of non-class type ‘std::nullptr_t’
  367 |         typedef decltype(dummy<Functor>().operator()((dummy<ArgList>())...)) Value;
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^
make[2]: *** [CMakeFiles/ufomap_rviz_plugins.dir/build.make:80: CMakeFiles/ufomap_rviz_plugins.dir/src/ufomap_display.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:216: CMakeFiles/ufomap_rviz_plugins.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Everything else seems to be fine, but this issue is a bit ambiguous, may you please help overcoming it?

@gityeezy
Copy link

I have the same problem, have you solved it?

@cmakelabs
Copy link
Author

Unfortunately, not yet

@gityeezy
Copy link

Actually, I don't know what the problem is exactly, but I figured out that it might be an issue with the device. I use two other computers, both of which are pure ubuntu systems, and they can compile successfully. But only my computer doesn't work. You can try changing the device.

@cmakelabs
Copy link
Author

Thanks for informing, but there certainly should be a software solution or at least workaround, I hope the authors can suggest something in that regard, at least for me to understand what usually could cause such issues

@bit-lsj
Copy link

bit-lsj commented Jun 24, 2024

Hello, you can replace lines 79-88 of the ufomap_display.cpp file with the following code:
resolution_property_ = new rviz::StringProperty( "Resolution", "", "Resolution of the occupancy map", info_property_); num_leaf_nodes_property_ = new rviz::StringProperty("# Leaf Nodes", "", "Number of leaf nodes in the octree", info_property_); num_inner_nodes_property_ = new rviz::StringProperty("# Inner Nodes", "", "Number of inner nodes in the octree", info_property_); size_property_ = new rviz::StringProperty("Size", "", "Size of the octree", info_property_);

@cmakelabs
Copy link
Author

Thank you, it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants