Fmrrehab is a comprehensive rehabilitation robotics platform built on ROS 2 with advanced motion control, force-torque sensing, and safety-critical PLC integration. The system coordinates a 3-DOF rehabilitation arm through a real-time control architecture with emergency stop chains and sensor-based impedance control.
Dual Controller Manager Setup The system uses two separate controller-manager instances for safety isolation:
The safety PLC module installed in the FMRREHAB platform is managed by the following ros2 nodes at a 500 Hz control loop:
PLC Controller Manager
└─ PLC Controller
- Reads/writes 8 GPIO command outputs
- Reads 8 GPIO state inputs
- Publishes PlcStates for subscribers
The following controllers are automathically loaded and will run at 250 Hz:
- Joint Trajectory Controller
- Forward Velocity Controller
- Impedance Controller
- Force/Torque Sensor Broadcaster
(PyQt5 Interface with SSH Remote Access)
High-Level user interface with SSH connection for remote launching and UDP
client for status monitoring
Master configuration package containing all URDF definitions, controller YAML configs, and launch files.
ROS 2 node managing system lifecycle through PLC state transitions.
C++ controller plugin implementing GPIO bridge between ROS 2 and Safety PLC.
This package provides the primary motion control and sensor management modules needed by the motion control stack.
Multi-Platform user interface developed with QT managing robot high-level control by the user and rehabilitation exercise configuration.
launch_ros2_env.sh
Launches ros2 control framework and default controllers, managing two cases:
- first launch: homing process performed
- launch after an emergency stop by the user: no homing needed
kill_ros_apps.sh
- Gracefully unspawn all active controllers
- Unload inactive controllers
- Coordinate with PLC manager for clean shutdown
- fmrr_gui.ps1 - launch GUI
- fmrr_bringup.ps1 - SSH into Linux, start ROS2 stack via PLC launcher
- fmrr_cleanup.ps1 - SSH into Linux, gracefully shut down all nodes
- fmrr_scp.ps1 - Transfer files remotely between Windows & Linux
- PlcController.msg - Command messages to PLC
- PlcStates.msg - State feedback from PLC
- SetExercise.srv - Exercise execution request
- SetTrajectory.srv - Tajectory execution request
Common Issues
-
EtherCAT PLC Not Operational Check EtherCAT slaves: ethercat slaves # Expected: "FLX0-GETC100 OP" ethercat master # If not OP, check ethercat master
-
Homing Timeout
- Check motor connection (ESTOP signal must be active)
- Verify safe movement zone (no mechanical obstructions)
- Increase timeout in boot_hw.py if needed
- GUI Not Receiving Status
- Verify UDP port 5005 is open
- Check network connectivity (SSH must work)
- Verify GUI IP in plc_manager launch: gui_ip:=<windows_ip>
- Trajectory Execution Hangs
- Check joint_trajectory_controller state: ros2 control list_controllers
- Verify all joints in "active" state
- Check for controller timeouts in /tmp/launch logs
This project is licensed under the Apache-2.0 License. See LICENSE file for details.
For questions about this rehabilitation platform, contact Nicola Pedrocchi and Adriano Scibilia