awpollon / cs685_locobot_blocks

0 stars 0 forks source link

Confirm and correct calc_bearing_range_from_tag #5

Open awpollon opened 1 year ago

awpollon commented 1 year ago

Current calculation in calc_bearing_range_from_tag sums the squares to project, however we think this should actually be a subtraction from the hypotenuse. (Sashank pointed this out)

In practice the summation was closer to correct, so something else might be off.

Proposed formula: dist_to_camera_center = math.sqrt(tag.z**2 - tag.x**2 - tag.y**2) * np.cos(camera_tilt)