Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding initial (empty) rqt_smach plugin
- Loading branch information
Showing
7 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
cmake_minimum_required(VERSION 2.4.6) | ||
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) | ||
|
||
# Set the build type. Options are: | ||
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage | ||
# Debug : w/ debug symbols, w/o optimization | ||
# Release : w/o debug symbols, w/ optimization | ||
# RelWithDebInfo : w/ debug symbols, w/ optimization | ||
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries | ||
#set(ROS_BUILD_TYPE RelWithDebInfo) | ||
|
||
rosbuild_init() | ||
|
||
#set the default path for built executables to the "bin" directory | ||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) | ||
#set the default path for built libraries to the "lib" directory | ||
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) | ||
|
||
#uncomment if you have defined messages | ||
#rosbuild_genmsg() | ||
#uncomment if you have defined services | ||
#rosbuild_gensrv() | ||
|
||
#common commands for building c++ executables and libraries | ||
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp) | ||
#target_link_libraries(${PROJECT_NAME} another_library) | ||
#rosbuild_add_boost_directories() | ||
#rosbuild_link_boost(${PROJECT_NAME} thread) | ||
#rosbuild_add_executable(example examples/example.cpp) | ||
#target_link_libraries(example ${PROJECT_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(shell rospack find mk)/cmake.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
\mainpage | ||
\htmlinclude manifest.html | ||
|
||
\b rqt_smach | ||
|
||
<!-- | ||
Provide an overview of your package. | ||
--> | ||
|
||
--> | ||
|
||
|
||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<package> | ||
<description brief="rqt_smach"> | ||
|
||
rqt_smach | ||
|
||
</description> | ||
<author>Jonathan Bohren</author> | ||
<license>BSD</license> | ||
<review status="unreviewed" notes=""/> | ||
<url>http://ros.org/wiki/rqt_smach</url> | ||
<depend package="rospy"/> | ||
<depend package="rqt_gui"/> | ||
<depend package="rqt_gui_py"/> | ||
|
||
<export> | ||
<rqt_gui plugin="${prefix}/plugin.xml"/> | ||
</export> | ||
|
||
</package> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<library path="src"> | ||
<class name="SMACH Visualization" type="rqt_smach.rqt_smach.SMACHVisualization" base_class_type="rqt_gui_py::Plugin"> | ||
<description> | ||
An RQT plugin to visualize SMACH plans. | ||
</description> | ||
<qtgui> | ||
<!-- optional grouping... | ||
<group> | ||
<label>Group</label> | ||
</group> | ||
<group> | ||
<label>Subgroup</label> | ||
</group> | ||
--> | ||
<label>SMACH</label> | ||
<icon type="theme">system-help</icon> | ||
<statustip>SMACH Visualization</statustip> | ||
</qtgui> | ||
</class> | ||
</library> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import os | ||
import roslib | ||
roslib.load_manifest('rqt_smach') | ||
import rospy | ||
|
||
from qt_gui.plugin import Plugin | ||
from python_qt_binding import loadUi | ||
from python_qt_binding.QtGui import QWidget | ||
|
||
class SMACHVisualization(Plugin): | ||
|
||
def __init__(self, context): | ||
super(SMACHVisualization, self).__init__(context) | ||
# Give QObjects reasonable names | ||
self.setObjectName('SMACHVisualization') | ||
|
||
# Process standalone plugin command-line arguments | ||
from argparse import ArgumentParser | ||
parser = ArgumentParser() | ||
# Add argument(s) to the parser. | ||
parser.add_argument("-q", "--quiet", action="store_true", | ||
dest="quiet", | ||
help="Put plugin in silent mode") | ||
args, unknowns = parser.parse_known_args(context.argv()) | ||
if not args.quiet: | ||
print 'arguments: ', args | ||
print 'unknowns: ', unknowns | ||
|
||
# Create QWidget | ||
self._widget = QWidget() | ||
# Get path to UI file which is a sibling of this file | ||
# in this example the .ui and .py file are in the same folder | ||
ui_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'SMACHVisualization.ui') | ||
# Extend the widget with all attributes and children from UI file | ||
loadUi(ui_file, self._widget) | ||
# Give QObjects reasonable names | ||
self._widget.setObjectName('SMACHVisualizationUi') | ||
# Add widget to the user interface | ||
context.add_widget(self._widget) | ||
|
||
def shutdown_plugin(self): | ||
# TODO unregister all publishers here | ||
pass | ||
|
||
def save_settings(self, plugin_settings, instance_settings): | ||
# TODO save intrinsic configuration, usually using: | ||
# instance_settings.set_value(k, v) | ||
pass | ||
|
||
def restore_settings(self, plugin_settings, instance_settings): | ||
# TODO restore intrinsic configuration, usually using: | ||
# v = instance_settings.value(k) | ||
pass | ||
|
||
#def trigger_configuration(self): | ||
# Comment in to signal that the plugin has a way to configure it | ||
# Usually used to open a configuration dialog |