Apartment Navigation By Classic Wheeled Robot
Comprehensive Production Grade Repository For Apartment Navigation Project (Inspired By Udacity Course)
 
Loading...
Searching...
No Matches
robot_control::ball_chaser Namespace Reference

Ball detection and chasing logic. More...

Classes

class  DriveBot
 ROS 2 service node that relays velocity commands to the robot. More...
 
struct  ImageDimensions
 Image dimensions and stride information. More...
 
class  ProcessImage
 ROS 2 client node that processes camera images to detect and chase a white ball. More...
 
struct  RgbThreshold
 RGB color threshold values for ball detection. More...
 

Enumerations

enum class  BallRegion : std::uint8_t { Left , Center , Right , NotFound }
 Detected ball region in the image.
 

Functions

BallRegion findBallRegion (const uint8_t *data, ImageDimensions dims, RgbThreshold threshold)
 Detects the ball region within an image based on RGB thresholds.
 

Detailed Description

Ball detection and chasing logic.

Function Documentation

◆ findBallRegion()

BallRegion robot_control::ball_chaser::findBallRegion ( const uint8_t * data,
ImageDimensions dims,
RgbThreshold threshold )

Detects the ball region within an image based on RGB thresholds.

Parameters
dataPointer to raw image data (RGB format).
dimsImage dimensions and stride.
thresholdRGB color threshold for ball detection.
Returns
BallRegion indicating where the ball was detected, or NotFound if not detected.