Protocol Documentation

Table of Contents

assembly.proto

Top

Assembly

Assembly

Base Design to be interacted with

THIS IS THE CURRENT FILE EXPORTED

FieldTypeLabelDescription
info Info

Basic information (name, Author, etc)

data AssemblyData

All of the data in the assembly

dynamic bool

Can it be effected by the simulation dynamically

physical_data PhysicalProperties

Overall physical data of the assembly

design_hierarchy GraphContainer

The Design hierarchy represented by Part Refs - The first object is a root container for all top level items

joint_hierarchy GraphContainer

The Joint hierarchy for compound shapes

transform Transform

The Transform in space currently

thumbnail Thumbnail

Optional thumbnail saved from Fusion 360 or scraped from previous configuration

AssemblyData

Data used to construct the assembly

FieldTypeLabelDescription
parts Parts

Meshes and Design Objects

joints joint.Joints

Joint Definition Set

materials material.Materials

Appearance and Physical Material Set

signals signal.Signals

Contains table of all signals with ID reference

BinaryMesh

Mesh used for more effective file transfers

FieldTypeLabelDescription
data bytes

BEWARE of ENDIANESS

Body

Body object

Can contain a TriangleMesh or Collection of Faces.

Must be unique in the context of the Assembly.

FieldTypeLabelDescription
info Info

part string

Reference to Part Definition

triangle_mesh TriangleMesh

Triangle Mesh for rendering

appearance_override string

Override Visual Appearance for the body

Mesh

Mesh Data stored as generic Data Structure

FieldTypeLabelDescription
verts float repeated

Tri Mesh Verts vec3

normals float repeated

Tri Mesh Normals vec3

uv float repeated

Tri Mesh uv Mapping vec2

indices int32 repeated

Tri Mesh indicies (Vert Map)

PartDefinition

Part Definition

Unique Definition of a part that can be replicated.

Useful for keeping the object counter down in the scene.

FieldTypeLabelDescription
info Info

Information about version - id - name

physical_data PhysicalProperties

Physical data associated with Part

base_transform Transform

Base Transform applied - Most Likely Identity Matrix

bodies Body repeated

Mesh Bodies to populate part

dynamic bool

Optional value to state whether an object is a dynamic object in a static assembly - all children are also considered overriden

friction_override float

Optional value for overriding the friction value 0-1

mass_override float

Optional value for overriding an indiviaul object's mass

PartInstance

Part

Represents a object that does not have to be unique

Can be an override for an existing definition

FieldTypeLabelDescription
info Info

part_definition_reference string

Reference to the Part Definition defined in Assembly Data

transform Transform

Overriding the object transform (moves the part from the def) - in design hierarchy context

global_transform Transform

Position transform from a global scope

joints string repeated

Joints that interact with this element

appearance string

Appearance Reference to link to `Materials->Appearance->Info->id`

physical_material string

Physical Material Reference to link to `Materials->PhysicalMaterial->Info->id`

skip_collider bool

Flag that if enabled indicates we should skip generating a collider, defaults to FALSE or undefined

Parts

Part file can be exported seperately in the future

FieldTypeLabelDescription
info Info

Part name, version, GUID

part_definitions Parts.PartDefinitionsEntry repeated

Map of the Exported Part Definitions

part_instances Parts.PartInstancesEntry repeated

Map of the Exported Parts that make up the object

user_data UserData

other associated data that can be used end effector, wheel, etc

Parts.PartDefinitionsEntry

FieldTypeLabelDescription
key string

value PartDefinition

Parts.PartInstancesEntry

FieldTypeLabelDescription
key string

value PartInstance

TriangleMesh

Traingle Mesh for Storing Display Mesh data

FieldTypeLabelDescription
info Info

has_volume bool

Is this object a Plane ? (Does it have volume)

material_reference string

Rendered Appearance properties referenced from Assembly Data

mesh Mesh

Stored as true types, inidicies, verts, uv

bmesh BinaryMesh

Stored as binary data in bytes

joint.proto

Top

BallJoint

FieldTypeLabelDescription
yaw DOF

pitch DOF

rotation DOF

CustomJoint

CustomJoint is a joint with N degrees of freedom specified.

There should be input validation to handle max freedom case.

FieldTypeLabelDescription
dofs DOF repeated

A list of degrees of freedom that the joint can contain

DOF

DOF - representing the construction of a joint motion

