18 #ifndef VRX_GAZEBO_STATIONKEEPING_SCORING_PLUGIN_HH_ 19 #define VRX_GAZEBO_STATIONKEEPING_SCORING_PLUGIN_HH_ 21 #include <geographic_msgs/GeoPoseStamped.h> 25 #include <gazebo/common/Events.hh> 26 #include <gazebo/common/Timer.hh> 27 #include <gazebo/physics/World.hh> 60 public:
void Load(gazebo::physics::WorldPtr _world,
61 sdf::ElementPtr _sdf);
67 private:
void OnReady()
override;
79 private: std::string
goalTopic =
"/vrx/station_keeping/goal";
88 private: std::unique_ptr<ros::NodeHandle>
rosNode;
127 private: gazebo::common::Timer
timer;
void OnReady() override
Callback executed when the task state transition into "ready".
std::string poseErrorTopic
Topic where 2D pose error is published.
A plugin for computing the score of the station keeping task. This plugin derives from the generic Sc...
WaypointMarkers waypointMarkers
Waypoint visualization markers.
double meanError
Cumulative 2D RMS error in meters.
double goalY
Goal pose in local (Gazebo) coordinates.
double poseError
Combined 2D pose error (distance and yaw).
ros::Publisher goalPub
Publisher for the goal.
void Update()
Callback executed at every world update.
double goalLon
Goal pose in spherical (WGS84) coordinates.
double goalLat
Goal pose in spherical (WGS84) coordinates.
void PublishGoal()
Publish the goal pose.
gazebo::event::ConnectionPtr updateConnection
Pointer to the update event connection.
std::string meanErrorTopic
Topic where mean pose error is published.
std::string goalTopic
Topic where the task stats are published.
double goalYaw
Goal pose in local (Gazebo) coordinates.
double totalPoseError
Sum of all pose error scores calculated so far.
void Load(gazebo::physics::WorldPtr _world, sdf::ElementPtr _sdf)
A plugin that provides common functionality to any scoring plugin. This plugin defines four different...
void OnRunning() override
Callback executed when the task state transition into "running".
This class is used to display waypoint markers. Cylindrical Gazebo markers are drawn with text on top...
StationkeepingScoringPlugin()
Constructor.
std::unique_ptr< ros::NodeHandle > rosNode
ROS node handle.
unsigned int sampleCount
Number of instant pose error scores calculated so far .
ros::Publisher meanErrorPub
Publisher for the current mean error.
gazebo::common::Timer timer
Timer used to calculate the elapsed time docked in the bay.
ros::Publisher poseErrorPub
Publisher for the combined 2D pose error.
double goalX
Goal pose in local (Gazebo) coordinates.