Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge segbot_apps packages into segbot (#46)
- Loading branch information
1 parent
aaa122b
commit 3ec5f66
Showing
37 changed files
with
3,001 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
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,48 @@ | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Changelog for package segbot_gui | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
0.3.1 (2015-03-31) | ||
------------------ | ||
|
||
0.3.0 (2015-03-24) | ||
------------------ | ||
* removed unnecessary script installation which installs in global bin instead of package bin. | ||
* migrated QuestionDialog srv to bwi_msgs in bwi_common | ||
* now return preempted option when preempted | ||
* fixed a timeout issue with the gui where preempted requests were not timing out. | ||
* enlarge the GUI font | ||
* Contributors: Piyush Khandelwal, Shiqi Zhang | ||
|
||
0.2.1 (2014-04-22) | ||
------------------ | ||
|
||
0.2.0 (2014-04-19) | ||
------------------ | ||
* now catkin_lint approved. found a bug where a plugin file was not | ||
being installed | ||
* increased default font size in the segbot gui | ||
* added missing run dependencies | ||
* added ability to ask a text-input question | ||
* better pep8 conformity | ||
* rqt simple question plugin is now ready | ||
* added a new gui package with a question dialog plugin for rqt | ||
* Contributors: Jack O'Quin, Piyush Khandelwal, piyushk | ||
|
||
0.1.5 (2013-09-03) | ||
------------------ | ||
|
||
0.1.4 (2013-08-12) | ||
------------------ | ||
|
||
0.1.3 (2013-07-16) | ||
------------------ | ||
|
||
0.1.2 (2013-07-13) | ||
------------------ | ||
|
||
0.1.1 (2013-07-10) | ||
------------------ | ||
|
||
0.1.0 (2013-06-28) | ||
------------------ |
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,12 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(segbot_gui) | ||
find_package(catkin REQUIRED) | ||
catkin_package() | ||
|
||
install(PROGRAMS scripts/question_dialog_plugin | ||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
) | ||
|
||
install(FILES plugin.xml | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
) |
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,35 @@ | ||
<?xml version="1.0"?> | ||
<package> | ||
<name>segbot_gui</name> | ||
<version>0.3.1</version> | ||
<description> | ||
Displays a simple GUI to the user. The GUI is capable of displaying a simple | ||
message or image to the user, and ask a question. The message and question | ||
plugins are also written in this package. | ||
</description> | ||
|
||
<maintainer email="piyushk@gmail.com">Piyush Khandelwal</maintainer> | ||
<maintainer email="jack.oquin@gmail.com">Jack O'Quin</maintainer> | ||
|
||
<license>BSD</license> | ||
|
||
<url type="website">http://ros.org/wiki/segbot_gui</url> | ||
<url type="repository">https://github.com/utexas-bwi/segbot.git</url> | ||
<url type="bugtracker">https://github.com/utexas-bwi/segbot/issues</url> | ||
|
||
<author email="piyushk@gmail.com">Piyush Khandelwal</author> | ||
|
||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<run_depend>bwi_msgs</run_depend> | ||
<run_depend>python_qt_binding</run_depend> | ||
<run_depend>qt_gui</run_depend> | ||
<run_depend>rospy</run_depend> | ||
<run_depend>rqt_gui</run_depend> | ||
<run_depend>rqt_gui_py</run_depend> | ||
|
||
<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,15 @@ | ||
<library path="src"> | ||
<class name="QuestionDialogPlugin" | ||
type="segbot_gui.plugins.QuestionDialogPlugin" | ||
base_class_type="rqt_gui_py::Plugin"> | ||
<description> | ||
A text widget that allows simple human interaction - displaying | ||
text to the user and asking a question with choices. | ||
</description> | ||
<qtgui> | ||
<label>Question Dialog Plugin</label> | ||
<icon type="theme">dialog-question</icon> | ||
<statustip>Display text or ask a question from the user.</statustip> | ||
</qtgui> | ||
</class> | ||
</library> |
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,9 @@ | ||
#!/usr/bin/env python | ||
|
||
import sys | ||
|
||
from rqt_gui.main import Main | ||
|
||
plugin = 'segbot_gui.plugins.QuestionDialogPlugin' | ||
main = Main(filename=plugin) | ||
sys.exit(main.main(standalone=plugin)) |
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,11 @@ | ||
#!/usr/bin/env python | ||
|
||
from distutils.core import setup | ||
from catkin_pkg.python_setup import generate_distutils_setup | ||
|
||
d = generate_distutils_setup( | ||
packages=['segbot_gui'], | ||
package_dir={'': 'src'}, | ||
) | ||
|
||
setup(**d) |
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,132 @@ | ||
import rospy | ||
import time | ||
|
||
from bwi_msgs.srv import QuestionDialog, QuestionDialogResponse, \ | ||
QuestionDialogRequest | ||
from functools import partial | ||
from qt_gui.plugin import Plugin | ||
from python_qt_binding.QtGui import QFont, QHBoxLayout, QLabel, QLineEdit, \ | ||
QPushButton, QTextBrowser, QVBoxLayout, \ | ||
QWidget | ||
from python_qt_binding.QtCore import SIGNAL | ||
|
||
class QuestionDialogPlugin(Plugin): | ||
|
||
def __init__(self, context): | ||
super(QuestionDialogPlugin, self).__init__(context) | ||
# Give QObjects reasonable names | ||
self.setObjectName('QuestionDialogPlugin') | ||
|
||
font_size = rospy.get_param("~font_size", 40) | ||
|
||
# Create QWidget | ||
self._widget = QWidget() | ||
self._widget.setFont(QFont("Times", font_size, QFont.Bold)) | ||
self._layout = QVBoxLayout(self._widget) | ||
self._text_browser = QTextBrowser(self._widget) | ||
self._layout.addWidget(self._text_browser) | ||
self._button_layout = QHBoxLayout() | ||
self._layout.addLayout(self._button_layout) | ||
|
||
# layout = QVBoxLayout(self._widget) | ||
# layout.addWidget(self.button) | ||
self._widget.setObjectName('QuestionDialogPluginUI') | ||
if context.serial_number() > 1: | ||
self._widget.setWindowTitle(self._widget.windowTitle() + | ||
(' (%d)' % context.serial_number())) | ||
context.add_widget(self._widget) | ||
|
||
# Setup service provider | ||
self.service = rospy.Service('question_dialog', QuestionDialog, | ||
self.service_callback) | ||
self.response_ready = False | ||
self.response = None | ||
self.buttons = [] | ||
self.text_label = None | ||
self.text_input = None | ||
|
||
self.connect(self._widget, SIGNAL("update"), self.update) | ||
self.connect(self._widget, SIGNAL("timeout"), self.timeout) | ||
|
||
def shutdown_plugin(self): | ||
self.service.shutdown() | ||
|
||
def service_callback(self, req): | ||
self.response_ready = False | ||
self.request = req | ||
self._widget.emit(SIGNAL("update")) | ||
# Start timer against wall clock here instead of the ros clock. | ||
start_time = time.time() | ||
while not self.response_ready: | ||
if self.request != req: | ||
# The request got preempted by a new request. | ||
return QuestionDialogResponse(QuestionDialogRequest.PREEMPTED, "") | ||
if req.timeout != QuestionDialogRequest.NO_TIMEOUT: | ||
current_time = time.time() | ||
if current_time - start_time > req.timeout: | ||
self._widget.emit(SIGNAL("timeout")) | ||
return QuestionDialogResponse( | ||
QuestionDialogRequest.TIMED_OUT, "") | ||
time.sleep(0.2) | ||
return self.response | ||
|
||
def update(self): | ||
self.clean() | ||
req = self.request | ||
self._text_browser.setText(req.message) | ||
if req.type == QuestionDialogRequest.DISPLAY: | ||
# All done, nothing more too see here. | ||
self.response = QuestionDialogResponse( | ||
QuestionDialogRequest.NO_RESPONSE, "") | ||
self.response_ready = True | ||
elif req.type == QuestionDialogRequest.CHOICE_QUESTION: | ||
for index, options in enumerate(req.options): | ||
button = QPushButton(options, self._widget) | ||
button.clicked.connect(partial(self.handle_button, index)) | ||
self._button_layout.addWidget(button) | ||
self.buttons.append(button) | ||
elif req.type == QuestionDialogRequest.TEXT_QUESTION: | ||
self.text_label = QLabel("Enter here: ", self._widget) | ||
self._button_layout.addWidget(self.text_label) | ||
self.text_input = QLineEdit(self._widget) | ||
self.text_input.editingFinished.connect(self.handle_text) | ||
self._button_layout.addWidget(self.text_input) | ||
|
||
def timeout(self): | ||
self._text_browser.setText("Oh no! The request timed out.") | ||
self.clean() | ||
|
||
def clean(self): | ||
while self._button_layout.count(): | ||
item = self._button_layout.takeAt(0) | ||
item.widget().deleteLater() | ||
self.buttons = [] | ||
self.text_input = None | ||
self.text_label = None | ||
|
||
def handle_button(self, index): | ||
self.response = QuestionDialogResponse(index, "") | ||
self.clean() | ||
self.response_ready = True | ||
|
||
def handle_text(self): | ||
self.response = QuestionDialogResponse( | ||
QuestionDialogRequest.TEXT_RESPONSE, | ||
self.text_input.text()) | ||
self.clean() | ||
self.response_ready = True | ||
|
||
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 | ||
# This will enable a setting button (gear icon) in each dock widget title bar | ||
# Usually used to open a modal configuration dialog |
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,62 @@ | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Changelog for package segbot_logical_translator | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
0.3.1 (2015-03-31) | ||
------------------ | ||
* Closes `#29 <https://github.com/utexas-bwi/segbot_apps/issues/29>`_ | ||
- Get latest version of move_base to get fix introduced in https://github.com/ros-planning/navigation/pull/295 | ||
This allows setting tolerance to 0 when calling make_plan from segbot_logical_translator. | ||
- Don't use any tolerance when testing whether a door was open or not. | ||
- Don't clear costmap around robot when testing for an open door. | ||
* fixed issue where the logical translator was returning beside and facing for two different doors. closes `#30 <https://github.com/utexas-bwi/segbot_apps/issues/30>`_. | ||
* segbot_logical_navigator now checks for costmap updates to test whether the map has changed between door/no-door versions. closes `#28 <https://github.com/utexas-bwi/segbot_apps/issues/28>`_ | ||
* removed segbot_gazebo dependency. closes `#27 <https://github.com/utexas-bwi/segbot_apps/issues/27>`_. | ||
* Contributors: Piyush Khandelwal | ||
|
||
0.3.0 (2015-03-24) | ||
------------------ | ||
* completed migration of LogicalNavigationAction to bwi_msgs in bwi_common repository. | ||
* fixed bug in segbot_logical_translator where it would try and analyze facing/beside for doors not connected to the current location. | ||
* modified the segbot_logical_navigator to use action service instead of services. | ||
* read map file and data directory using multimap | ||
* some navigation changes for more robust navigation. | ||
* use correct approachable area for objects and doors. | ||
* added multimap support. | ||
* making the logical navigator advertise execute_logical_goal after the first pose has been received (github issue `#18 <https://github.com/utexas-bwi/segbot_apps/issues/18>`_) | ||
* turning annoying prints into ROS_INFOs and removing more annoying ones. | ||
* Made the door checker test for the door to be open 3 times before going through. Works much better. Removed recovery behavior. | ||
* Contributors: Matteo Leonetti, Piyush Khandelwal | ||
|
||
0.2.1 (2014-04-22) | ||
------------------ | ||
|
||
0.2.0 (2014-04-19) | ||
------------------ | ||
* now actually read in object approach file | ||
* added the ability to approach an object, as well as added the | ||
ability to approach a door from any accessible location | ||
* now catkin_lint approved | ||
* better error checking, shared global nodehandle, added ability to | ||
sense whether a door is open or not | ||
* moved the cost estimator to the bwi_planning package | ||
* moved gazebo stuff to separate simulated app | ||
* Contributors: Jack O'Quin, Piyush Khandelwal, piyushk | ||
|
||
0.1.5 (2013-09-03) | ||
------------------ | ||
|
||
0.1.4 (2013-08-12) | ||
------------------ | ||
|
||
0.1.3 (2013-07-16) | ||
------------------ | ||
|
||
0.1.2 (2013-07-13) | ||
------------------ | ||
|
||
0.1.1 (2013-07-10) | ||
------------------ | ||
|
||
0.1.0 (2013-06-28) | ||
------------------ |
Oops, something went wrong.