Study note 37--When urdf defines the position controller, when loading to gazebo, an error case is reported to solve and share

Environment: ubuntu 16.04 ros-kinetic gazebo 7.16

Source: When running the robot launch file, the terminal reported the following error:

[ WARN] [1574934496.055405284, 0.194000000]: The default_robot_hw_sim plugin is using the Joint::SetPosition method without preserving the link velocity.
[ WARN] [1574934496.055428573, 0.194000000]: As a result, gravity will not be simulated correctly for your model.

or

[ERROR] [1575425101.839514990, 0.001000000]: No p gain specified for pid.  

Reason:
The pid of the movable joint gazebo corresponding to the position controller is missing the definition, and gazebo cannot perform the corresponding calculation

Solution:
You can use a yaml file to load all the active joint pids into gazebo, because gazebo lacks the model active joint pid, which will cause the lack of gravity effect. For example, the content of the yanl file is as follows:

gazebo_ros_control:
  pid_gains:
    # these gains are used by the gazebo_ros_control plugin
    aaa_link:
      p: 20.0
      i: 0.1
      d: 0.0

This time is a specific error analysis.In fact, there are many personal previous blogs about the pid on gazebo that caused the abnormal sharing of the robot model, and you can check it if you need it.

##################
Good memory is not as good as bad
writing'–20200730

Guess you like

Origin blog.csdn.net/qq_45701501/article/details/107686917