def handle_rwt_action(req): action = rosaction.MODE_ACTION pkg = RosPack() package = rosaction.iterate_packages(pkg, action) messageList = [] for pack in package: action, path = pack message = rosmsg.list_msgs(action) messageList.append(str(message)) return ActionListResponse(messageList)
def _refresh_packages(self, mode=rosmsg.MODE_MSG): if (self._mode == rosmsg.MODE_MSG) or self._mode == rosmsg.MODE_SRV: packages = sorted([pkg_tuple[0] for pkg_tuple in rosmsg.iterate_packages(self._rospack, self._mode)]) elif self._mode == rosaction.MODE_ACTION: packages = sorted([pkg_tuple[0] for pkg_tuple in rosaction.iterate_packages( self._rospack, self._mode)]) self._package_list = packages rospy.logdebug('pkgs={}'.format(self._package_list)) self._package_combo.clear() self._package_combo.addItems(self._package_list) self._package_combo.setCurrentIndex(0)