# Revision history [back]

### Model floating when JointController PID parameters set too high

I have an armature set up in Gazebo. I'm using velocity control on hydraulic pistons to control this arm. I have the following code in my plugin for this arm:

class ModelPush: public gazebo::ModelPlugin
{
public:
void Load(gazebo::physics::ModelPtr parent, sdf::ElementPtr /* _sdf */) override
{
_model = parent;
_joint_controller = _model->GetJointController();
_update_connection = gazebo::event::Events::ConnectWorldUpdateBegin(std::bind(&ModelPush::OnUpdate, this));
for(size_t i = 0; i < 4; i++)
{
auto joint_name = std::string("rockbreaker::")+joints[i];
gazebo::common::PID p;
p.SetPGain(100000);
p.SetIGain(1000);
p.SetIMin(-100000);
p.SetIMax(100000);
//p.SetPGain(joint_p[i]);
//p.SetIGain(joint_i[i]);
//p.SetDGain(joint_d[i]);
_joint_controller->SetVelocityPID(joint_name, p);
}
}


When the proportional gain for the arm is set lower, the arm does not have enough power to lift itself off of the ground. However, when the PID constants are increased, the arm spawns in the world and does not respond to the physics engine at all. I get no debug messages in the console regarding this.

Any idea what's going on?

### Model floating when JointController PID parameters set too high

I have an armature set up in Gazebo. I'm using velocity control on hydraulic pistons to control this arm. I have the following code in my plugin for this arm:

class ModelPush: public gazebo::ModelPlugin
{
public:
void Load(gazebo::physics::ModelPtr parent, sdf::ElementPtr /* _sdf */) override
{
_model = parent;
_joint_controller = _model->GetJointController();
_update_connection = gazebo::event::Events::ConnectWorldUpdateBegin(std::bind(&ModelPush::OnUpdate, this));
for(size_t i = 0; i < 4; i++)
{
auto joint_name = std::string("rockbreaker::")+joints[i];
gazebo::common::PID p;
p.SetPGain(100000);
p.SetIGain(1000);
p.SetIMin(-100000);
p.SetIMax(100000);
//p.SetPGain(joint_p[i]);
//p.SetIGain(joint_i[i]);
//p.SetDGain(joint_d[i]);
_joint_controller->SetVelocityPID(joint_name, p);
}
}
...
};


When the proportional gain for the arm is set lower, the arm does not have enough power to lift itself off of the ground. However, when the PID constants are increased, the arm spawns in the world and does not respond to the physics engine at all. I get no debug messages in the console regarding this.

Any idea what's going on? on?