ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why is humanoid robot falling strangely using gazebo_ros_control?

asked 2021-04-03 02:24:51 -0500

kovacs.attila gravatar image

updated 2022-06-11 10:40:03 -0500

lucasw gravatar image

Hi guys,

I am using the following configuration:

  • Ubuntu 20.04
  • ROS Noetic
  • Gazebo 11.3.0

The problem is that when i run the simulation the robot falls very slowly, it takes about 20 seconds (simulation time) to fall down. Moreover it also bounces quite strangley on the floor. I've read that gazebo_ros_control package may be causing this problem but after trying different controller types as suggested, the problem persists.

Here are the controller definitions:

 # Publish all joint states -----------------------------------
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50

  # Position Controllers ---------------------------------------
c1_waist_z_joint_controller:
type: effort_controllers/JointPositionController
joint: waist_z_joint
pid: {p: 1, i: 0.1, d: 0.1}

c2_waist_y_joint_controller:
type: effort_controllers/JointPositionController
joint: waist_y_joint
pid: {p: 1, i: 0.1, d: 0.1}

c3_waist_x_joint_controller:
type: effort_controllers/JointPositionController
joint: waist_x_joint
pid: {p: 1, i: 0.1, d: 0.1}

Can anyone please point me into the right direction for solving this unexpected behaviour?

Thank you in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-11-15 05:13:59 -0500

aGan gravatar image

Are you using gazebo ros control pid_gains?

In my experienced, I saw that pid gains in ros_controllers.yaml file is useless in gazebo for now.

There is only way to use pid on gazebo you should have gazebo_ros_control parameters like below;

  gazebo_ros_control:
    pid_gains:
      J1: {p: 1000.0, i: 0.01,  d: 10.0}
      J2: {p: 1000.0, i: 0.01,  d: 10.0}
      J3: {p: 1000.0, i: 0.01,  d: 10.0}
      J4: {p: 1000.0, i: 0.01,  d: 10.0}
      J5: {p: 1000.0, i: 0.01,  d: 10.0}
      J6: {p: 1000.0, i: 0.01,  d: 10.0}

But it is hard to adjust parameters, because it is depends on your link mass and inertia. So I preferred use without pid_gains parameters . I get some error messages like below but robot is not falling.

[ INFO] [1668509415.956302590]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server.
[ERROR] [1668509416.072938429]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/J1
[ERROR] [1668509416.073647058]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/J2
[ERROR] [1668509416.074322660]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/J3
[ERROR] [1668509416.074994133]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/J4
[ERROR] [1668509416.075751597]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/J5
[ERROR] [1668509416.076452863]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/J6
[ INFO] [1668509416.080542894]: Loaded gazebo_ros_control.
edit flag offensive delete link more

Comments

@aGan I agree that this user's problem can be fixed by setting the gazebo_ros_control "p" gains to good values.

As for your ERROR message, you should check if the property /gazebo_ros_control/pid_gains/J1/p exists on the rosparam server - you may be loading the .yaml file into the wrong namespace.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-11-16 07:04:38 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2021-04-03 02:24:51 -0500

Seen: 136 times

Last updated: Nov 15 '22