Skip to content

Conversation

confusedlama
Copy link
Contributor

Summary

Adds a simple dynamically configurable vision package that detects obstacles for the obstacle avoidance technical challenge.

Proposed changes

-New Package "bitbots_misc/bitbots_technical_challenge_vision"
-Detect red and blue obstacles by isolating color, getting contours and finding the bounding rectangle for each contour
-Dynamically adjust color ranges and min size of bounding box in rqt
-Dynamically toggle debug mode in rqt
-Publish annotations as RobotArray messages

Questions

-Are the team numbers relevant?
-Should RobotArray messages be published in "ROS_robot_msg_topic" instead?

@confusedlama confusedlama requested review from Flova and jaagut May 20, 2024 23:12
@confusedlama confusedlama self-assigned this May 20, 2024
@confusedlama
Copy link
Contributor Author

Should RobotArray messages be published in "ROS_robot_msg_topic" instead of a new topic? @Flova

@Flova
Copy link
Member

Flova commented May 29, 2024

Use the same topic as the vision. Then you don't need to change anything downstream. The name you wrote is the name of a parameter where the topic is located (I don't like this pattern, but it is present in the vision). Just use the parameter value from the config. Should be something like /robots_in_image>

@Flova
Copy link
Member

Flova commented May 29, 2024

I read the rules and the behavior should be pretty straightforward too. It just needs to initialize the localization at the correct point (not strictly needed, as we are starting at the sidelines, but we can reduce the initial localization time by telling the robot where it is), after that it needs to send a goal pose at the other side of the field (clearing the side line). All of that should start when we press a button. I would not use the DSD for that as it can be realized in a very simple script.

The robot should not leave the area of the field where the challenge takes place. One hack to achieve this without modifying the path planning would be to publish a large number of robots around the field in an fixed interval. This should result in the robot not leaving the area. The clean way would be to draw it properly onto the nav map in the path planning.

@confusedlama confusedlama requested a review from Flova May 30, 2024 10:43
@confusedlama
Copy link
Contributor Author

I think we should make a separate issue for the behaviour and merge this branch if you consider the vision to be complete.

# draw bb on debug img
annotate(x, y, h, w, (255, 0, 0))

# TODO I think 1 is for the blue team?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can/should use the constant in the message for that.

@Flova
Copy link
Member

Flova commented May 30, 2024

Maybe we could rename it to "bitbots_obstacle_challange_vision"

@Flova Flova self-requested a review May 30, 2024 10:55
Copy link
Member

@Flova Flova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm

@val-ba val-ba self-requested a review June 13, 2024 12:47
default_value: 0,
description: "minimum size of an obstacle to be considered",
validation: {
gt_eq<>: 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might need to be gt_eq<>: [0]

from soccer_vision_2d_msgs.msg import Robot, RobotArray

from bitbots_technical_challenge_vision.bitbots_technical_challenge_vision_params import (
bitbots_technical_challenge_vision,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not suuuper important, but I think it is a bit confusing that you named your parameters bitbots_technical_challenge_vision, which is the same as the python file and the package name. But because this is for a technical challenge, it is okay.

blue_robots = []
red_robots = []

if arg.debug_mode:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use arg instead of self._params? You do everything in the callback, so the parameters do not get overwritten during the image handling.

@Flova Flova merged commit 9606916 into main Jul 7, 2024
@Flova Flova deleted the feature/technical_challenge_vision branch July 7, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants