Software¶
The system level diagram does a good job at summarizing the different packages of this project. Summary of purpose of each package:
Monopod SDK
: Implements drivers for the physical robot, accompanied by an API to control the monopod and/or receive measurements from the robot. Additionally, Monopod SDK implements safety limits that run independently in a separate thread.ScenarI/O
: Abstract layer that is used to interface with robots 1 by exposing APIs to interact with a scene. The scene is defined as a World object that can return Model objects. This allows the simulated or physical robot to be implemented as a separate scenarIO back-end, which can be switched between.gym-os2r
: Implements the monopod gym environments using thegym_ignition
environment structure (separates simulator interface from task logic). It is shipped alongsidegym_os2r_real
which all features that require additional dependencies required to rungym_os2r
on the physical robot.
The following design requirements drove the design of the software platform:
High-level code should interact with an abstracted representation of the robot to hide implementation details between the simulator or real robot.
Must maintain strict real-time scheduling of 1khz during model inference. This require becomes more problematic if training on the real robot.
Implement simple, easy to use drivers for the physical robot.
Separate physical robot and simulator dependencies to simplify installation.
Provide simple method to install and setup workspace.
A basic root introduction on how to use the software stack to control the robot can be found in the Quick Start, How To Guides, or Tutorials sections.
Dependency Structure¶
Illustrating the project dependencies in a directed graph we see the complexity of the directed dependency graph.
A common method to handle projects with multi-layer dependencies is to use a dependency manager, if you are familiar with ROS, this would be catkin or colcon workspace. However, this adds in additional project dependencies and limits the flexibility of the build system.
Note
We plan to eventually package the physical robot dependencies within a container to make this process as streamline as possible. For more information please look at the Project Roadmap.
Superbuild¶
One of the design requires was to provide a “simple, easy method to install and setup workspace”. To do this we created a custom build system based on the superbuild CMake pattern using pure CMake for portability reasons and for customizing the build via CMake options.
This was done using a meta repository (so-called “superbuild”) that uses CMake and YCM to automatically download and compile software developed in the OpenSim2Real GitHub organization. This superbuild is based on the robotology-superbuild. A YCM Superbuild is a CMake project whose only goal is to download and build several other projects.
CMake is an open-source, cross-platform family of tools designed to build, test and package software.