-
Notifications
You must be signed in to change notification settings - Fork 89
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
Ground speed sensor #161
Merged
Merged
Ground speed sensor #161
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e1220da
Added ground speed sensor
SijmenHuizenga ebef93a
remove angular velocity from ground speed sensor
SijmenHuizenga 4e6a392
Add gss docs
SijmenHuizenga a146dca
Publish gss information relative to the vehicle frame
SijmenHuizenga c268bb6
Added ground speed sensor docs
SijmenHuizenga 7e1d816
Merge branch 'master' into ground-speed-sensor
SijmenHuizenga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#ifndef msr_airlib_GSSSimple_hpp | ||
#define msr_airlib_GSSSimple_hpp | ||
|
||
|
||
#include "sensors/SensorBase.hpp" | ||
|
||
|
||
namespace msr { namespace airlib { | ||
|
||
class GSSSimple : public SensorBase { | ||
public: | ||
// Ground Speed Sensor | ||
GSSSimple(const std::string& sensor_name = "") | ||
: SensorBase(sensor_name) | ||
{} | ||
|
||
public: | ||
struct Output { | ||
TTimePoint time_stamp; | ||
Vector3r linear_velocity; | ||
}; | ||
|
||
public: | ||
virtual void update() override | ||
{ | ||
Output output; | ||
const GroundTruth& ground_truth = getGroundTruth(); | ||
|
||
output.time_stamp = clock()->nowNanos(); | ||
output.linear_velocity = ground_truth.kinematics->twist.linear; | ||
|
||
output_ = output; | ||
} | ||
const Output& getOutput() const | ||
{ | ||
return output_; | ||
} | ||
|
||
virtual ~GSSSimple() = default; | ||
|
||
virtual void resetImplementation() override { | ||
|
||
} | ||
|
||
private: | ||
Output output_; | ||
}; | ||
|
||
|
||
}} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
how does this work? Can you give an example of a settings.json that has an IMU and a GSS?
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.
The
new ImuSetting()
doesn't do anything with the imu settings in the json, it just creates an empty settings object.The problem is that
sensor_setting
needs to have a valid object and I don't want to create theGSSSettings
class because gss doesn't have settings. The good solution would be to change the abstraction structure to allow sensors without settings. But I don't want to do that because lotsofwork and notthatusefullreally.