# Revision history [back]

### How to change min_depth parameter in model plugin

I'm trying to set different than default max_depth parameter for wheels of the robot. I managed to change the sdf code of the contact tag and when i use the Load function, the values do change in the gazebo GUI, but the robot does not behave as if anything changed. When I position the wheels 1 cm below the ground , the wheels are pushed above the ground regardless.

sdf::ElementPtr surface_sdf = this->link_ptr->GetCollision(_index)->GetSDF()->GetElement("surface");
min_depth_sdf->Set(0.02);
max_vel_sdf->Set(0.0);


### How to change min_depth parameter in model plugin

I'm trying to set different than default max_depth parameter for wheels of the robot. I managed to change the sdf code of the contact tag and when i use the Load function, the values do change in the gazebo GUI, but the robot does not behave as if anything changed. When I position the wheels 1 cm below the ground , the wheels are pushed above the ground regardless.

sdf::ElementPtr surface_sdf = this->link_ptr->GetCollision(_index)->GetSDF()->GetElement("surface");
min_depth_sdf->Set(0.02);
max_vel_sdf->Set(0.0);


### How to change min_depth parameter in model plugin

I'm trying to set different than default max_depth parameter for wheels of the robot. I managed to change the sdf code of the contact tag and when i use the Load function, the values do change in the gazebo GUI, but the robot does not behave as if anything min_depth changed. When I position the wheels 1 cm below the ground , the wheels are pushed above the ground regardless.regardless. The 'max_vel' parameter does get uploaded correctly and the robot does not jump after being pushed out of the ground, however.

sdf::ElementPtr surface_sdf = this->link_ptr->GetCollision(_index)->GetSDF()->GetElement("surface");
min_depth_sdf->Set(0.02);
max_vel_sdf->Set(0.0);


### How to change min_depth parameter in model plugin

I'm trying to set different than default max_depth parameter for wheels of the robot. I managed to change the sdf code of the contact tag and when i use the Load function, the values do change in the gazebo GUI, but the robot does not behave as if min_depth changed. When I position the wheels 1 cm below the ground , the wheels are pushed above the ground regardless. The 'max_vel' parameter does get uploaded correctly and the robot does not jump after being pushed out of the ground, however.

sdf::ElementPtr surface_sdf = this->link_ptr->GetCollision(_index)->GetSDF()->GetElement("surface");
min_depth_sdf->Set(0.02);
max_vel_sdf->Set(0.0);


### How to change min_depth parameter in model pluginplugin?

I'm trying to set different than default max_depth parameter for wheels of the robot. I managed to change the sdf code of the contact tag and when i use the Load function, the values do change in the gazebo GUI, but the robot does not behave as if min_depth changed. When I position the wheels 1 cm below the ground , the wheels are pushed above the ground regardless. The 'max_vel' parameter does get uploaded correctly and the robot does not jump after being pushed out of the ground, however.

sdf::ElementPtr surface_sdf = this->link_ptr->GetCollision(_index)->GetSDF()->GetElement("surface");
min_depth_sdf->Set(0.02);
max_vel_sdf->Set(0.0);


### How to change min_depth parameter in model plugin?

I'm trying to set different than default max_depth parameter for wheels of the robot. I managed to change the sdf code of the contact tag and when i use the Load function, the values do change in the gazebo GUI, but the robot does not behave as if min_depth changed. When I position the wheels 1 cm below the ground , the wheels are pushed above the ground regardless. The 'max_vel' parameter does get uploaded correctly and the robot does not jump after being pushed out of the ground, however.

sdf::ElementPtr surface_sdf = this->link_ptr->GetCollision(_index)->GetSDF()->GetElement("surface");
min_depth_sdf->Set(0.02);
max_vel_sdf->Set(0.0);


EDIT 1

From my experiments I also came to conclusion, that the 'max_vel' parameter can be set from plugin only in case the QuickStep stepping method is being used. When running the simulation with the WorldStep stepping method, setting the 'max_vel' parameter from the plugin also does not have any effect.

Can anybody provide any explanation to this issue?

### How to change min_depth parameter in model plugin?

I'm trying to set different than default max_depth parameter for wheels of the robot. I managed to change the sdf code of the contact tag and when i use the Load function, the values do change in the gazebo GUI, but the robot does not behave as if min_depth changed. When I position the wheels 1 cm below the ground , the wheels are pushed above the ground regardless. The 'max_vel' parameter does get uploaded correctly and the robot does not jump after being pushed out of the ground, however.

sdf::ElementPtr surface_sdf = this->link_ptr->GetCollision(_index)->GetSDF()->GetElement("surface");

From my experiments I also came to conclusion, that the 'max_vel' max_vel parameter can be set from plugin only in case the QuickStep stepping method is being used. When running the simulation with the WorldStep stepping method, setting the 'max_vel' parameter from the plugin also does not have any effect.