Skip to content

Instantly share code, notes, and snippets.

View johnwason's full-sized avatar

John Wason johnwason

View GitHub Profile
@johnwason
johnwason / README.md
Created September 2, 2025 06:57
Robot Raconteur Tankbot demo instructions

Robot Raconteur Tankbot demo instructions

@johnwason
johnwason / README.md
Last active September 3, 2025 05:31
Reynard the Robot demo instructions

Reynard the Robot demo instructions

Reynard the Robot is a simple cartoon robot used as an example device for learning Robot Raconteur. This demo shows the ease of connecting to a new device and controlling it using the plug-and-play features of Robot Raconteur!

See the full examples and the Getting Started Guide for more information.

Setup

The following demo files are for Python and MATLAB. Download the files before connecting to the private device access point!

@johnwason
johnwason / README.md
Last active September 3, 2025 05:40
Robot Raconteur training simulator demo instructions

Robot Raconteur training simulator demo instructions

The Robot Raconteur training simulator demonstrates multiple robots and other devices running in simulation using standard, vendor-agnostic service types. The demo will also show using the teach pendant with these standard types to interact and program the robots.

See the full examples and the Getting Started Guide for more information.

Setup

The following demo files are for Python and MATLAB. Download the files before connecting to the private device access point!

from RobotRaconteur.Client import *
import numpy as np
c = RRN.ConnectService("rr+tcp://localhost:59843?service=mp_robot")
robot_pose_type = RRN.GetStructureType("experimental.robotics.motion_program.RobotPose",c)
moveabsj_type = RRN.GetStructureType("experimental.robotics.motion_program.MoveAbsJCommand",c)
movej_type = RRN.GetStructureType("experimental.robotics.motion_program.MoveJCommand",c)
movel_type = RRN.GetStructureType("experimental.robotics.motion_program.MoveLCommand",c)
movec_type = RRN.GetStructureType("experimental.robotics.motion_program.MoveCCommand",c)
@johnwason
johnwason / abb_loaddata_to_spatialinertia.py
Created March 14, 2024 17:28
abb_loaddata_to_spatialinertia.py
import numpy as np
import general_robotics_toolbox as rox
# abb loaddata has the form [mass, [com_x, com_y, com_z], [aom_qw, aom_qx, aom_qy, aom_qz], ixx, iyy, izz]
# abb uses mm while spatial inertia uses m
abb_loaddata = [5,[1002,2003,0],[-0.00585693,0.595997,0.802901,-0.0101995],0.0349296,0.21552,0.250029]
mass = abb_loaddata[0]
com = np.array(abb_loaddata[1],dtype=np.float64)/1000.0
@johnwason
johnwason / experimental.tesseract_robotics.environment.robdef
Created October 23, 2023 17:36
tesseract_robotraconteur concept service definitions
service experimental.tesseract_robotics.environment
import com.robotraconteur.geometry
using com.robotraconteur.geometry.Pose
using com.robotraconteur.geometry.SpatialInertia
struct Visual
field pose origin
field varvalue geometry
@johnwason
johnwason / python_packaging.md
Last active September 13, 2023 09:23
Software Packaging for Robotics

Python Packaging Best Practices

Python is a versatile and popular programming language. According to the TIOBE index, it is currently the world's most popular programming language. It has found extensive use and engineering and scientific applications, including robotics. Python is popular because it has clear/flexible syntax, a "batteries included" standard library, easy interfacing to native code, and a massive ecosystem of packages providing additional functionality. This document provides an overview of best practices for packaging Python robotics software for distribution.

There are many tutorials, blog posts, and whitepapers on Python packaging. This guide is intended to provide a quick overview of the most important aspects of packaging, with references to more detailed guides.

@johnwason
johnwason / benchmark_rws_upload.py
Created October 25, 2022 19:27
benchmark_rws_upload
import abb_motion_program_exec_client as abb
import time
client = abb.MotionProgramExecClient(base_url = 'http://127.0.0.1')
ramdisk = client.get_ramdisk_path()
small_file = b'0'*1024
small_t1 = time.perf_counter()
client.upload_file(ramdisk + "/small.bin", small_file)
@johnwason
johnwason / library_eventloop.js
Created June 18, 2022 21:12
library_eventloop.js sigs
/**
* @license
* Copyright 2010 The Emscripten Authors
* SPDX-License-Identifier: MIT
*/
// Implementation of functions from emscripten/eventloop.h.
LibraryJSEventLoop = {
emscripten_unwind_to_js_event_loop: function() {
@johnwason
johnwason / gazebo_model_resource_locator.py
Created May 17, 2022 18:03
gazebo_model_resource_locator.py
import re
import traceback
import os
from tesseract_robotics.tesseract_common import ResourceLocator, SimpleLocatedResource
#resource locator class using GAZEBO_MODEL_PATH and model:// url
class GazeboModelResourceLocator(ResourceLocator):
def __init__(self):
super().__init__()
model_env_path = os.environ["GAZEBO_MODEL_PATH"]
self.model_paths = model_env_path.split(os.pathsep)