# flexivrobotics/flexiv_rdk architecture

> Architecture diagram of the GitHub repository flexivrobotics/flexiv_rdk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/flexivrobotics/flexiv_rdk
- Repository: https://github.com/flexivrobotics/flexiv_rdk

## Overview

Flexiv RDK is a C++ robotic development kit whose public interfaces also support Python usage. The principal workflow is for an application to connect to a Flexiv robot, inspect its state and readiness, select a control mode, and issue motion or primitive commands. The API also exposes plan execution, real-time control, grippers and other devices, tool configuration, safety settings, and robot dynamics. The implementation is distributed in prebuilt libraries; the sampled source primarily documents public interfaces, so internal transport and dispatch details are not shown.

Main entry points: [`include/flexiv/rdk/robot.hpp`](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp) (Robot API), [`include/flexiv/rdk/data.hpp`](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/data.hpp) (Robot data types), [`include/flexiv/rdk/mode.hpp`](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/mode.hpp) (Control modes), [`include/flexiv/rdk/gripper.hpp`](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/gripper.hpp) (Gripper control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_connection["Robot connection"]
  node_rdk_robot["Robot API<br/>[robot.hpp]"]
  node_robot_state["State and status<br/>[robot.hpp]"]
end

subgraph group_motion["Motion control"]
  node_mode["Control modes<br/>[mode.hpp]"]
  node_primitives["Primitive execution<br/>[robot.hpp]"]
  node_plans["Plan execution<br/>[robot.hpp]"]
  node_realtime["RT control<br/>[robot.hpp]"]
  node_nrt_motion["NRT motion<br/>[robot.hpp]"]
end

subgraph group_robot_services["Robot services"]
  node_gripper["Gripper control<br/>[gripper.hpp]"]
  node_device["Device management<br/>[device.hpp]"]
  node_tool["Tool management<br/>[tool.hpp]"]
  node_safety["Safety settings<br/>[safety.hpp]"]
  node_maintenance["Maintenance<br/>[maintenance.hpp]"]
  node_file_io["Robot file access<br/>[file_io.hpp]"]
end

subgraph group_foundations["Data and models"]
  node_model["Robot dynamics<br/>[model.hpp]"]
  node_scheduler["RT scheduler<br/>[scheduler.hpp]"]
  node_work_coord["Work coordinates<br/>[work_coord.hpp]"]
  node_data_types["Robot data types<br/>[data.hpp]"]
end

node_application(("User application"))
node_robot_device{{"Flexiv robot"}}

node_application -->|"creates and commands"| node_rdk_robot
node_rdk_robot -->|"connects to"| node_robot_device
node_rdk_robot -->|"reads state"| node_robot_state
node_robot_state -->|"returns status"| node_application
node_application -->|"selects mode"| node_mode
node_application -->|"executes skills"| node_primitives
node_application -->|"runs plans"| node_plans
node_application -->|"sends RT commands"| node_realtime
node_application -->|"sends NRT commands"| node_nrt_motion
node_application -->|"controls gripper"| node_gripper
node_application -->|"manages devices"| node_device
node_application -->|"configures tools"| node_tool
node_application -->|"sets limits"| node_safety
node_application -->|"requests service"| node_maintenance
node_application -->|"accesses files"| node_file_io
node_application -->|"computes dynamics"| node_model
node_application -->|"configures scheduling"| node_scheduler
node_application -->|"manages coordinates"| node_work_coord
node_data_types -->|"supplies API types"| node_application

click node_rdk_robot "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp"
click node_robot_state "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp"
click node_mode "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/mode.hpp"
click node_primitives "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp"
click node_plans "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp"
click node_realtime "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp"
click node_nrt_motion "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp"
click node_gripper "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/gripper.hpp"
click node_device "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/device.hpp"
click node_tool "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/tool.hpp"
click node_safety "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/safety.hpp"
click node_maintenance "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/maintenance.hpp"
click node_file_io "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/file_io.hpp"
click node_model "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/model.hpp"
click node_scheduler "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/scheduler.hpp"
click node_work_coord "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/work_coord.hpp"
click node_data_types "https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/data.hpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_rdk_robot,node_robot_state,node_application toneBlue
class node_mode,node_primitives,node_plans,node_realtime,node_nrt_motion toneAmber
class node_gripper,node_device,node_tool,node_safety,node_maintenance,node_file_io toneMint
class node_model,node_scheduler,node_work_coord,node_data_types toneRose
class node_robot_device toneIndigo
```

## Components

### Robot connection

- [Robot API](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp): `include/flexiv/rdk/robot.hpp`
- [State and status](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp): `include/flexiv/rdk/robot.hpp`

### Motion control

- [Control modes](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/mode.hpp): `include/flexiv/rdk/mode.hpp`
- [Primitive execution](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp): `include/flexiv/rdk/robot.hpp`
- [Plan execution](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp): `include/flexiv/rdk/robot.hpp`
- [RT control](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp): `include/flexiv/rdk/robot.hpp`
- [NRT motion](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/robot.hpp): `include/flexiv/rdk/robot.hpp`

### Robot services

- [Gripper control](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/gripper.hpp): `include/flexiv/rdk/gripper.hpp`
- [Device management](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/device.hpp): `include/flexiv/rdk/device.hpp`
- [Tool management](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/tool.hpp): `include/flexiv/rdk/tool.hpp`
- [Safety settings](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/safety.hpp): `include/flexiv/rdk/safety.hpp`
- [Maintenance](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/maintenance.hpp): `include/flexiv/rdk/maintenance.hpp`
- [Robot file access](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/file_io.hpp): `include/flexiv/rdk/file_io.hpp`

### Data and models

- [Robot dynamics](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/model.hpp): `include/flexiv/rdk/model.hpp`
- [RT scheduler](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/scheduler.hpp): `include/flexiv/rdk/scheduler.hpp`
- [Work coordinates](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/work_coord.hpp): `include/flexiv/rdk/work_coord.hpp`
- [Robot data types](https://github.com/flexivrobotics/flexiv_rdk/blob/main/include/flexiv/rdk/data.hpp): `include/flexiv/rdk/data.hpp`

### Other components

- **User application**
- **Flexiv robot**

## Connections

- User application → Robot API: creates and commands
- Robot API → Flexiv robot: connects to
- Robot API → State and status: reads state
- State and status → User application: returns status
- User application → Control modes: selects mode
- User application → Primitive execution: executes skills
- User application → Plan execution: runs plans
- User application → RT control: sends RT commands
- User application → NRT motion: sends NRT commands
- User application → Gripper control: controls gripper
- User application → Device management: manages devices
- User application → Tool management: configures tools
- User application → Safety settings: sets limits
- User application → Maintenance: requests service
- User application → Robot file access: accesses files
- User application → Robot dynamics: computes dynamics
- User application → RT scheduler: configures scheduling
- User application → Work coordinates: manages coordinates
- Robot data types → User application: supplies API types