FieldTypeLabelDescription
name string

In case you want to name this degree of freedom

axis mirabuf.Vector3

Axis the degree of freedom is pivoting by

pivotDirection mirabuf.Axis

Direction the axis vector is offset from - this has an incorrect naming scheme

dynamics Dynamics

Dynamic properties of this joint pivot

limits Limits

Limits of this freedom

value float

Current value of the DOF

Dynamics

Dynamics specify the mechanical effects on the motion.

FieldTypeLabelDescription
damping float

Damping effect on a given joint motion

friction float

Friction effect on a given joint motion

Joint

A unqiue implementation of a joint motion

Contains information about motion but not assembly relation

NOTE: A spring motion is a joint with no driver

FieldTypeLabelDescription
info mirabuf.Info

Joint name, ID, version, etc

origin mirabuf.Vector3

Transform relative to the parent

joint_motion_type JointMotion

type of motion described by the joint

break_magnitude float

At what effort does it come apart at. - leave blank if it doesn't

rotational RotationalJoint

ONEOF rotational joint

prismatic PrismaticJoint

ONEOF prismatic joint

custom CustomJoint

ONEOF custom joint

user_data mirabuf.UserData

Additional information someone can query or store relative to your joint.

motor_reference string

Motor definition reference to lookup in joints collection

JointInstance

Instance of a Joint that has a defined motion and limits.

Instancing helps with identifiy closed loop systems.

FieldTypeLabelDescription
info mirabuf.Info

Joint name, ID, version, etc

isEndEffector bool

Is this joint the end effector in the tree ? - might remove this

parent_part string

Object that contains the joint - the ID - Part usually

child_part string

Object that is affected by the joint - the ID - Part usually

joint_reference string

Reference to the Joint Definition

offset mirabuf.Vector3

Offset from Joint Definition Origin

parts mirabuf.GraphContainer

Part Instances all contained and affected by this joint directly - tree

signal_reference string

Reference to the Signals as Drivers - use for signal_map in Assembly Data

motion_link MotionLink repeated

Motion Links to other joints - ways to preserve motion between dynamic objects

Joints

Joints

A way to define the motion between various group connections

FieldTypeLabelDescription
info mirabuf.Info

name, version, uid

joint_definitions Joints.JointDefinitionsEntry repeated

Unique Joint Implementations

joint_instances Joints.JointInstancesEntry repeated

Instances of the Joint Implementations

rigid_groups RigidGroup repeated

Rigidgroups ?

motor_definitions Joints.MotorDefinitionsEntry repeated

Collection of all Motors exported

Joints.JointDefinitionsEntry

FieldTypeLabelDescription
key string

value Joint

Joints.JointInstancesEntry

FieldTypeLabelDescription
key string

value JointInstance

Joints.MotorDefinitionsEntry

FieldTypeLabelDescription
key string

value mirabuf.motor.Motor

Limits

Limits specify the mechanical range of a given joint.

TODO: Add units

FieldTypeLabelDescription
lower float

Lower Limit corresponds to default displacement

upper float

Upper Limit is the joint extent

velocity float

Velocity Max in m/s^2 (angular for rotational)

effort float

Effort is the absolute force a joint can apply for a given instant - ROS has a great article on it http://wiki.ros.org/pr2_controller_manager/safety_limits

Motion Link Feature

Enables the restriction on a joint to a certain range of motion as it is relative to another joint

This is useful for moving parts restricted by belts and gears

FieldTypeLabelDescription
joint_instance string

The Joint that this is linked to

ratio float

Ratio of motion between joint 1 and joint 2, we assume this is in mm for linear and deg for rotational

reversed bool

Reverse the relationship - turn in the same or opposite directions - useful when moving axis arent both the same way.

PrismaticJoint

Prismatic Joint describes a motion that translates the position in a single axis

FieldTypeLabelDescription
prismatic_freedom DOF

RigidGroup

FieldTypeLabelDescription
name string

occurrences string repeated

this could be the full path of the occurrence in order to make it easier to assembly them possibly - just parse on the unity side

RotationalJoint

RotationalJoint describes a joint with rotational translation.

This is the exact same as prismatic for now.

FieldTypeLabelDescription
rotational_freedom DOF

Safety

Safety switch configuration for a given joint.

Can usefully indicate a bounds issue.

Inspired by the URDF implementation.

This should really just be created by the controller.

