Skip to content

Commit

Permalink
Warmstarting MPC and added actag detection code
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshv24 committed Aug 23, 2024
1 parent ffdf993 commit 6ba9dfa
Show file tree
Hide file tree
Showing 7 changed files with 968 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ log
*.pyc
*.bag
.DS_Store
*.mat
.venv
*.stl
*.dae
*.m
33 changes: 33 additions & 0 deletions docking_control/data/topics.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/BlueROV2/video
/docking_control/marker_detection
/docking_control/mpc
/docking_control/mpc_pwm
/docking_control/mpc_wrench
/docking_control/pwm
/docking_control/rov_odom
/docking_control/vision_pose/pose
/joy
/mavros/altitude
/mavros/battery
/mavros/imu/data
/mavros/imu/data_raw
/mavros/imu/diff_pressure
/mavros/imu/mag
/mavros/imu/static_pressure
/mavros/imu/temperature_baro
/mavros/imu/temperature_imu
/oculus/draw_sonar/parameter_descriptions
/oculus/draw_sonar/parameter_updates
/oculus/drawn_sonar
/oculus/drawn_sonar_osd
/oculus/drawn_sonar_rect
/oculus/nodelet_manager/bond
/oculus/oculus_metadata
/oculus/oculus_simple_ping_result
/oculus/oculus_sonar_driver/parameter_descriptions
/oculus/oculus_sonar_driver/parameter_updates
/oculus/raw_data
/oculus/sonar_image
/oculus/sonar_image_proc_timing
/tf
/tf_static
31 changes: 31 additions & 0 deletions docking_control/src/actag_code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env python3.12

from actag import AcTag
# import rospy


class AcTagDetection:
def __init__(self):
# Initialize the AcTag Detector
self.detector = AcTag(
min_range=0.1,
max_range=1.5,
horizontal_aperture=1.0472,
tag_family="AcTag24h10",
tag_size=0.130628571428644,
quads_use_same_random_vals=True,
)

def detect_tags(self, sonar_image):
# Detect AcTags in the sonar image
detected_tags = self.detector.detect_tags(sonar_image)
return detected_tags


# if __name__ == "__main__":
# rospy.init_node("actag_detection", anonymous=True)
# obj = AcTagDetection()
# try:
# rospy.spin()
# except KeyboardInterrupt:
# print("shutting down the node")
Loading

0 comments on commit 6ba9dfa

Please sign in to comment.