-
tkinter python library.
sudo apt-get install python python-tk
For more information visit here
- Import the msg in your script.
from pid_tune.msg import PidTune
- Write the subscriber in the code.
rospy.Subscriber('/pid_tuning', PidTune, self.set_pid_value )
- Get the Value and change the Gain values.
def set_pid_value(self,data):
self.kp_x = data.Kp
self.kp_y = data.Kp
self.kp_z = data.Kp
self.kd_x = data.Kd
self.kd_y = data.Kd
self.kd_z = data.Kd
self.ki_x = data.Ki
self.ki_y = data.Ki
self.ki_z = data.Ki
/$pid_params (pid_tune/PidTune)
$ denotes corresponding letter for the pid. eg: ppid_params for pitch pid parameters
-
For differential drive robot, you can run the following node
roslaunch pid_tune pid_tune_diff.launch
-
For drone, you can run the following node
roslaunch pid_tune pid_tune_drone.launch
-
For differential drive robot, you can run the following node
rosrun pid_tune pid_tune_differential.py
-
For drone, you can run the following node
rosrun pid_tune pid_tune_drone.py