Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuning PID in gazebo for SUMMIT XL Robot #30

Open
Eswar1991 opened this issue Jun 13, 2020 · 1 comment
Open

Tuning PID in gazebo for SUMMIT XL Robot #30

Eswar1991 opened this issue Jun 13, 2020 · 1 comment

Comments

@Eswar1991
Copy link

Eswar1991 commented Jun 13, 2020

Hi all,
We are trying to move SUMMIT XL robot in a straight line and circle in gazebo. In connection with this task, we used PID controller for wheel actuation joints to obtain accurate output motion and response.

For this purpose, we have changed the launch files of summit xl robot to tune the pid gains as shown below:


  <param name="/robot/gazebo_ros_control/pid_gains/$(arg prefix)front_left_wheel_joint/p" type="double" value="$(arg p)" />
  <param name="/robot/gazebo_ros_control/pid_gains/$(arg prefix)front_left_wheel_joint/i" type="double" value="$(arg i)" />
  <param name="/robot/gazebo_ros_control/pid_gains/$(arg prefix)front_left_wheel_joint/d" type="double" value="$(arg d)" />

  <param name="/robot/gazebo_ros_control/pid_gains/robot_back_right_wheel_joint/p" type="double" value="$(arg p)" />
  <param name="/robot/gazebo_ros_control/pid_gains/robot_back_right_wheel_joint/i" type="double" value="$(arg i)" />
  <param name="/robot/gazebo_ros_control/pid_gains/robot_back_right_wheel_joint/d" type="double" value="$(arg d)" />

  <param name="/robot/gazebo_ros_control/pid_gains/robot_back_left_wheel_joint/p" type="double" value="$(arg p)" />
  <param name="/robot/gazebo_ros_control/pid_gains/robot_back_left_wheel_joint/i" type="double" value="$(arg i)" />
  <param name="/robot/gazebo_ros_control/pid_gains/robot_back_left_wheel_joint/d" type="double" value="$(arg d)" />

However, the outputs are not desirable. The effect of d-gain is to mitigate the oscillations in response patterns of velocity, which is not happening.

image

In both planar and differential drive plugins, it can be seen that the response patterns oscillates, and it doesn't reduce even by increasing d-gain.

For some values of p (>=100) with i & d being zero, the robot moves/ oscillates around the finish point, although the motion is complete.

Please see the below gif where the robot moves in a circle and after reaching the finsh point, it oscillates about that point (p=100, i=0, d=0)

https://lh3.googleusercontent.com/-K-9B7Z6JKZM/XuSAtjxyopI/AAAAAAAAAzQ/GQo42t1xkRMtWb1GvtGmQmNNkxQo14H0QCK8BGAsYHg/s0/gif2.gif

With reduced value of p, this behavior vanishes, but the circle formed is of greater dimension than the actual...
With both p and d enabled, the robot begins to oscillate at the start itself.
p:100 i:0 d:10
https://lh3.googleusercontent.com/-K-0_LrgqTR0/XuSBNUx0urI/AAAAAAAAAzo/x-gdf77g14cqAmhhKIurU7czDIrGK_5TgCK8BGAsYHg/s0/gif3.gif

We are being confused with this, as these behaviours are new and not getting aligned with our knowledge on PID Control theory. Is the summit xl being properly configured for manual tuning of PID gains in simulation? Is there any problem in this configuration?
Or, do we need to change the approach we used? Is it preferrable to do PID tuning in gazebo?

Any help on this issue would be appreciated.

@jgomezgadea
Copy link
Contributor

jgomezgadea commented Jun 26, 2020

Hi @Eswar1991 ,

We are having a lot of problems with gazebo physics, we also have this one.

To correct that, actually, our simulation has a fake control of the wheels. Our purpose of the simulation is to test different algorithms that can work using the cmd_vel topic and odometry, so that fake simulation is not using any of the PID parameters.

Sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants