Go to the documentation of this file.
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();
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].
Tracks
Enum for distinguishing between left and right tracks.
Definition: TrackedVehiclePlugin.hh:40
void Init() override
Initialize the plugin.
std::unordered_map< Tracks, WheelInfo_V > wheels
The wheels on the LEFT/RIGHT track.
Definition: WheelTrackedVehiclePlugin.hh:105
Forward declarations for the common classes.
Definition: Animation.hh:26
std::mutex mutex
Mutex to protect updates.
Definition: WheelTrackedVehiclePlugin.hh:117
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
An abstract gazebo model plugin for tracked vehicles.
Definition: TrackedVehiclePlugin.hh:79
virtual ~WheelTrackedVehiclePlugin()=default
void UpdateTrackSurface() override
Update surface parameters of the tracks to correspond to the values set in this plugin.
std::shared_ptr< WheelInfo > WheelInfoPtr
Definition: WheelTrackedVehiclePlugin.hh:101
WheelTrackedVehiclePlugin()=default
void Reset() override
Reset the plugin.
physics::JointPtr joint
The hinge joint connecting the wheel to the track/body.
Definition: WheelTrackedVehiclePlugin.hh:91
An approximate model of non-deformable tracks emulated by wheels.
Definition: WheelTrackedVehiclePlugin.hh:49
double radius
Radius of the wheel (used to convert linear to angular speed).
Definition: WheelTrackedVehiclePlugin.hh:98
void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf) override
Called when the plugin is loaded.
std::vector< WheelInfoPtr > WheelInfo_V
Definition: WheelTrackedVehiclePlugin.hh:102
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
Holds information about each wheel.
Definition: WheelTrackedVehiclePlugin.hh:88
std::string jointName
Name of the hinge joint.
Definition: WheelTrackedVehiclePlugin.hh:94
std::unordered_map< Tracks, double > trackVelocity
Desired velocities of the tracks.
Definition: WheelTrackedVehiclePlugin.hh:108
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:117
double defaultWheelRadius
The radius (in meters) used for wheels where autodetection fails.
Definition: WheelTrackedVehiclePlugin.hh:111
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:89
physics::WorldPtr world
Pointer to the world the model lives in.
Definition: WheelTrackedVehiclePlugin.hh:114
void SetTrackVelocityImpl(double _left, double _right) override
Set new target velocity for the tracks.