- offset
A **double** specifying the offset parameter of the mimic joint. Defaults to 0.0.
+
+ - maxEffort
+
+ A **double** specifying the max effort the mimic joint can generate. Defaults to 1.0.
+
- sensitiveness
A **double** specifying the sensitiveness of the mimic joint. Defaults to 0.0. It basically is the threshold of the difference between the 2 angles (joint's and mimic's) before applying the "mimicness".
private:
// Parameters
string joint_name_, mimic_joint_name_;
- double multiplier_, offset_, sensitiveness_;
+ double multiplier_, offset_, sensitiveness_, max_effort_;
bool kill_sim;
if (_sdf->HasElement("sensitiveness"))
sensitiveness_ = _sdf->GetElement("sensitiveness")->Get<double>();
+ // Check for max effort
+ max_effort_ = 1.0;
+ if (_sdf->HasElement("maxEffort"))
+ max_effort_ = _sdf->GetElement("maxEffort")->Get<double>();
+
// Get pointers to joints
joint_ = model_->GetJoint(joint_name_);
if(!joint_)
ROS_ERROR("No (mimic) joint named %s. MimicJointPlugin could not be loaded.", mimic_joint_name_.c_str());
return;
}
+
+ // Set max effort
+ mimic_joint_->SetMaxForce(0,max_effort_);
// Listen to the update event. This event is broadcast every
// simulation iteration.