18 #ifndef GAZEBO_WHEELTRACKEDVEHICLEPLUGIN_HH 19 #define GAZEBO_WHEELTRACKEDVEHICLEPLUGIN_HH 24 #include <unordered_map> 62 public:
void Init()
override;
65 public:
void Reset()
override;
84 const std::string &_jointName);
105 protected: std::unordered_map<Tracks, WheelInfo_V>
wheels;
121 private:
void OnUpdate();
std::unordered_map< Tracks, WheelInfo_V > wheels
The wheels on the LEFT/RIGHT track.
Definition: WheelTrackedVehiclePlugin.hh:105
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:90
void Init() override
Initialize the plugin.
double radius
Radius of the wheel (used to convert linear to angular speed).
Definition: WheelTrackedVehiclePlugin.hh:98
Forward declarations for the common classes.
Definition: Animation.hh:26
std::mutex mutex
Mutex to protect updates.
Definition: WheelTrackedVehiclePlugin.hh:117
virtual ~WheelTrackedVehiclePlugin()=default
std::string jointName
Name of the hinge joint.
Definition: WheelTrackedVehiclePlugin.hh:94
Holds information about each wheel.
Definition: WheelTrackedVehiclePlugin.hh:88
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:118
std::shared_ptr< WheelInfo > WheelInfoPtr
Definition: WheelTrackedVehiclePlugin.hh:101
void UpdateTrackSurface() override
Update surface parameters of the tracks to correspond to the values set in this plugin.
WheelTrackedVehiclePlugin()=default
std::vector< WheelInfoPtr > WheelInfo_V
Definition: WheelTrackedVehiclePlugin.hh:102
void Reset() override
Reset the plugin.
void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf) override
Called when the plugin is loaded.
An approximate model of non-deformable tracks emulated by wheels.
Definition: WheelTrackedVehiclePlugin.hh:49
std::unordered_map< Tracks, double > trackVelocity
Desired velocities of the tracks.
Definition: WheelTrackedVehiclePlugin.hh:108
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
double defaultWheelRadius
The radius (in meters) used for wheels where autodetection fails.
Definition: WheelTrackedVehiclePlugin.hh:111
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:94
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
physics::JointPtr joint
The hinge joint connecting the wheel to the track/body.
Definition: WheelTrackedVehiclePlugin.hh:91
physics::WorldPtr world
Pointer to the world the model lives in.
Definition: WheelTrackedVehiclePlugin.hh:114
void LoadWheel(physics::ModelPtr &_model, Tracks &_track, const std::string &_jointName)
Load a wheel connected to joint named jointName and append it to this->wheels[track].
void SetTrackVelocityImpl(double _left, double _right) override
Set new target velocity for the tracks.