gps_sensor_model.cpp
Go to the documentation of this file.
1 
13 
14 GpsSensorModel::GpsSensorModel(double position_gaussian_noise,
16  : position_gaussian_noise(position_gaussian_noise),
17  position_dist_(0.0,position_gaussian_noise),
18  orientation_gaussian_noise(orientation_gaussian_noise),
19  orientation_dist_(0.0,orientation_gaussian_noise),
20  velocity_gaussian_noise(velocity_gaussian_noise),
21  twist_dist_(0.0,velocity_gaussian_noise),
22  engine_(seed_gen_())
23 {
24 
25 }
26 
28 {
29 
30 }
31 
32 geometry_msgs::Twist GpsSensorModel::addGaussianNoise(geometry_msgs::Twist twist)
33 {
34  twist.linear.x = twist.linear.x + twist_dist_(engine_);
35  twist.linear.y = twist.linear.y + twist_dist_(engine_);
36  twist.linear.z = twist.linear.z + twist_dist_(engine_);
37  twist.angular.x = twist.angular.x + twist_dist_(engine_);
38  twist.angular.y = twist.angular.y + twist_dist_(engine_);
39  twist.angular.z = twist.angular.z + twist_dist_(engine_);
40  return twist;
41 }
42 
43 geometry_msgs::Quaternion GpsSensorModel::addGaussianNoise(geometry_msgs::Quaternion orientation)
44 {
45  geometry_msgs::Vector3 vec = quaternion_operation::convertQuaternionToEulerAngle(orientation);
46  vec.z = vec.z + orientation_dist_(engine_);
48 }
49 
51 {
52  point.easting = point.easting + position_dist_(engine_);
53  point.northing = point.northing + position_dist_(engine_);
54  return point;
55 }
geometry_msgs::Quaternion convertEulerAngleToQuaternion(geometry_msgs::Vector3 euler)
Sensor model of the nmea GPS plugin.
std::normal_distribution position_dist_
normal distribution generator for position
~GpsSensorModel()
destructor of GpsSensorModel class
std::normal_distribution orientation_dist_
normal distribution generator for orientation
std::default_random_engine engine_
random generation engine
std::normal_distribution twist_dist_
normal distribution generator for twist
GpsSensorModel(double position_gaussian_noise, double orientation_gaussian_noise, double velocity_gaussian_noise)
constructer of the GpsSensorModel class
geometry_msgs::Vector3 convertQuaternionToEulerAngle(geometry_msgs::Quaternion quat)
constexpr double orientation_gaussian_noise
gaussian noise of the orientation
constexpr double velocity_gaussian_noise
gaussian noise of the velocity
geometry_msgs::Twist addGaussianNoise(geometry_msgs::Twist twist)
add gausiann noise to the twist


nmea_gps_plugin
Author(s):
autogenerated on Wed Jul 17 2019 03:53:56