# arsh09/smart_arm_ros architecture

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

- Interactive diagram: https://gitdiagram.com/arsh09/smart_arm_ros
- Repository: https://github.com/arsh09/smart_arm_ros

## Overview

##### Project Type and Purpose
- This is a robotics software project based on ROS Noetic.
- It simulates and controls a 6-DOF “smart arm” in Gazebo, offers MoveIt motion planning, RViz visualization, and ros_control-based joint actuation.
- Key use case: bring up the arm in simulation, send trajectories via MoveIt or joystick, and execute them on controllers.

##### File Structure Analysis
- Top-level packages:
- smart_arm_description: URDF/XACRO model, link meshes, plugins, Gazebo launch.
- smart_arm_bringup: launch file that starts Gazebo, spawns the robot, and runs core nodes (robot_state_publisher, joint_state_publisher, controller_manager).
- smart_arm_control: ros_control config (controllers.yaml), RViz config, control-specific launch file.
- smart_arm_moveit: MoveIt setup assistant data, planning config (OMPL, CHOMP, STOMP, Pilz), SRDF, launch files for MoveIt, Gazebo integration, sensors, warehouse DB, joystick.
- third_party/bio_ik: external inverse-kinematics solver integrated into MoveIt pipelines.
- Config and launch directories hold YAMLs and XML/launch scripts for each runtime component.
- CMakeLists.txt and package.xml files indicate each ROS package’s dependencies and build rules.

##### README Insights
- Workflow: clone, catkin_make, source, then `roslaunch smart_arm_bringup smart_arm_bringup.launch`.

##### Detailed Coverage
- Every major roslaunch file is represented as a component group.
- Parameter namespaces (e.g., /robot_description, /move_group/...).
- Do not oversimplify: show each planning pipeline if space allows.
- Essential architectural elements without adding irrelevant detail.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Core
    Master["ROS Master"]:::ros_node

    subgraph "Simulation Layer"
        Gazebo["Gazebo Simulator"]:::sim
        URDF["URDF/XACRO Model"]:::sim
        RobotState["robot_state_publisher"]:::ros_node
    end

    subgraph "Control Layer"
        CtrlMgr["controller_manager"]:::ros_node
        JointCtrl["Joint Controllers"]:::ros_node
    end

    subgraph "Planning Layer"
        MoveGroup["move_group"]:::ros_node
        OMPL["OMPL Planner"]:::ros_node
        CHOMP["CHOMP Planner"]:::ros_node
        STOMP["STOMP Planner"]:::ros_node
        Pilz["Pilz Planner"]:::ros_node
        BioIK("Bio_IK Plugin"):::ext
        SensorMgr["sensor_manager"]:::ros_node
    end

    subgraph "UI Layer"
        RViz["RViz"]:::ros_node
        Joystick["Joystick Node"]:::ros_node
        Warehouse["Warehouse DB"]:::data
    end

    %% Data Flows
    Master --> Gazebo
    Master --> RobotState
    Master --> CtrlMgr
    Master --> MoveGroup
    Master --> SensorMgr
    Master --> RViz
    Master --> Joystick
    Master --> Warehouse

    Gazebo -->|"/joint_states"| CtrlMgr
    CtrlMgr -->|"commands"| Gazebo
    Gazebo -->|"/joint_states"| RobotState
    RobotState -->|"TF frames"| RViz

    MoveGroup -->|"plans"| OMPL
    MoveGroup -->|"plans"| CHOMP
    MoveGroup -->|"plans"| STOMP
    MoveGroup -->|"plans"| Pilz
    MoveGroup -->|"invoke IK service"| BioIK
    MoveGroup -->|"send trajectories"| CtrlMgr
    MoveGroup -->|"publish planning data"| RViz

    Joystick -->|"velocity/goal commands"| MoveGroup
    Joystick -->|"direct commands"| CtrlMgr

    Warehouse -->|"store/retrieve scenes"| MoveGroup

    SensorMgr -->|"sensor data"| MoveGroup
    SensorMgr -->|"sensor data"| RViz

    %% Click Events
    click Gazebo "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_description/launch/gazebo.launch"
    click URDF "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_description/urdf/smart_arm.urdf.xacro"
    click RobotState "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_bringup/launch/smart_arm_bringup.launch"
    click CtrlMgr "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_control/launch/smart_arm_control_sim.launch"
    click MoveGroup "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_moveit/launch/move_group.launch"
    click OMPL "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_moveit/config/ompl_planning.yaml"
    click CHOMP "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_moveit/config/chomp_planning.yaml"
    click STOMP "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_moveit/config/stomp_planning.yaml"
    click Pilz "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_moveit/launch/pilz_industrial_motion_planner_planning_pipeline.launch.xml"
    click RViz "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_moveit/launch/moveit_rviz.launch"
    click BioIK "https://github.com/arsh09/smart_arm_ros/tree/noetic-devel/third_party/bio_ik"
    click Joystick "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_moveit/launch/joystick_control.launch"
    click Warehouse "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_moveit/launch/default_warehouse_db.launch"
    click SensorMgr "https://github.com/arsh09/smart_arm_ros/blob/noetic-devel/smart_arm_moveit/launch/sensor_manager.launch.xml"

    %% Styles
    classDef ros_node fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef data fill:#90EE90,stroke:#000,stroke-width:1px,shape:cylinder
    classDef sim fill:#FFA500,stroke:#000,stroke-width:1px,shape:parallelogram
    classDef ext fill:#DDA0DD,stroke:#000,stroke-width:1px,shape:circle
```
