def setupUi(self, MainWindow): self.lock = Lock() self.talker = Talker('taskview') rospy.Subscriber('BbSync', bbsynch, self.taskview) MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.listView = QtWidgets.QListWidget(self.centralwidget) self.listView.setGeometry(QtCore.QRect(10, 40, 771, 521)) self.listView.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) self.listView.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) self.listView.setObjectName("listView") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(10, 10, 67, 17)) self.label.setObjectName("label") MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) self.tasklist = [] self.markers = rviz_tools.RvizMarkers('/map', 'markers')
def __init__(self, cinematic_model, kalman_wrapper): self.markers = None self.update_frecuency = 100.0 self.cinematic_model = cinematic_model self.kalman_wrapper = kalman_wrapper rospy.init_node('tracking', anonymous=False, log_level=rospy.INFO, disable_signals=False) rospy.on_shutdown(self.cleanup_node) self.markers = rviz_tools.RvizMarkers('/map', 'visualization_marker') self.deque = collections.deque(maxlen=2) self.i = 0
import roslib import rospy from std_msgs.msg import String from geometry_msgs.msg import PoseStamped, Pose, Point, Quaternion, Vector3, Polygon from tf import transformations # rotation_matrix(), concatenate_matrices() import rviz_tools_py as rviz_tools #File includes import json import yaml import shutil from os.path import isfile, join filename_pub = rospy.Publisher('route_file', String, queue_size=1) setup_pub = rospy.Publisher('setup_response', String, queue_size=1) markers = rviz_tools.RvizMarkers('/map', 'visualization_marker') ##### FUNCTIONS TO LOAD FROM FILE ##### def byteify(input): if isinstance(input, dict): return { byteify(key): byteify(value) for key, value in input.iteritems() } elif isinstance(input, list): return [byteify(element) for element in input] elif isinstance(input, unicode): return input.encode('utf-8') else:
# Initialize the ROS Node rospy.init_node('plot_parts', anonymous=False, log_level=rospy.INFO, disable_signals=False) # Define exit handler def cleanup_node(): print("Shutting down node") markers.deleteAllMarkers() rospy.on_shutdown(cleanup_node) markers = rviz_tools.RvizMarkers('/world', 'visualization_marker') translucent_metal = [0.6235, 0.6313, 0.6471, 0.2] def plot_color_points(points, publish_time): size = 0.015 scale = Vector3(size, size, size) # diameter colors = ["red", "blue", "brown", "green"] for i in range(0, points.shape[0]): T = transformations.translation_matrix( (points[i][0], points[i][1], points[i][2])) if points[i][3] == 0: color_mtrx = [1, 0, 0] if points[i][3] == 1: color_mtrx = [0, 1, 0]
# Initialize the ROS Node rospy.init_node('cutter', anonymous=False, log_level=rospy.INFO, disable_signals=False) # Define exit handler def cleanup_node(): print "Shutting down node" markers.deleteAllMarkers() rospy.on_shutdown(cleanup_node) markers = rviz_tools.RvizMarkers('camera/master0', 'cutter_marker') Param = { "refs": "/cropper/master", "base": -100, "offset": 200, "width": 10, "span": 150, "distance": 550, } Refs = {} tr1 = Transform() tr1.rotation.w = np.sqrt(2) / 2 tr1.rotation.y = np.sqrt(2) / 2 color = (0.1, 0.1, 0.1)
from tf import transformations # rotation_matrix(), concatenate_matrices() import rviz_tools_py as rviz_tools # Initialize the ROS Node rospy.init_node('wall', anonymous=False, log_level=rospy.INFO, disable_signals=False) # Define exit handler def cleanup_node(): print "Shutting down node" markers.deleteAllMarkers() rospy.on_shutdown(cleanup_node) markers = rviz_tools.RvizMarkers('/world', 'wall_marker') Config={ "anchors":[0,0,1000,1000], "height":1000 } while not rospy.is_shutdown(): try: Config.update(rospy.get_param("/config/wall")) except Exception as e: print "get_param exception in wall.py:",e.args polygon = Polygon() xys=np.asarray(Config["anchors"]).reshape((-1,2)) h=Config["height"] for xy in xys: