SDFormat: A robot description format inconstant evolution
Alejandro Hernández Cordero
Addisu Taddese (Intrinsic)

ROSCON 2023

Table of content
●
●●
●
●
●

What is SDFormat?
How you can improve SDFormat
Python bindings
Converters for other robot description formats
SDFormat in ROS 2
New improvements in the SDFormat specification

● Simulation Description Format (SDFormat) isan XML format for describing objects andenvironments for robot simulators.
● Describes objects and environments forrobot simulators, visualization, and control● Designed for scientific robot applications● Extensible format describing all aspects ofrobots, static and dynamic objects, lighting,terrain, and physics.

Table of content●●●●●●What is SDFormat?
How you can improve SDFormat
Python bindings
Converters for other robot description formats
SDFormat in ROS 2
New improvements in the SDFormat specification

How you can improve SDFormat● Make a proposal● Request changes○

Direct conversations, GitHub issues, ROS Discourse, Gazebo Community, etc● Write a formal proposal!
○○

Open a pull request on http://bit.ly/github_sdf_tutorials
Guidelines https://bit.ly/sdf_proposal_format● Give feedback on new proposals

Table of content
●
●
●
●
●
●

What is SDFormat?
How you can improve SDFormat
Python bindings
Converters for other robot description formats
SDFormat in ROS 2
New improvements in the SDFormat specification

SDFormat python bindings●●●●pybind11
Programmatically create/edit models
Compatible with gz.math and gz.sim
Tutorial https://bit.ly/sdf_python_bindings

How to use it
import sdformat13 as sdf
root = sdf.Root()try:root.load(input_file)
except sdf.SDFErrorsException as e:print(e, file=sys.stderr)# Create a new element
world = root.world_by_index(0)world.set_name('shapes')…
with open('new_sdf.sdf', "w") as f:f.write(root.to_string())

Table of content
●
●
●
●
●
●

What is SDFormat?
How you can improve SDFormat
Python bindings
Converters for other robot description formats
SDFormat in ROS 2
New improvements in the SDFormat specification

● High-performance extensible software
platform for animated 3D scenes● Designed to meet the needs of largescale film and visual effects production● Expanding set of schemas, coveringgeometry, shading, lighting, and physics

SDFormat -> USD$ sdf2usd warehouse.sdf warehouse.usd

Isaac SimGazebo

USD -> SDFormat$ usd2sdf robot.usd robot.sdf

Isaac SimGazebo

● XML model files● MJCF models can represent complex
dynamical systems with a wide range offeatures and model elements.
● Support joint, geom, site, camera and light.
○Supported in the converter:■ Bodies■ Geoms■ Sensors (Camera, Force torque, IMU)
■ Joints (Fixed, Free, Hinge, Slide)■ Materials

SDFormat -MJCF: Installation
With gz-garden or higher version inst alled:$ pip install sdformat-mjcf

SDFormat -> MJCF
$ sdf2mjcf input_file.sdf output_dir
Example: Pand ArmGazebo

MujocoMJCF -> SDFormat$ mjcf2sdf input_file.xml output_dir
Example: Humanoid

MujocoGazeboTable of content
●
●
●
●
●
●

What is SDFormat?
How you can improve SDFormat
Python bindings
Converters for other robot description formats
SDFormat in ROS 2
New improvements in the SDFormat specification

SDFormat in ROS 2● A urdf_parser_plugin for SDFormat○○Parses SDFormat into URDF C++ data structures
SDFormat files can be loaded directly into robot_describtion

Table of content●●●●●●What is SDFormat?
How you can improve SDFormat
Python bindings
Converters for other robot description formats
SDFormat in ROS 2
New improvements in the SDFormat specification

Improved Composition● Using the <include> tag for modularity● Models are self-contained/standalone components similar
to parts in CAD assembly● Frames, links, and joints in a model should be considered
the public "API" of the model○ Frames as primary interface elements (eg. use frames
to define mounting points)

Model scope and the "::" syntax● Only relative references are permitted● References can access the current scope or child scopes<model name="top_model"><link name="top_link"/><frame name="top_to_bottom"><pose relative_to="mid_model::bottom_model::bottom_link"/></frame><model name="mid_model"><link name="mid_link"><pose relative_to="top_link"/> <!--Error --></link><model name="bottom_model"><link name="bottom_link"></model></model></model><!-- VALID -->Example: Frame Semantics with Nested References<sdf version="1.8"><world name="default"><include><uri>models/table</uri><name>table1</name></include><include><uri>models/Coke</uri><pose relative_to="table1::top_surface"/></include></world></sdf><pose relative_to="table1::top_surface"/>Example: Placement Frame<sdf version="1.8"><world name="default"><include><uri>models/table</uri><name>table1</name><pose>0 0 0 0 -0.05 0</pose></include>/home/addisu/Documents/talks/ign-community-202102/examples/sphere_frames.png...
<include><uri>models/big_sphere</uri><placement_frame>pl_bottom</placement_frame><pose relative_to="table1::top_surface">
0.4 0 0 0 0 0</pose></include></world></sdf><placement_frame>pl_bottom</placement_frame>

