17 #ifndef GAZEBO_PLUGINS_TRACKEDVEHICLEPLUGIN_HH_ 18 #define GAZEBO_PLUGINS_TRACKEDVEHICLEPLUGIN_HH_ 21 #include <unordered_map> 23 #include <boost/algorithm/string.hpp> 24 #include <boost/optional.hpp> 30 #include "gazebo/physics/physics.hh" 32 #include "gazebo/msgs/pose.pb.h" 33 #include "gazebo/msgs/twist.pb.h" 56 class TrackedVehiclePluginPrivate;
93 public:
void Init()
override;
96 public:
void Reset()
override;
99 protected:
virtual std::string GetRobotNamespace();
102 protected:
virtual double GetSteeringEfficiency();
106 protected:
virtual void SetSteeringEfficiency(
double _steeringEfficiency);
109 protected:
virtual boost::optional<double> GetTrackMu();
113 protected:
virtual void SetTrackMu(
double _mu);
116 protected:
virtual boost::optional<double> GetTrackMu2();
120 protected:
virtual void SetTrackMu2(
double _mu2);
124 protected:
virtual void UpdateTrackSurface() = 0;
133 protected:
virtual double GetTracksSeparation();
136 protected: std::unordered_map<Tracks, std::string>
trackNames;
146 protected:
virtual void SetTrackVelocityImpl(
double _left,
155 protected:
virtual void SetTrackVelocity(
double _left,
double _right);
162 protected:
void SetBodyVelocity(
163 double _linear,
double _angular);
179 protected:
void OnVelMsg(ConstTwistPtr &_msg);
185 private: std::unique_ptr<TrackedVehiclePluginPrivate> dataPtr;
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:110
Forward declarations for the common classes.
Definition: Animation.hh:26
std::mutex mutex
Mutex to protect updates.
Definition: TrackedVehiclePlugin.hh:182
Forward declarations for transport.
std::unordered_map< Tracks, std::string > trackNames
Textual lowercase names of the tracks.
Definition: TrackedVehiclePlugin.hh:136
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:328
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:94
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
An abstract gazebo model plugin for tracked vehicles.
Definition: TrackedVehiclePlugin.hh:79
Tracks
Enum for distinguishing between left and right tracks.
Definition: TrackedVehiclePlugin.hh:40
A plugin with access to physics::Model.
Definition: Plugin.hh:303