We have designed a ROS-based architecture for controlling and managing a rover. The system is distributed between a base station (computer) and the rover itself (Raspberry Pi), with additional components on an Arduino Mega.
System Architecture Diagram
System Components
Base Station
- Hardware: Computer
- Main Node:
benrover_communication/communication_node
Rover
- Hardware: Raspberry Pi
- Main Nodes:
benrover_navigation/navigation_nodebenrover_sensors/sensor_nodebenrover_actuators/actuator_nodebenrover_energy_management/energy_management_nodebenrover_interface/interface_node
Motor Control
- Hardware: Arduino Mega
Node Descriptions
Base Station Nodes
Base Station Nodes
benrover_communication/communication_node
- Role: Manages Wi-Fi communication between the rover and base station, and handles joystick control.
- Published Topics:
/rover_status: Sends rover status information to the base station./control_command: Sends joystick movement commands to the navigation node.
- Subscribed Topics:
/joy: Receives joystick data (position, buttons).
- Communication:
- Wi-Fi: Communicates with the navigation node on the Raspberry Pi.
- TCP/IP: Used for communication with the navigation node.
Rover Nodes (Raspberry Pi)
Rover Nodes (Raspberry Pi)
benrover_navigation/navigation_node
- Role: Manages real-time rover safety using LIDAR data for collision avoidance.
- Subscribed Topics:
/control_command: Receives joystick movement commands./sensor_data: Receives LIDAR data.
- Published Topics:
/cmd_vel: Sends modified speed commands for motors./rover_status: Sends rover status information.
- Communication:
- TCP/IP: Communicates with the base station.
- I2C: Communicates with sensors on the Arduino Uno.
benrover_sensors/sensor_node
- Role: Retrieves and processes sensor data via I2C.
- Published Topics:
/sensor_data: Sends sensor data (LIDAR) to the navigation node./temperature_data: Sends temperature sensor data (if applicable)./distance_data: Sends distance sensor data (if applicable).
- Communication:
- I2C: Communicates with sensors.
benrover_actuators/actuator_node
- Role: Translates movement commands from the navigation node into motor and servo commands.
- Services:
SetMotorSpeed: Modifies the speed of a specific motor.SetServoPosition: Sets the position of a servo motor.
- Communication:
- PWM: Communicates with the Arduino Mega.
benrover_energy_management/energy_management_node
- Role: Monitors battery status and manages rover power consumption.
- Subscribed Topics:
/battery_status: Receives battery status information from the sensor node.
benrover_interface/interface_node
- Role: Displays rover status information to the user (LCD screen or web interface).
- Subscribed Topics:
/rover_data: Receives information to display from the navigation node or other nodes.
Arduino Mega Node
Arduino Mega Node
- Role: Receives motor speed commands (via PWM) from the actuator node on the Raspberry Pi and controls the roverβs motors.
- Communication:
- PWM: Receives PWM signals from the actuator node.
Communication Flow
Base Station to Rover
Base Station β Navigation Node (Raspberry Pi): Wi-Fi or TCP/IP
Internal Rover Communication
- Navigation Node β Sensor Node (Raspberry Pi): I2C
- Navigation Node β Actuator Node (Raspberry Pi): I2C
- Actuator Node (Raspberry Pi) β Arduino Mega: PWM
Best Practices
Follow these best practices to ensure efficient implementation and debugging of the Benrover ROS architecture:
- Message and Service Definitions: Define clear ROS messages and services for each node and package to ensure efficient communication.
- Transformation System: Utilize the
tfpackage to manage reference frames for the robot and base station. - Visualization: Use
rvizfor visualizing the robot, sensors, obstacles, and environment maps. - Debugging: Employ
rosbag,rqt,rosnode, androstopicfor identifying and fixing errors.
Key Points
Base Station
- Serves as the central server
- Manages communication and user interface
- Joystick is an input device
Rover
- Acts as a client
- Connects to the base station
- Receives commands and sends data
Communication
- Wi-Fi and TCP/IP between base station and rover
- I2C between Raspberry Pi and sensors/actuators
- PWM for motor and servo control
Want to use our ROS workspace?
π» Installation
- Installing ROS by following the instructions in the documentation: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html
-
Install
colconto build packages -
Clone the repository
βοΈ Configuring environment
-
On Ubuntu
If you donβt want to have to source the setup file every time you open a new shell, then you can add the command to your shell startup script:In the file that opens, complete the following lines: