Ask Your Question

/robot/joint_states/position values are accumlating for wheel joint

asked 2020-04-04 16:46:24 -0600

s.vaichu gravatar image

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

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

      # Position Controllers ---------------------------------------
        type: effort_controllers/JointPositionController
        joint: left_wheel_hinge_front
        pid: {p: 50, i: 0.01, d: 0.1}
        type: effort_controllers/JointPositionController
        joint: right_wheel_hinge_front
        pid: {p: 50, i: 0.01, d: 0.1}
        type: effort_controllers/JointPositionController
        joint: left_wheel_hinge_mid
        pid: {p: 50, i: 0.01, d: 0.1}
        type: effort_controllers/JointPositionController
        joint: right_wheel_hinge_mid
        pid: {p: 50, i: 0.01, d: 0.1}
        type: effort_controllers/JointPositionController
        joint: left_wheel_hinge_back
        pid: {p: 50, i: 0.01, d: 0.1}
        type: effort_controllers/JointPositionController
        joint: right_wheel_hinge_back
        pid: {p: 50, i: 0.01, d: 0.1}
edit retag flag offensive close merge delete


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 a velocity_controller instead of a position_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.

Weasfas gravatar image Weasfas  ( 2020-04-05 08:05:06 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-06-04 13:50:13 -0600

s.vaichu gravatar image

The problem is was using continuous joint over revolute, so /robot/joint_position_controller/state/process_value is accumulating as the wheels keep on rolling

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-04-04 16:46:24 -0600

Seen: 216 times

Last updated: Jun 04 '20