RedHotChiliBots / FRC4453_2018_PROJ

PowerUp FRC4453 Projects
0 stars 0 forks source link

Write the Raspberry Pi vision code. #8

Closed connerebbinghaus closed 6 years ago

connerebbinghaus commented 6 years ago

Since we plan on using vision code this year, vision code must be written. The vision code must be able to identify and track power cubes on the field. Distance and direction to the cube must be calculated. Because of our autonomous strategy, only one cube needs to be tracked at a time.

connerebbinghaus commented 6 years ago

For distance calculations, the height of the cube in the image should be used, as the width can vary based on the orientation of the cube. This also means that the orientation of the cube can be calculated based on it's width, though that information may not be needed. The cube also has a zipper on it, which means that the cube may appear as two rectangles in the image. This must be identified and accounted for.

connerebbinghaus commented 6 years ago

Code has been written. It uses MQTT for communication with the robot. The MQTT broker will run on the Raspberry Pi, and both the Robot and Vision code will connect to it. The Vision code publishes its data on two topics: "distance" and "angle". The Robot code subscribes to these topics and receives the data. For the Vision code, libmosquitto was used for MQTT functionality. For the Robot code, mqtt-client was used.

connerebbinghaus commented 6 years ago

Written but untested. Closing for now...

connerebbinghaus commented 6 years ago

Reopening, and using tag instead.

connerebbinghaus commented 6 years ago

We are not using vision. Closing...