-
Notifications
You must be signed in to change notification settings - Fork 103
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: GPS Simulator #45
base: master
Are you sure you want to change the base?
Conversation
@rikba @alexmillane @clanegge @tkazik If you have bags that have recordings of the different type of fixes and are stationary (i.e. somewhat known position): Please let me know - then we can use them to tune the noise characteristics. Thanks! |
@michaelpantic Quite few of the bags from the arche dataset have bags where we switch between fix/float (and sometimes even normal gps). They should be at the lab on a ssd otherwise @alexmillane has them. They could be quite useful for this! |
Update: We went out and collected data for tuning. RTK has a bit of white noise and some pink noise, whereas under SPP there's a load of brown noise and about same amount of white noise as in RTK. Color code is time - actually color doesn't matter, more the distributions of colors. Results SPPPower noise distributionXY ENU Plot Real DataXY ENU Plot Simulated DataResults RTKPower noise distributionXY ENU Plot Real DataXY ENU Plot Simulated DataNext step: Cleanup and push, and invent some tuning in-between for float, which can be anything. |
gps_sim/scripts/GpsNoiser.py
Outdated
for i in range(0, 3): | ||
self._sample_buffer[:, i] = cn.powerlaw_psd_gaussian(self._epsilons[0], n) # white | ||
self._sample_buffer[:, i + 3] = cn.powerlaw_psd_gaussian(self._epsilons[1], n) # pink | ||
self._sample_buffer[:, i + 6] = cn.powerlaw_psd_gaussian(self._epsilons[2], n, 0.001) # brown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this last number here? Might be worth naming this constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or use the argument name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
gps_sim/scripts/GpsSimulator.py
Outdated
|
||
output_mag = self.get_mag(input_pose[0:3, 0:3]) | ||
|
||
# weird pythonic flex that these variables are found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol yeah...
gps_sim/scripts/gps_sim_node.py
Outdated
self.gps_sim = GpsSimulator() | ||
rospy.Subscriber("/HeadHelmety/vrpn_client/estimated_odometry", Odometry, self.odom_callback) | ||
|
||
def odom_callback(self, data): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we throttle the rate anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep now it does
@michaelpantic Thanks for this bro. I'll give it a test this afternoon. |
@alexmillane thanks for the quick review! I'll fix the comments, add throttling and a service call to change modes in the next hour or so. |
@alexmillane should be ready-ish now for use. subscribes to:
outputs:
to configure:
Things to watch out for:
|
@alexmillane added a transformstamped output, in case we want to use the transformstamped input of rovio to reproduce old behaviour |
I recently came across this very impressive thesis. Especially chapter 3.5 GPS Observable Errors has plenty if interesting stuff (but might very well be an overkill). Also from that thesis, a lovely overview on colored noise: |
wow thanks for that link. Tons of information and nice noise overview :-) One thing I also wondered about: Given that there's is power-law noise and not gaussian per se, how do you put that into a proper filter? (if one were to build one). |
To keep track of this:
Added python dependencies so far:
colorednoise
geomag
Even if its badly tuned, this type of noise generation gives a much more diverse and realistic noise than just adding gaussian noise - which should make tuning our GPS solution more feasible in vicon.
Example of the different noises:
all X-Y plots seen from above, time is encoded by color. Plot shows deviation against true position (0/0/0).
Here its simulated over 1000 samples (100secs) and the noises are rather large. Maybe we need to make the epsilon for brown noise even smaller, to make it slower.
Brown mimics the slower components (constellation/bias/ionospheric dependent noises)
White noise is simply additive gaussian noise (mimics all the fast, non-time correlated noise):
Pink is somwhere in between.
Combined effect (some example tuning):