BUZZ-Blimps / CatchingBlimp

4 stars 3 forks source link

Integrate control with vision #47

Open buzzblimps opened 2 months ago

buzzblimps commented 2 months ago

Trying to catching a game ball using current blimp

buzzblimps commented 2 months ago

Next step: Setup rknn environment on opi1 super user, or get access to GPIO pins while being non super user #32

buzzblimps commented 2 months ago

the ros node script is in /home/opi/ros2_yolov5_rknn/yolov5_process/ros_node/yolo_node.py'. Just run python3 yolo_node.py and subscribe the /object_detection node

buzzblimps commented 2 months ago

Set up rknn environment in super user. Now it can directly subscribe ros msg from topic object_detection.

buzzblimps commented 2 months ago

control code is able to successfully see vision code, motor values randomly jump occasionally but this may be from controller code, need to investigate further

buzzblimps commented 1 month ago

appears that in control code when searching for gameballs nothing is stopping it from thinking a goal is a gamball. Apparently no distinction between different types of detected objects i.e. person, gameball, blimp, goal, since all detected objects get saved into the same array.

can @J4mZzy verify this?

buzzblimps commented 1 month ago

We got the autonomy linked to control code on the test bench, as we moved the game ball we saw the servos move. The brushless motors are still very jittery at certain angles/thrusts. There are signs of life for the autonomy but the motors response are also very jittery, will be able to further debug later with more people

buzzblimps commented 1 month ago

Vision code works as expected, controls code seems to track for forward and down but does random stuff for anything else. We get consistent results from the test bench with both Rao's code and Sahaj's code

buzzblimps commented 1 month ago

To run Rao's vision code, just cd ros2_yolov5_rknn/ros_node and then run python3 yolo_node.py.

buzzblimps commented 1 month ago

manual cotrol forward and backward are swapped, jitter on brushless motors, connected to pins 8 and 16 that we observed caused jitter before. May be a latching issue

buzzblimps commented 1 month ago

Camera is not detected on OPI3

J4mZzy commented 1 month ago

Have you checked the udev rules?

buzzblimps commented 3 weeks ago

After adding threshold difference before changing brushless motor thrust, left motor sees improvement, but right motor is the same.

buzzblimps commented 3 weeks ago

Fixed Brushless jitter issues. Issue had to do with two things:

  1. Initializing yaw servo motor (which doesnt exist on this blimp, not sure whether the pin we use in software is actually connected to on the PCB, but technically shouldn't have affected the brushless motors ) in the gimbal classes caused the brushless motors to full throttle unttil a new command was written, but persumably perpetually 'messed up' the signals being sent to the brushless motors. This fixed the issues with the left motor, but the right motor still wasn't functioning.

  2. The tripleBallGrabberClass was initialized with the wrong pins so that it created a servo instance for a pin but the pin was actually the right brushless motor. The angle command was only written once in intialization, but seemed to also perpetually 'mess up' the right brushless motor

buzzblimps commented 3 weeks ago

Fixed yaw control direction. Yaw is very sensitive to change, when running vision code, can see extreme oscillatory behavior.