Example: Robot arm assembly<model name="robot_arm_with_gripper"><joint name="fix_to_world" type="fixed"><parent>world</parent><child>arm</child></joint><include><uri>models/panda_arm</uri><name>arm</name></include><joint name="attach_gripper" type="fixed"><parent>arm::gripper_mount</parent><child>gripper</child></joint><include><uri>models/panda_hand</uri><name>gripper</name><placement_frame>mount_point</placement_frame><pose relative_to="arm::gripper_mount"/></include></model>Example: Robot arm assembly<model name="robot_arm_with_gripper"><joint name="fix_to_world" type="fixed"><parent>world</parent><child>arm</child></joint><include><uri>models/panda_arm</uri><name>arm</name></include><joint name="attach_gripper" type="fixed"><parent>arm::gripper_mount</parent><child>gripper</child></joint><include><uri>models/simple_gripper</uri><!--changed --><name>gripper</name><placement_frame>mount_point</placement_frame><pose relative_to="arm::gripper_mount"/></include></model>Merging for Composition● Include other models without introducing a new scopeLink<include><include merge="true">

Model

Model

Joint

Frame

Model (name=Child)Child::LInk
Child::JointChild::Frame

Link

Joint

Frame

Model (name=Child)
LInk
Joint
Frame

New ways of specifying pose
● Option to specify the rotation representation.
● Currently<pose>{xyz}{rpy_radians}</pose>● New feature: Use Degrees<pose degrees="true">{xyz}{rpy_degrees}</pose>● New feature: Rotation format<pose rotation_format="euler_rpy">{xyz}{rpy_radians}</pose><pose rotation_format="euler_rpy" degrees="true">{xyz}<pose rotation_format="quat_xyzw">{xyz}{rpy_degrees}</pose>{quat_xyzw}</pose>

http://sdformat.org/tutorials?tut=better_pose_proposal

Fluid Added Mass
● The effective mass of a body increases when moving in a fluid● Newton’s second law:○where M is the body mass inertia matrix, μ is the fluid added mass matrix● New <fluid_added_mass> element added under //link/inertial/● Available in SDFormat 1.10

https://bit.ly/added_mass_proposalMimic Joint Actuation Constraint● Gearbox joint type provides equivalent functionality but requires defining more
joints and intermediate links● Mimic constraint simplifies the definition<link name="rack"/><link name="pinion"/><joint name="pinion_joint" type="revolute"><parent>world</parent><child>pinion</child>...
</joint><joint name="rack_joint" type="prismatic"><parent>world</parent><child>rack</child><axis><xyz>1 0 0</xyz><mimic joint="pinion_joint"><multiplier>0.02</multiplier><offset>0.0</offset><reference>0.0</reference></mimic></axis></joint>

http://sdformat.org/tutorials?tut=mimic_proposal

Automatic Moments of Inertia Calculations● Bad Inertia values cause bad simulation● Default Mass Matrix○○

mass = 1.0 Kg
Diagonal Elements = (1, 1, 1)● 2 major workflows for computing inertial properties○○

Using CAD software
Mesh Processing Software, such as MeshLab

Automatic Moments of Inertia Calculations● SDFormat 1.11 introduced <inertial auto="true"/><link name="robot_link"><inertial auto="true"/><collision name="capsule_collision"><density>2710</density><geometry><capsule><radius>0.5</radius><length>0.7</length></capsule></geometry>…
</link>Summary●●●●

Offline converters (USD and MJCF)
Python API
ROS 2 support
SDFormat new features○ SDFormat 1.7: Frame semantics, Parameter passing (experimental)○ SDFormat 1.8: Composition (nested models)○ SDFormat 1.9: New ways of specifying pose (angles in degrees,quaternions)○ SDFormat 1.10: Merge-includes, <joint> in world, Fluid added mass
○ SDFormat 1.11: Automatic computation of moments of inertia

Feedback:● We invite everyone to try it and test it! We are happy to receive your feedback

ROS / ROS 2
withKubernetes and KubeEdge
Oct.19th.2023
ROSCon 2023 @ New Orleans, US

Copyright 2023 Sony Group Corporation

Agenda• Who are we?
• Background• Problems• Goals / Requirements• Kubernetes• KubeEdge• Sample Deployment• What’s missing? Next-gen proposal• Community

36| R&D Center U.S. Laboratory

Who are we?
• Tomoya Fujita (Presenter)••••

Software Engineer, Sony R&D US Laboratory
ROS TSC (Technical Steering Committee)
KubeEdge SIG Robotics Chair
fujitatomoya@github , tomoyafujita@linkedin• Co-Authors• Yin Ding (Engineering Manager, Google)
o KubeEdge TSC, Co-Founder of KubeEdge Projecto Leading the Kubernetes Hardening team

• Kevin Wang (Lead of Cloud Native Open Source Team, Huawei)o KubeEdge TSC, Co-Founder of KubeEdge Project
o CNCF Ambassador, TOC contributor• Fei Xu (Senior Engineer, Huawei)o KubeEdge TSC, Maintainer

37| R&D Center U.S. Laboratory

Background• Broad use cases.
• Distributed and Connected System.
• Collaborative and Orchestrated Application.
• Circulatory Functioning System and Development• Specific Hardware Acceleration.
• Security. (Device, Data, Network)38| R&D Center U.S. Laboratory

39| R&D Center U.S. Laboratory

What is the pain?
• Platform Dependencies.
• Proprietary hardware support.
• Application Modularity.
• System and Security Integration.
• Application Specific Network Bridge.
• Application Developer Friendly.
40| R&D Center U.S. Laboratory

Goal / Requirements• Flexible Application Deployment.
• Zero Trust Security Support.
• Application Agnostic Network Configuration.
• Extend Device Capability.
• System Global Observability.
• Platform Agnostic Device Abstraction.

41| R&D Center U.S. Laboratory

Kubernetes (Service Mesh)• Application Deployment and Orchestration.
• Device Capability and Label Control.
• Custom Resource Extension.
• Auto- Scaling and Healing.
• Roll Up/Down, Canary Test.
• Role Based Access Control.
• Device-Plugin / Container Device Interfaces.
• Container Network Interfaces.
• Traffic Management.
• Observability.
• Security Policy.

42| R&D Center U.S. Laboratory

KubeEdgeis built upon Kubernetes and provides core infrastructure support for networking,application deployment and metadata synchronization between cloud and edge.
• Cloud-Edge Coordination• Edge Computing• Edge Autonomy• Simplified Deployment• Kubernetes-native Support• Resource Efficient43| R&D Center U.S. Laboratory

https://kubeedge.io/docs/

Sample Deployment
Theory is good, but please see how it works in the flesh!

ROS Kubernetes
Tutorials

Contribution(Issues/PRs) always welcome!
44| R&D Center U.S. Laboratory

ROS Multi-Node Deployment

45| R&D Center U.S. Laboratory

ROS 2 Localhost Only

46

| R&D Center U.S. Laboratory

ROS 2 Logical Partition / Multiple RMW Implementation

47| R&D Center U.S. Laboratory

ROS 2 Deployment Intermediate48| R&D Center U.S. Laboratory

ROS 2 / Micro-ROS with KubeEdge (W.I.P)

49| R&D Center U.S. Laboratory

Device-Abstraction (Device-Plugin, Container Device Interface)• Kubernetes Custom Resource Definition, that allows us to plugin vendor specifichardware and device to the containers.
• After advertising the custom resource to Kubernetes, Kubernetes controls thoseresources with workload based on application requirements.

50| R&D Center U.S. Laboratory

Support SROS 2 security enclaves via ConfigMap

51| R&D Center U.S. Laboratory

What’s missing? Proposals?
• Device Abstraction Enhancement• KEP-3162: Add Deallocate and PostStopContainer to Device Manager API• Add CDI devices to device plugin API resolved this issue.

• KubeEdge CNI support (e.g edgemesh, Cilium)• More Edge Optimization / Configurable Options for Resource Constrained Device Support• Cloud-Native Robotics Management Solution• `RoboDevOps` through Edge-Cloud Synergy• Cloud-Native Digital Twin for testing and data generation training• Robotics App Development Friendly• Cloud Robotics Custom Resource Definition and Operator Proposal• Edgemesh: adaptive cross-edge and edge-cloud data plane support• VSLAM algorithm with KubeEdge• Building a Robot-Oriented Intelligent Monitoring System

52| R&D Center U.S. Laboratory

Community

Kubernetes
IoT Edge WG

53| R&D Center U.S. Laboratory

KubeEdge
SIG Robotics

ROS Kubernetes
Tutorials

SONY is a registered trademark of Sony Group Corporation.
Names of Sony products and services are the registered trademarks and/or trademarks of Sony Group Corporation or its Group companies.
Other company names and product names are registered trademarks and/or trademarks of the respective companies.