Skip to content

Commit e0dcfa3

Browse files
committed
rviz_plugin_display: comments in CMakeLists.txt, removed some unnecessary stuff, and began adding wiki tags to imu_display source.
1 parent e5dfb25 commit e0dcfa3

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

rviz_plugin_tutorials/CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,23 @@ set(ROS_BUILD_TYPE RelWithDebInfo)
1111

1212
rosbuild_init()
1313

14-
find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED)
14+
# This plugin includes Qt widgets, so we must include Qt like so:
15+
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
1516
include(${QT_USE_FILE})
1617

18+
# I prefer the Qt signals and slots to avoid defining "emit", "slots",
19+
# etc because they can conflict with boost signals.
1720
add_definitions(-DQT_NO_KEYWORDS)
1821

22+
# Here we specify which header files need to be run through "moc",
23+
# Qt's meta-object compiler.
1924
qt4_wrap_cpp(MOC_FILES
2025
src/drive_widget.h
2126
src/teleop_panel.h
2227
)
2328

29+
# Here we specify the list of source files, including the output of
30+
# the previous command which is stored in ${MOC_FILES}.
2431
set(SOURCE_FILES
2532
src/drive_widget.cpp
2633
src/teleop_panel.cpp
@@ -35,5 +42,9 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
3542
#set the default path for built libraries to the "lib" directory
3643
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
3744

45+
# An rviz plugin is just a shared library, so here we declare the
46+
# library and specify the list of source files we collected above.
3847
rosbuild_add_library(${PROJECT_NAME} ${SOURCE_FILES})
39-
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${OGRE_LIBRARIES})
48+
49+
# Link the library
50+
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})

rviz_plugin_tutorials/src/imu_display.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2727
* POSSIBILITY OF SUCH DAMAGE.
2828
*/
29+
// %Tag(FULL_SOURCE)%
2930
#ifndef IMU_DISPLAY_H
3031
#define IMU_DISPLAY_H
3132

@@ -140,3 +141,4 @@ class ImuDisplay: public rviz::Display
140141
} // end namespace rviz_plugin_tutorials
141142

142143
#endif // IMU_DISPLAY_H
144+
// %EndTag(FULL_SOURCE)%

0 commit comments

Comments
 (0)