http://wiki.ros.org/pr2_controller_manager/safety_limits

FieldTypeLabelDescription
lower_limit float

Lower software limit

upper_limit float

Upper Software limit

k_position float

Relation between position and velocity limit

k_velocity float

Relation between effort and velocity limit

JointMotion

Describes the joint - Not really sure what to do with this for now - TBD

NameNumberDescription
RIGID 0

REVOLUTE 1

SLIDER 2

CYLINDRICAL 3

PINSLOT 4

PLANAR 5

BALL 6

CUSTOM 7

material.proto

Top

Appearance

Contains information on how a object looks

Limited to just color for now

FieldTypeLabelDescription
info mirabuf.Info

Identfiable information (id, name, version)

albedo mirabuf.Color

albedo map RGBA 0-255

roughness double

roughness value 0-1

metallic double

metallic value 0-1

specular double

specular value 0-1

Materials

Represents a File or Set of Materials with Appearances and Physical Data

Can be Stored in AssemblyData

FieldTypeLabelDescription
info mirabuf.Info

Identifiable information (id, name, version)

physicalMaterials Materials.PhysicalMaterialsEntry repeated

Map of Physical Materials

appearances Materials.AppearancesEntry repeated

Map of Appearances that are purely visual

Materials.AppearancesEntry

FieldTypeLabelDescription
key string

value Appearance

Materials.PhysicalMaterialsEntry

FieldTypeLabelDescription
key string

value PhysicalMaterial

PhysicalMaterial

Data to represent any given Physical Material

FieldTypeLabelDescription
info mirabuf.Info

Identifiable information (id, name, version, etc)

description string

short description of physical material

thermal PhysicalMaterial.Thermal

Thermal Physical properties of the model OPTIONAL

mechanical PhysicalMaterial.Mechanical

Mechanical properties of the model OPTIONAL

strength PhysicalMaterial.Strength

Physical Strength properties of the model OPTIONAL

dynamic_friction float

Frictional force for dampening - Interpolate (0-1)

static_friction float

Frictional force override at stop - Interpolate (0-1)

restitution float

Restitution of the object - Interpolate (0-1)

deformable bool

should this object deform when encountering large forces - TODO: This needs a proper message and equation field

matType PhysicalMaterial.MaterialType

generic type to assign some default params

PhysicalMaterial.Mechanical

Mechanical Properties Set Definition for Simulation.

FieldTypeLabelDescription
young_mod float

naming scheme changes here / GPa

poisson_ratio float

?

shear_mod float

MPa

density float

g/cm^3

damping_coefficient float

?

PhysicalMaterial.Strength

Strength Properties Set Definition for Simulation.

FieldTypeLabelDescription
yield_strength float

MPa

tensile_strength float

MPa

thermal_treatment bool

yes / no

PhysicalMaterial.Thermal

Thermal Properties Set Definition for Simulation.

FieldTypeLabelDescription
thermal_conductivity float

W/(m*K)

specific_heat float

J/(g*C)

thermal_expansion_coefficient float

um/(m*C)

PhysicalMaterial.MaterialType

NameNumberDescription
METAL 0

PLASTIC 1

motor.proto

Top

DCMotor

DCMotor Configuration

Parameters to simulate a DC Electric Motor

Still needs some more but overall they are most of the parameters we can use

FieldTypeLabelDescription
reference_url string

Reference for purchase page or spec sheet

torque_constant float

m-Nm/Amp

emf_constant float

mV/rad/sec

resistance float

Resistance of Motor - Optional if other values are known

maximum_effeciency uint32

measure in percentage of 100 - generally around 60 - measured under optimal load

maximum_power uint32

measured in Watts

duty_cycle DutyCycles

Stated Duty Cycle of motor

advanced DCMotor.Advanced

Optional data that can give a better relationship to the simulation

DCMotor.Advanced

Information usually found on datasheet

FieldTypeLabelDescription
free_current float

measured in AMPs

free_speed uint32

measured in RPM

stall_current float

measure in AMPs

stall_torque float

measured in Nm

input_voltage uint32

measured in Volts DC

resistance_variation float

between (K * (N / 4)) and (K * ((N-2) / 4)) where N is number of poles - leave at 0 if unknown

Motor

A Motor should determine the relationship between an input and joint motion

Could represent something like a DC Motor relationship

FieldTypeLabelDescription
info mirabuf.Info

