-
Notifications
You must be signed in to change notification settings - Fork 3
Home
This documentation provides an overview of the BlueRov2 robot system, including its integration of the Pixhawk flight controller, Raspberry Pi (running BlueOS), and a ROS2-based control architecture. It covers key components such as motors, sensors, lights, webcam, and sonar, and explains how these elements interact within the system.
π οΈ Key Components:
- Pixhawk Flight Controller - Controls motors, lights, and sensors.
- Raspberry Pi - Runs BlueOS and manages communication between the Pixhawk and external devices.
- ROS2 Computer - Sends control commands and processes data via ROS2 nodes.
- Webcam and Sonar - Connected via USB to the Raspberry Pi for video streaming and sonar data collection.
+--------------------+
| Computer | π₯οΈ
| (with ROS2) |
+--------------------+
|
Ethernet / Data Cable (IP: 192.168.2.2)
|
+--------------------+
| Raspberry Pi | π
| (BlueOS + Pymavlink)|
+--------------------+
| | |
USB/Webcam USB/Sonar Pixhawk
π· π¨οΈ π
|
|
+-------------+
| Pixhawk |
| (Flight |
| Controller)|
+-------------+
| |
+-------------+ +--------------------+
| | |
+----------------------+ +--------------------+ |
| Motors | | Sensors | |
| (e.g., Thrusters) | |(Pressure, Humidity)| +---|----+
+----------------------+ +--------------------+ | Lights |
+--------+
ROS2 Topics:
-----------------------------------------
/bluerov2/rc/pitch -> Pitch Controller
/bluerov2/rc/roll -> Roll Controller
/bluerov2/rc/throttle -> Throttle Controller
/bluerov2/rc/yaw -> Yaw Controller
/bluerov2/rc/forward -> Forward Control
/bluerov2/rc/lateral -> Lateral Control
/bluerov2/rc/camera_pan -> Camera Pan Control
/bluerov2/rc/camera_tilt -> Camera Tilt Control
/bluerov2/rc/lights -> Lights Control
/bluerov2/arm -> Arm/Disarm Control
/bluerov2/battery -> Battery Status
/bluerov2/attitude -> Attitude Data
/bluerov2/bar30 -> Barometer Data
/bluerov2/arm_status -> Arm Status Feedback
Video Stream (UDP):
Webcam -> Raspberry Pi -> Port 5600 -> Computer
Sonar:
Sonar -> USB -> Raspberry Pi -> Virtualhere -> Computer
The Pixhawk is the central controller for the robot's hardware, managing:
- Motors: Controls the thrusters that manage the BlueRov2's movement.
- Lights: Manages the headlights for underwater navigation.
-
Sensors: Reads from onboard environmental sensors like:
- Pressure sensor (for depth).
- Humidity sensor.
The Raspberry Pi runs BlueOS, which provides an interface for controlling the Pixhawk and other peripherals. It communicates with the computer via Pymavlink
and handles USB devices like the Webcam and Sonar.
- Pymavlink: Bridges ROS2 with the Pixhawk to send/receive control commands.
-
USB Ports:
- Webcam: Streams video over UDP to the computer (port 5600).
-
Sonar: Provides telemetry via the
tritech_micron
package, streamed to the computer using Virtualhere (USB-over-IP).
The ROS2 computer sends control commands to the Raspberry Pi and processes data from sensors and the video stream. Key control features include:
-
ROS2 Controllers:
-
pitch_controller
π― - Manages the pitch angle of the BlueRov2. -
roll_controller
π - Adjusts the roll of the BlueRov2. -
yaw_controller
π§ - Controls the yaw (heading direction). -
depth_controller
π - Maintains the depth of the BlueRov2.
Each of these controllers uses a PID controller to adjust the motor outputs, ensuring smooth and accurate movement.
-
The PID (Proportional-Integral-Derivative) controllers help manage the stability and precision of each control aspect (pitch, roll, yaw, depth) by calculating the error between desired and actual values and adjusting the motors accordingly:
- Proportional: Corrects based on the magnitude of the error.
- Integral: Corrects accumulated past errors.
- Derivative: Predicts and corrects future error trends based on the rate of change.
- Webcam: Streams live video to the ROS2 computer over UDP (port 5600).
- Sonar: Utilizes the Tritech Micron sonar package for underwater telemetry, streamed to the computer via Virtualhere.
These topics allow the ROS2 system to send control commands to the Pixhawk:
-
/bluerov2/rc/pitch
: Controls the pitch of the robot. -
/bluerov2/rc/roll
: Controls the roll. -
/bluerov2/rc/throttle
: Manages throttle for speed control. -
/bluerov2/rc/yaw
: Adjusts the yaw (rotation). -
/bluerov2/rc/forward
: Moves the robot forward. -
/bluerov2/rc/lateral
: Controls lateral (side-to-side) movement. -
/bluerov2/rc/camera_pan
: Pans the onboard camera. -
/bluerov2/rc/camera_tilt
: Tilts the camera. -
/bluerov2/rc/lights
: Controls the lights. -
/bluerov2/arm
: Arms or disarms the robot for operation.
These topics are published by the ROS2 system to provide feedback:
-
/bluerov2/battery
: Battery status monitoring. -
/bluerov2/arm_status
: Reports if the robot is armed/disarmed. -
/bluerov2/attitude
: Provides current attitude (orientation) data. -
/bluerov2/bar30
: Barometer data for depth measurement.
The controller node is a critical component in this system. It must be running at all times to provide all necessary topics and facilitate communication between the ROS2 computer and the Raspberry Pi. Without this node, the entire communication between the controllers, sensors, and actuators would be unavailable, halting the operation of the BlueRov2.
The webcam attached to the Raspberry Pi sends a live video stream via UDP (port 5600) to the ROS2 computer, where it is processed by the video node.
The sonar is connected to the Raspberry Pi via USB and streams its data to the computer through the Virtualhere software. The sonar data is processed using the Tritech Micron package to provide underwater telemetry for navigation and mapping.