# ros-industrial/fanuc architecture

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

- Interactive diagram: https://gitdiagram.com/ros-industrial/fanuc
- Repository: https://github.com/ros-industrial/fanuc

## Overview

This repository is a large meta‐package for ROS-Industrial support of FANUC robots. It isn’t a “full stack” web application in the traditional sense; rather, it is a set of ROS packages that provide drivers, robot description (URDF and meshes), configuration support (including joint names, OPW parameters, etc.), and MoveIt configuration and plugins for various FANUC robot models. In other words, it is a robotics “system” made up of many interrelated packages that integrate with ROS, MoveIt!, and other ROS tools to support industrial robot control and simulation.

##### Main components
- Robot Hardware and Interfaces – represent the physical FANUC robot (or multiple models such as M10ia, M20ia, etc.) and the underlying industrial control system.
- ROS Nodes for Robot Control – include driver nodes (e.g., fanuc_driver) that handle communication with the actual robot via motion streaming, state feedback, and possibly low-level control.
- Support/Description Packages – show packages that supply the robot description, URDF/XACRO models, meshes (collision and visual), and configuration files (joint parameters, kinematics, etc.). Group these under “robot support packages” (like fanuc_cr7ia_support, fanuc_m10ia_support, fanuc_m20ia_support, etc.).
- MoveIt Components – include separate MoveIt configuration packages (in the moveit_cfgs subfolder) and any associated plugins (in the moveit plugins folders). These handle motion planning, collision checking, and inverse kinematics using IKFast or other kinematics plugins.
- Build and Integration Tools – note that there is a standard ROS Catkin workspace structure, with CMakeLists.txt and package.xml files, along with CI-related configurations (e.g., GitHub workflows) that automate testing and building.

##### Relationships and interactions
- Dependency Relationships: The driver package depends on the support packages that provide the URDF, meshes, and configuration data. Similarly, MoveIt configuration packages rely on these descriptions to generate a robot model for planning.
- Integration Points: Illustrate how the MoveIt planning components integrate with sensor managers and the driver nodes via ROS topics and services.
- Build and Deployment: Optionally, add a block showing the CI (GitHub Actions) that triggers builds and tests within a Catkin workspace setup.

##### Architectural patterns and design principles
- Modularity: Each package (driver, support, MoveIt configuration) is self-contained and structured around ROS’s package-oriented ecosystem.
- Separation of Concerns: The robot description (URDF, meshes, configs) is separated from the driver logic and from planning/simulation tools.
- Community-Supported Development: Indicate that many packages are maintained on a best-effort basis with separate branches (e.g., noetic-devel for ROS Noetic).

##### Technologies and dependencies
- ROS (Robot Operating System) – outlines the communication middleware.
- Catkin Build System – for building and managing packages.
- MoveIt! – for motion planning and robot manipulation.
- IKFast and other kinematics solvers – integrated as plugins in MoveIt.
- Standard configuration files (CMakeLists.txt, package.xml) that dictate package dependencies.
- GitHub workflows for continuous integration (ci_ros1.yml).

##### Essential architectural elements
- Modular structure: show how multiple robot support packages exist side by side (each handling a particular model) and how they’re unified under the Fanuc meta-package.
- Links between ROS core, robot drivers, hardware, and higher-level planning (MoveIt configurations).
- Build and integration pipeline (for example, a side note on how “catkin build” and GitHub CI ensure system coherence).

## Diagram (Mermaid)

```mermaid
graph TD
    %% MoveIt Components (Top Layer)
    subgraph "MoveIt Components"
        MoveIt1["fanuc_cr7ia_moveit_config"] 
        MoveIt2["fanuc_cr7ial_moveit_config"] 
        MoveIt3["fanuc_lrmate200i_moveit_config"] 
        MoveIt4["fanuc_m10ia_moveit_config"] 
        MoveItPlugin["fanuc_lrmate200i_moveit_plugins"] 
    end

    %% Support/Description Packages (Layer below MoveIt)
    subgraph "Support/Description Packages"
        Support1["fanuc_cr35ia_support"]
        Support2["fanuc_cr7ia_support"]
        Support3["fanuc_crx10ia_support"]
        Support4["fanuc_lrmate200i_support"]
        Support5["fanuc_lrmate200ib_support"]
        Support6["fanuc_lrmate200ic_support"]
        Support7["fanuc_lrmate200id_support"]
        Support8["fanuc_m10ia_support"]
        Support9["fanuc_m16ib_support"]
        Support10["fanuc_m20ia_support"]
        Support11["fanuc_m20ib_support"]
        Support12["fanuc_m430ia_support"]
        Support13["fanuc_m6ib_support"]
        Support14["fanuc_m710ic_support"]
        Support15["fanuc_m900ia_support"]
        Support16["fanuc_m900ib_support"]
        Support17["fanuc_r1000ia_support"]
        Support18["fanuc_r2000ib_support"]
        Support19["fanuc_r2000ic_support"]
        Resource["fanuc_resources"]
    end

    %% ROS Nodes for Robot Control (Layer below Support)
    subgraph "ROS Nodes for Robot Control"
        JointStreamer["fanuc_joint_streamer_node.cpp"]
        RobotStateNode["fanuc_robot_state_node.cpp"]
        FanucUtils["fanuc_utils.cpp"]
    end

    %% Robot Hardware and Interfaces (Bottom Layer)
    subgraph "Robot Hardware and Interfaces"
        HardwareStreaming["robot_interface_streaming.launch"]
        HardwareState["robot_state.launch"]
    end

    %% Build and Integration Tools (Side Group)
    subgraph "Build and Integration Tools"
        Build1["CMakeLists.txt & package.xml"]
        Build2[".github/workflows/ci_ros1.yml"]
    end

    %% Connections between layers
    %% MoveIt Components -> Support Packages
    MoveIt1 -->|"uses_description"| Resource
    MoveItPlugin -->|"sends_planning"| JointStreamer

    %% Support Packages -> ROS Nodes
    Resource -->|"provides_model"| FanucUtils
    FanucUtils -->|"uses_support"| Support2

    %% ROS Nodes <--> Robot Hardware and Interfaces
    JointStreamer -->|"commands"| HardwareStreaming
    RobotStateNode -->|"receives_state"| HardwareState
    HardwareState -->|"sends_feedback"| RobotStateNode

    %% Build and Integration Tools connections
    Build1 -->|"builds"| FanucUtils
    Build1 -->|"builds"| Resource
    Build1 -->|"builds"| MoveIt1
    Build2 -->|"CI_triggers_build"| Build1

    %% Additional integration between MoveIt and ROS nodes
    MoveIt2 -.->|"planning_signals"| RobotStateNode

    %% Class Definitions for Coloring
    classDef hardware fill:#CEF6F5,stroke:#0B3B0B,stroke-width:2px;
    classDef ros fill:#F9E79F,stroke:#D4AC0D,stroke-width:2px;
    classDef support fill:#D5F5E3,stroke:#27AE60,stroke-width:2px;
    classDef moveit fill:#FADBD8,stroke:#C0392B,stroke-width:2px;
    classDef build fill:#D6EAF8,stroke:#2980B9,stroke-width:2px;

    %% Assign classes to nodes
    class HardwareStreaming,HardwareState hardware;
    class JointStreamer,RobotStateNode,FanucUtils ros;
    class Support1,Support2,Support3,Support4,Support5,Support6,Support7,Support8,Support9,Support10,Support11,Support12,Support13,Support14,Support15,Support16,Support17,Support18,Support19,Resource support;
    class MoveIt1,MoveIt2,MoveIt3,MoveIt4,MoveItPlugin moveit;
    class Build1,Build2 build;

    %% Click Events for Robot Hardware and Interfaces
    click HardwareStreaming "https://github.com/ros-industrial/fanuc/blob/noetic-devel/fanuc_driver/launch/robot_interface_streaming.launch"
    click HardwareState "https://github.com/ros-industrial/fanuc/blob/noetic-devel/fanuc_driver/launch/robot_state.launch"

    %% Click Events for ROS Nodes for Robot Control
    click JointStreamer "https://github.com/ros-industrial/fanuc/blob/noetic-devel/fanuc_driver/src/fanuc_joint_streamer_node.cpp"
    click RobotStateNode "https://github.com/ros-industrial/fanuc/blob/noetic-devel/fanuc_driver/src/fanuc_robot_state_node.cpp"
    click FanucUtils "https://github.com/ros-industrial/fanuc/blob/noetic-devel/fanuc_driver/src/fanuc_utils.cpp"

    %% Click Events for Support/Description Packages
    click Support1 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_cr35ia_support"
    click Support2 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_cr7ia_support"
    click Support3 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_crx10ia_support"
    click Support4 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_lrmate200i_support"
    click Support5 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_lrmate200ib_support"
    click Support6 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_lrmate200ic_support"
    click Support7 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_lrmate200id_support"
    click Support8 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_m10ia_support"
    click Support9 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_m16ib_support"
    click Support10 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_m20ia_support"
    click Support11 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_m20ib_support"
    click Support12 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_m430ia_support"
    click Support13 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_m6ib_support"
    click Support14 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_m710ic_support"
    click Support15 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_m900ia_support"
    click Support16 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_m900ib_support"
    click Support17 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_r1000ia_support"
    click Support18 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_r2000ib_support"
    click Support19 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_r2000ic_support"
    click Resource "https://github.com/ros-industrial/fanuc/tree/noetic-devel/fanuc_resources"

    %% Click Events for MoveIt Components
    click MoveIt1 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/moveit_cfgs/fanuc_cr7ia_moveit_config"
    click MoveIt2 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/moveit_cfgs/fanuc_cr7ial_moveit_config"
    click MoveIt3 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/moveit_cfgs/fanuc_lrmate200i_moveit_config"
    click MoveIt4 "https://github.com/ros-industrial/fanuc/tree/noetic-devel/moveit_cfgs/fanuc_m10ia_moveit_config"
    click MoveItPlugin "https://github.com/ros-industrial/fanuc/tree/noetic-devel/moveit_cfgs/fanuc_lrmate200i_moveit_plugins"

    %% Click Events for Build and Integration Tools
    click Build1 "https://github.com/ros-industrial/fanuc/blob/noetic-devel/CMakeLists.txt"
    click Build2 "https://github.com/ros-industrial/fanuc/blob/noetic-devel/.github/workflows/ci_ros1.yml"
```
