Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
made sure to use UWB instead of ideal position data
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius-Juston committed Aug 2, 2023
1 parent ed912b6 commit 5517f23
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/node_sage-husa.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
init = 1
count = 0


UWB_USE_TRILATERATION = True

def imu_callback(data):

if init == 0:
Expand Down Expand Up @@ -77,7 +80,7 @@ def imu_callback(data):


def uwb_callback(data):
if init == 2:
if UWB_USE_TRILATERATION or init == 2:
i = data.anchorId
r = data.range*0.001
filter.range[i] = r
Expand Down Expand Up @@ -139,7 +142,7 @@ def model_callback(data):
filter.velOld[2] = data.twist[5].linear.z + np.random.normal(0.0, 0.1) + uwb_noise[2]*5 + pos_outlier[2]*5
error = np.linalg.norm(pos_true - filter.x_[:3,0])
pub_error.publish(error)
if filter.mode != 3:
if filter.mode != 3 and not UWB_USE_TRILATERATION:
filter.correction()
count = 0

Expand Down

0 comments on commit 5517f23

Please sign in to comment.