26 #include "gazebo/gazebo.hh" 27 #include "gazebo/physics/physics.hh" 28 #include "gazebo/common/common.hh" 29 #include "gazebo/transport/transport.hh" 30 #include <boost/bind.hpp> 38 static const std::string
L_SUS_JNT =
"left_diff_unit_joint";
39 static const std::string
R_SUS_JNT =
"right_diff_unit_joint";
51 ros::init(argc, argv,
"warthog_suspension_plugin");
62 void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf)
68 sus_kf_ = _sdf->Get<
double>(
"suspension_k");
69 sus_bf_ = _sdf->Get<
double>(
"suspension_b");
73 suspension_jnts_[
"right"] =
model_->GetJoint(R_SUS_JNT);
void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf)
std::map< std::string, physics::JointPtr > suspension_jnts_
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
static const std::string R_SUS_JNT
void OnUpdate(const common::UpdateInfo &_info)
event::ConnectionPtr updateConnection_
WarthogSuspensionPlugin()
void applySuspension(double kf, double bf)
ros::Time last_update_time_
GZ_REGISTER_MODEL_PLUGIN(GazeboRosP3D)
static const std::string L_SUS_JNT