Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Improved multilateration script #149

Closed
wants to merge 1 commit into from
Closed

[WIP] Improved multilateration script #149

wants to merge 1 commit into from

Conversation

jaxnb
Copy link
Contributor

@jaxnb jaxnb commented Oct 29, 2018

closes #148

Improved multilateration script

Needs testing on boat

@ghost ghost assigned jaxnb Oct 29, 2018
@ghost ghost added the review label Oct 29, 2018
@@ -57,50 +66,61 @@ class MultilaterationNode(object):
except tf2_ros.TransformException, e:
rospy.logwarn('TF Exception: {}'.format(e))
return
if self.last_pos is not None and np.linalg.norm(self.last_pos - origin) < 0.2:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 0.2 magic number should be a ROS param

if req.data is not self.enabled:
self.vec_samples.clear()
#if req.data is not self.enabled:
# self.vec_samples.clear()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove dead code

self.heading_sub = rospy.Subscriber('/hydrophones/direction',
Vector3Stamped, self.heading_cb, queue_size=10)
self.position_pub = rospy.Publisher('/hydrophones/position',
PointStamped, queue_size=1)
self.enable_srv = rospy.Service('~enable', SetBool,
self.enable_cb)
self.reset_srv = rospy.Service('~reset', Trigger,
self.reset_cb)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The txros interface should be changed to provide a function to call reset. I believe this was added at lakeday but not committed

Ap_sum += Ap

return np.linalg.inv(A_sum).dot(Ap_sum)
def ls_line_intersection2d(self, lines_array):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to point out that what you're doing here (average of intersections of all possible pairs) yields a mathematically suboptimal estimate of the position of the source. Throwing out observations that are too close is sensible but swapping out least squares intersection for this average is not. Consider using this as a preprocessing step to filter the array of lines.

@jaxnb
Copy link
Contributor Author

jaxnb commented Nov 28, 2018

Messed up my git stuff, see #164

@jaxnb jaxnb closed this Nov 28, 2018
@ghost ghost removed the review label Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PASSIVE SONAR: improve multilateration algorithm
3 participants