1 #include <flatland_plugins/update_timer.h> 2 #include <flatland_server/model_plugin.h> 3 #include <flatland_server/timekeeper.h> 4 #include <flatland_server/types.h> 6 #include <sensor_msgs/NavSatFix.h> 7 #include <tf/transform_broadcaster.h> 10 #ifndef FLATLAND_PLUGINS_GPS_H 11 #define FLATLAND_PLUGINS_GPS_H 54 void OnInitialize(
const YAML::Node &config)
override;
60 void BeforePhysicsStep(
const Timekeeper &timekeeper)
override;
66 void ParseParameters(
const YAML::Node &config);
72 void ComputeReferenceEcef();
82 #endif // FLATLAND_PLUGINS_GPS_H std::string frame_id_
GPS frame ID.
Definition: gps.h:23
std::string topic_
topic name to publish the GPS fix
Definition: gps.h:22
double ref_lat_rad_
Definition: gps.h:26
Definition: dummy_model_plugin.h:59
Pose origin_
GPS sensor frame w.r.t the body.
Definition: gps.h:25
UpdateTimer update_timer_
for controlling update rate
Definition: gps.h:46
tf::TransformBroadcaster tf_broadcaster_
broadcast GPS frame
Definition: gps.h:43
Body * body_
body the simulated GPS antenna attaches to
Definition: gps.h:24
Eigen::Matrix3f m_body_to_gps_
tf from body to GPS
Definition: gps.h:48
static double WGS84_E2
Square of Earth's first eccentricity.
Definition: gps.h:40
sensor_msgs::NavSatFix gps_fix_
message for publishing output
Definition: gps.h:45
geometry_msgs::TransformStamped gps_tf_
tf from body to GPS frame
Definition: gps.h:44
static double WGS84_A
Earth's major axis length.
Definition: gps.h:39
ros::Publisher fix_publisher_
GPS fix topic publisher.
Definition: gps.h:42
Definition: timekeeper.h:55
Definition: model_plugin.h:64
Definition: update_timer.h:55
bool broadcast_tf_
whether to broadcast laser origin w.r.t body
Definition: gps.h:37