dc_motor DCMotor

simple_motor SimpleMotor

SimpleMotor

SimpleMotor Configuration

Very easy motor used to simulate joints without specifying a real motor

Can set braking_constant - stall_torque - and max_velocity

Assumes you are solving using a velocity constraint for a joint and not a acceleration constraint

FieldTypeLabelDescription
stall_torque float

Torque at 0 rpm with a inverse linear relationship to max_velocity

max_velocity float

The target velocity in RPM, will use stall_torque relationship to reach each step

braking_constant float

(Optional) 0 - 1, the relationship of stall_torque used to perserve the position of this motor

DutyCycles

Duty Cycles for electric motors

Affects the dynamic output of the motor

https://www.news.benevelli-group.com/index.php/en/88-what-motor-duty-cycle.html

These each have associated data we are not going to use right now

NameNumberDescription
CONTINUOUS_RUNNING 0

S1

SHORT_TIME 1

S2

INTERMITTENT_PERIODIC 2

S3

CONTINUOUS_PERIODIC 3

S6 Continuous Operation with Periodic Duty

signal.proto

Top

Signal

Signal is a way to define a controlling signal.

TODO: Add Origin

TODO: Decide how this is linked to a exported object

FieldTypeLabelDescription
info mirabuf.Info

Has identifiable data (id, name, version)

io IOType

Is this a Input or Output

custom_type string

The name of a custom input type that is not listed as a device type

signal_id uint32

ID for a given signal that exists... PWM 2, CANBUS 4

device_type DeviceType

Enum for device type that should always be set

Signals

Signals is a container for all of the potential signals.

FieldTypeLabelDescription
info mirabuf.Info

Has identifiable data (id, name, version)

signal_map Signals.SignalMapEntry repeated

Contains a full collection of symbols

Signals.SignalMapEntry

FieldTypeLabelDescription
key string

value Signal

DeviceType

DeviceType needs to be a type of device that has a supported connection

As well as a signal frmae but that can come later

NameNumberDescription
PWM 0

Digital 1

Analog 2

I2C 3

CANBUS 4

CUSTOM 5

IOType

IOType is a way to specify Input or Output.

NameNumberDescription
INPUT 0

Input Signal

OUTPUT 1

Output Signal

types.proto

Top

Color

RGBA in expanded form 0-255

FieldTypeLabelDescription
R int32

red

G int32

green

B int32

blue

A int32

alpha

GraphContainer

Top level GraphContainer

Contains all Graph element roots within

FieldTypeLabelDescription
nodes Node repeated

represents the root of each seperate assembly - most of the time 1 node

Info

Defines basic fields for almost all objects

The location where you can access the GUID for a reference

FieldTypeLabelDescription
GUID string

GUID unique value - must always be defined since guid's have exactly 128bits could be represented with bytes[] however endian becomes an issue

name string

Generic readable name

version uint32

Version of object iteration

Node

Each proper object within the Graph - First one is Root

FieldTypeLabelDescription
value string

the reference ID for whatever kind of graph this is

children Node repeated

the children for the given leaf

user_data UserData

other associated data that can be used

PhysicalProperties

FieldTypeLabelDescription
density double

kg per cubic cm kg/(cm^3)

mass double

kg

volume double

cm^3

area double

cm^2

com Vector3

non-negative? Vec3

Thumbnail

A basic Thumbnail to be encoded in the file

Most of the Time Fusion can encode the file with transparency as PNG not bitmap

FieldTypeLabelDescription
width int32

Image Width

height int32

Image Height

extension string

Image Extension - ex. (.png, .bitmap, .jpeg)

transparent bool

Transparency - true from fusion when correctly configured

data bytes

Data as read from the file in bytes[] form

Transform

Transform

Data needed to apply scale, position, and rotational changes

FieldTypeLabelDescription
spatial_matrix float repeated

flat map of 4x4 transform matrix [00][01][02][03][10][11][12][13][20][21][22][23]

UserData

UserData

Arbitrary data to append to a given message in map form

FieldTypeLabelDescription
data UserData.DataEntry repeated

e.g. data["wheel"] = "yes"

UserData.DataEntry

FieldTypeLabelDescription
key string

value string

Vector3

FieldTypeLabelDescription
x float

y float

z float

Axis

Axis Enum

NameNumberDescription
X 0

Y 1

Z 2

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)