-
Notifications
You must be signed in to change notification settings - Fork 268
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
GPS sensor in Gazebo #519
GPS sensor in Gazebo #519
Conversation
Signed-off-by: Dre Westcook <[email protected]>
Signed-off-by: Dre Westcook <[email protected]>
Signed-off-by: Dre Westcook <[email protected]>
</y> | ||
<z> |
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.
</y> | |
<z> | |
</y> | |
<z> |
@@ -0,0 +1,46 @@ | |||
/* | |||
* Copyright (C) 2019 Open Source Robotics Foundation |
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.
* Copyright (C) 2019 Open Source Robotics Foundation | |
* Copyright (C) 2020 Open Source Robotics Foundation |
_in.GpsSensor()->PositionNoise()); | ||
|
||
} |
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.
_in.GpsSensor()->PositionNoise()); | |
} | |
_in.GpsSensor()->PositionNoise()); | |
} |
@@ -0,0 +1,239 @@ | |||
/* | |||
* Copyright (C) 2019 Open Source Robotics Foundation |
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.
* Copyright (C) 2019 Open Source Robotics Foundation | |
* Copyright (C) 2020 Open Source Robotics Foundation |
} | ||
|
||
|
||
// set sensor parent | ||
std::string parentName = _ecm.Component<components::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.
} | |
// set sensor parent | |
std::string parentName = _ecm.Component<components::Name>( | |
} | |
// set sensor parent | |
std::string parentName = _ecm.Component<components::Name>( |
@@ -0,0 +1,66 @@ | |||
/* | |||
* Copyright (C) 2019 Open Source Robotics Foundation |
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.
* Copyright (C) 2019 Open Source Robotics Foundation | |
* Copyright (C) 2020 Open Source Robotics Foundation |
EntityComponentManager &_ecm) final; | ||
|
||
|
||
/// Documentation inherited |
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.
EntityComponentManager &_ecm) final; | |
/// Documentation inherited | |
EntityComponentManager &_ecm) final; | |
/// Documentation inherited |
@@ -0,0 +1,209 @@ | |||
/* | |||
* Copyright (C) 2019 Open Source Robotics Foundation |
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.
* Copyright (C) 2019 Open Source Robotics Foundation | |
* Copyright (C) 2020 Open Source Robotics Foundation |
// velocity should be negative in z | ||
//EXPECT_GT(velocities.front().Z(), velocities.back().Z()); | ||
//EXPECT_LT(velocities.back().Z(), 0.0); | ||
|
||
// check gps sensor data | ||
|
||
/* | ||
// vertical position = world position - intial position | ||
// so since gps is falling, vertical position should be negative | ||
EXPECT_GT(firstMsg.vertical_position(), | ||
lastMsg.vertical_position()); | ||
EXPECT_LT(lastMsg.vertical_position(), 0.0); | ||
// vertical velocity should be negative | ||
EXPECT_GT(firstMsg.vertical_velocity(), | ||
lastMsg.vertical_velocity()); | ||
EXPECT_LT(lastMsg.vertical_velocity(), 0.0); | ||
*/ |
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.
Remove these lines
Related issue:
gazebosim/gz-sensors#23
My pull requests: (This PR would depend on the following: )
gazebosim/gz-sensors#72
(which then depends on)
gazebosim/sdformat#453
Use the ign-sensor::Gps in the gazebo sim by creating a Gps-system
This was by far the hardest one to get going, not least due to the "binary/source" issue as mentioned by gazebosim/gz-tools#8
As mentioned on the sdformat issue, I've only made two simple noise systems that get applied unilaterally to each of the components.. If this doesn't suite I could change it.
I'm also really hoping that the use of
sphericalCoords.PositionTransform()
was correct because I wasn't quite sure on how it's meant to be used; or what a better way to use it ( ie: should the GPS store it's data in a SphericalCoords Type? )Some notes: