This file contains hidden or 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
import rospy | |
import sys | |
from sensor_msgs.msg import Image | |
from std_msgs.msg import String | |
import rosbag | |
from cv_bridge import CvBridge | |
import cv2 | |
import json | |
import time |
This file contains hidden or 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
{ | |
"components":{ | |
"schemas":{ | |
"ImportResult":{ | |
"description":"ImportResult(sceneId: str, projectId: str)", | |
"properties":{ | |
"projectId":{ | |
"type":"string" | |
}, | |
"sceneId":{ |
This file contains hidden or 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
from arcor2.clients import scene_service | |
from arcor2.rest import RestHttpException | |
try: | |
scene_service.start() | |
except scene_service.SceneServiceException as e: | |
if isinstance(e.__context__, RestHttpException): | |
print(e.__context__.error_code) | |
else: | |
print("HTTP status code not available.") # a non-HTTP related error occured |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- =================================================================================== --> | |
<!-- | This document was autogenerated by xacro from model/magician_standalone.xml | --> | |
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> | |
<!-- =================================================================================== --> | |
<robot name="magician" xmlns:xi="http://www.w3.org/2001/XInclude"> | |
<link name="root"/> | |
<link name="magician_link_base"> | |
<visual> | |
<origin rpy="0 0 0" xyz="0 0 0"/> |
This file contains hidden or 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
>>> import jsonpatch | |
>>> | |
>>> p1='{"id": "bbb", "scene_id": "bbb", "objects": [{"id": "box", "action_points": [{"id": "box-AP0", "position": {"x": -0.2453652, "y": 0.0, "z": 0.1269144}, "orientations": [{"id": "default", "orientation": {"x": 1.0, "y": 0.0, "z": 0.0, "w": 0.0}}], "robot_joints": [{"id": "default", "robot_id": "aubo", "joints": [{"name": "joint1", "value": 0}, {"name": "joint2", "value": 0}, {"name": "joint3", "value": 0}], "is_valid": true}], "actions": [{"id": "set_joints9763", "type": "RestRobotService/set_joints", "parameters": [{"id": "robot_id", "value": "\"aubo\"", "type": "string"}, {"id": "joints", "value": "\"box.box-AP0.default\"", "type": "joints"}, {"id": "move_type", "value": "\"Simple\"", "type": "string_enum"}, {"id": "speed", "value": "0.5", "type": "double"}], "inputs": [{"default": ""}], "outputs": [{"default": ""}], "uuid": "b8b5c936-718b-4f4c-9541-0940d5480332"}], "uuid": "b8e3e6bc-f614-423a-b9d2-c4dd0cdb4a77"}, {"id": "box-AP1", "position": {"x": 0.2003918, "y": 0.0, "z": |
This file contains hidden or 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
from brother_ql.conversion import convert | |
from brother_ql.backends.helpers import send | |
from brother_ql.raster import BrotherQLRaster | |
import qrcode | |
PX_WIDTH = 696 | |
qr = qrcode.make('ARCOR2') | |
img = qr.get_image() |