Skip to content

Commit 8e4ff8d

Browse files
author
Oleksandr
authored
Gazebo set distance plugin linker error fix(ros-navigation#238)
1 parent 5802616 commit 8e4ff8d

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

amr_gazebo/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ ament_target_dependencies(animation_plugin
9494
ament_export_libraries(animation_plugin)
9595

9696
# _set_camera_distance_plugin
97+
QT5_WRAP_CPP(headers_MOC include/SetDistancePlugin.hpp)
9798
add_library(_set_camera_distance_plugin SHARED ${headers_MOC}
98-
plugins/SetDistancePlugin.cc)
99-
99+
plugins/SetDistancePlugin.cpp)
100100
include_directories(SYSTEM ${GAZEBO_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS})
101101
target_include_directories(_set_camera_distance_plugin PUBLIC include)
102102

amr_gazebo/include/SetDistancePlugin.hh renamed to amr_gazebo/include/SetDistancePlugin.hpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
#ifndef _GUI_EXAMPLE_SPAWN_WIDGET_HH_
2-
#define _GUI_EXAMPLE_SPAWN_WIDGET_HH_
1+
#ifndef _GUI_SET_DISTANCE_HH_
2+
#define _GUI_SET_DISTANCE_HH_
33

44
// moc parsing error of tbb headers
55
#ifndef Q_MOC_RUN
66
#include <gazebo/transport/transport.hh>
7-
#endif
7+
#endif //Q_MOC_RUN
88

9-
#include <gazebo/gui/GuiPlugin.hh>
9+
//#include <gazebo/gui/GuiPlugin.hh>
1010
#include <gazebo/gui/GuiIface.hh>
11-
#include <gazebo/msgs/msgs.hh>
11+
//#include <gazebo/msgs/msgs.hh>
1212
#include <gazebo/gazebo.hh>
1313
#include <gazebo/rendering/rendering.hh>
14-
#include <sstream>
14+
//#include <sstream>
15+
16+
#include <gazebo/common/Plugin.hh>
17+
#include <gazebo/gui/GuiPlugin.hh>
1518

1619
namespace gazebo {
1720
class GAZEBO_VISIBLE SetDistancePlugin : public GUIPlugin {
@@ -27,4 +30,5 @@ namespace gazebo {
2730
~SetDistancePlugin() override = default;
2831
};
2932
} // namespace gazebo
30-
#endif
33+
34+
#endif //_GUI_SET_DISTANCE_HH_

amr_gazebo/plugins/SetDistancePlugin.cc renamed to amr_gazebo/plugins/SetDistancePlugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "SetDistancePlugin.hh"
1+
#include "SetDistancePlugin.hpp"
22

33
using namespace gazebo;
44

0 commit comments

Comments
 (0)