Skip to content

Robot detection #1

@masteroftime

Description

@masteroftime

It is necesarry to be able to detect the position of the other robots. For this we need 3 methods which have to be implemented: detectRobot and detectRobots and mergeObjects in the Camera class.

public static Rectangle[] mergeObjects(Rectangle[] objs)
the object detection of NXTCam looks quite noisy. This method should filter the given objects and merge them in a way that every object is represented as a single Rectangle. This method can be used by the detectRobot method so that every returned rectangle can be seen as one sticker on the robot.

public Robot detectRobot(int colormap)
this method should calculate the position (and heading if possible) of another robot with the specified colormap.

public Robot[] detectRobots()
this method should use the previous method to list all detected Robots

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions