A modular ROS2 software framework demonstrating the complete control and analysis pipeline for a bilateral lower-limb exoskeleton.
This project implements a modular ROS2 framework for simulating and analyzing bilateral lower-limb exoskeleton control using synthetic gait data. The framework processes joint kinematics, joint kinetics, and ground reaction forces to estimate gait phase, compute assistive torques, generate motor commands, estimate power consumption, and visualize system behavior using standard ROS2 tools.
- Overview
- System Architecture
- Software Pipeline
- Features
- Background
- Project Structure
- ROS Topics
- Custom Messages
- Installation
- Running the Project
- Visualization
- Sample Data
- Future Improvements
- License
This project implements a modular ROS2 pipeline for simulating the control architecture of a bilateral lower-limb exoskeleton. Rather than combining all functionality into a single node, the system is divided into independent ROS2 nodes that communicate through ROS topics, making the framework easy to understand, extend, and debug.
The framework reproduces a typical exoskeleton software pipeline:
- Playback of synthetic biomechanical gait data
- Ground reaction force (GRF) based gait phase detection
- Assistive torque computation
- Motor torque conversion using drivetrain gear ratios
- Mechanical and electrical power estimation
- Battery current and runtime estimation
- Real-time visualization using RViz2 and ROS visualization tools
Although the current implementation uses synthetic gait data for demonstration purposes, the modular architecture allows the CSV playback node to be replaced with live sensors in future hardware implementations.
The framework follows a modular publish-subscribe architecture in ROS2. Each node performs a single responsibility and communicates with other nodes through ROS topics.
CSV Playback Node
│
┌────────────────┼────────────────┐
│ │ │
▼ ▼ ▼
Joint Angles Joint Moments Joint Velocities
│
▼
Ground Reaction Force
│
▼
Gait Phase Detection
│
▼
Assistive Torque Controller
│
▼
Motor Command Conversion
│
▼
Power & Battery Monitoring
│
▼
RViz2 Visualization
Each node follows the single-responsibility principle, allowing individual components to be developed, tested, and replaced independently.
The current implementation processes data through the following sequence:
- CSV Playback
- Joint Angle, Joint Moment, Joint Velocity and GRF publication
- Gait Phase Detection
- Assistive Torque Computation
- Motor Torque Conversion
- Mechanical & Electrical Power Estimation
- Battery Current & Runtime Estimation
- RViz2 Visualization
- Bilateral lower-limb processing
- Ground reaction force based gait phase detection
- Hip assistive torque computation
- Stance-phase ankle assistive torque computation
- Configurable motor gear ratios
- Motor torque saturation limits
- Mechanical power estimation
- Electrical power estimation
- Battery current estimation
- Runtime estimation
- Modular ROS2 node-based architecture
- Custom ROS2 message definitions
- Launch file support
- ROS2 parameter-based configuration
- RViz2 visualization
- rqt_graph compatibility
- rqt_plot compatibility
- Synthetic gait dataset generation
This framework was developed as an extension of my M.S. Robotics capstone project at the Georgia Institute of Technology.
The original capstone focused on the feasibility study and design of an integrated bilateral hip–ankle exoskeleton. This ROS2 framework translates that work into a modular software architecture for control, analysis, and visualization while following the software design principles commonly used in robotic systems.
ros2-exoskeleton-control-framework/
│
├── sample_data/
│ ├── sample_walk.csv
│
├── scripts/
│ └── generate_sample_data.py
│
├── images/
│ ├── rqt_graph.png
│ ├── rqt_plot.png
│ └── rviz_marker.png
│
├── src/
│ ├── exo_control/
│ └── exo_interfaces/
│
├── README.md
└── .gitignore
| Topic | Description |
|---|---|
/left/joint_angles |
Left leg joint angles |
/right/joint_angles |
Right leg joint angles |
/left/joint_moments |
Left leg joint moments |
/right/joint_moments |
Right leg joint moments |
/left/joint_velocities |
Left leg joint velocities |
/right/joint_velocities |
Right leg joint velocities |
/left/foot_grf |
Left ground reaction force |
/right/foot_grf |
Right ground reaction force |
/left/gait_phase |
Left gait phase |
/right/gait_phase |
Right gait phase |
/left/hip/assistive_torque |
Left hip assistive torque |
/right/hip/assistive_torque |
Right hip assistive torque |
/left/ankle/assistive_torque |
Left ankle assistive torque |
/right/ankle/assistive_torque |
Right ankle assistive torque |
/left/hip/motor_torque |
Left hip motor torque |
/right/hip/motor_torque |
Right hip motor torque |
/left/ankle/motor_torque |
Left ankle motor torque |
/right/ankle/motor_torque |
Right ankle motor torque |
The exo_interfaces package defines three custom ROS2 messages.
float32 hip
float32 knee
float32 ankle
float32 hip
float32 knee
float32 ankle
float32 hip
float32 knee
float32 ankle
Clone the repository:
git clone https://github.com/Krishna-010/ros2-exoskeleton-control-framework.git
cd ros2-exoskeleton-control-frameworkBuild the workspace:
colcon build
source install/setup.bashLaunch the complete framework:
ros2 launch exo_control exo_demo.launch.pyThe launch file starts the following nodes:
- CSV Playback Node
- Gait Phase Node
- Assist Node
- Motor Command Node
- Power Monitor Node
- Visualization Node
The figure below illustrates the modular ROS2 node and topic architecture.
The following plot demonstrates the relationship between joint moment, assistive torque, and motor torque.
Assistive torque is visualized in RViz2 using ROS visualization markers.
The repository contains a synthetic gait dataset (sample_data/sample_walk.csv) generated specifically for demonstration purposes.
The synthetic data reproduces the structure expected by the framework while avoiding the use of proprietary laboratory or participant data.
Potential future extensions include:
- Live IMU and force sensor integration
- Hardware interface using ROS2 Control
- URDF-based exoskeleton visualization
- Real-time human subject experiments
- Alternative assistive controllers
- Battery state-of-charge estimation
- Hardware-in-the-loop testing
This project is released under the MIT License.


