/robot/joint_states/position values are accumlating for wheel joint
my mobile robot = arhex has six continuous wheel joints. below is my ros_control yaml.
prob: /arhex/joint_states/position topic values are not being bounded between 0 and 2*pi... so i'm unable to tune PID values by plotting between /arhex/joint1_position_controller/state/process_value
and /arhex/joint1_position_controller/command
...if these two r incorrect thwn wat topics should i plot for tuning PID.
thanks for your time
ROS melodic, Gazebo-9, Ubuntu-18.04
arhex:
# Publish all joint states -----------------------------------
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
# Position Controllers ---------------------------------------
joint1_position_controller:
type: effort_controllers/JointPositionController
joint: left_wheel_hinge_front
pid: {p: 50, i: 0.01, d: 0.1}
joint2_position_controller:
type: effort_controllers/JointPositionController
joint: right_wheel_hinge_front
pid: {p: 50, i: 0.01, d: 0.1}
joint3_position_controller:
type: effort_controllers/JointPositionController
joint: left_wheel_hinge_mid
pid: {p: 50, i: 0.01, d: 0.1}
joint4_position_controller:
type: effort_controllers/JointPositionController
joint: right_wheel_hinge_mid
pid: {p: 50, i: 0.01, d: 0.1}
joint5_position_controller:
type: effort_controllers/JointPositionController
joint: left_wheel_hinge_back
pid: {p: 50, i: 0.01, d: 0.1}
joint6_position_controller:
type: effort_controllers/JointPositionController
joint: right_wheel_hinge_back
pid: {p: 50, i: 0.01, d: 0.1}
Hi @s.vaichu, My first question is why you want to control the wheels with a position controller, would not be better to use an
effort_controller
or avelocity_controller
instead of aposition_controller
?Apart from that, the topic
/rrbot/joint1_position_controller/command/data
contains the value you commanded to the controller and the/rrbot/joint1_position_controller/state/process_value
topic contains the output signal of the PID controller. To tune the PID gains you can use the rtq plugin dynamic_reconfigure and the rqt_plot to plot the signals. Since you have a continous joint controlled with position, it is normal that the controller values are not bounded since the position will be always increasing. You can try with an effort_controller, maybe you find this tutorial usefull.