ezWheelSAS / swd_ros_controllers

ROS nodes to control motors powered by the ez-Wheel Safety Wheel Drive (SWD®) technology.
https://www.ez-wheel.com/
GNU Lesser General Public License v2.1
5 stars 4 forks source link

Adjusting the PID gain of the SWD Core. #8

Closed fig-shimooka closed 2 years ago

fig-shimooka commented 2 years ago

Hi. I feel that the response of the SWD Core to driving curves is slow. I would like to make it quicker, is it possible to change the PID gain adjustment parameter? If yes, where can it be changed?

GMezWheel commented 2 years ago

The PID gain is in the trajectory controller not in the SWD Core or in the SWD ROS Controller.

However you can disable acceleration/deceleration ramps of the SWD Core. => For example, you can tweak commissioning.py like that:

def update_ramps(vl_dec_delta_speed):
    params, error = velocity_mode_client.getVelocityModeParameters()
    check("getVelocityModeParameters()", error)

    # params.vl_velocity_deceleration_delta_speed = vl_dec_delta_speed
    params.vl_velocity_acceleration_delta_speed = 1500 # Patch to disable acc ramp
    params.vl_velocity_deceleration_delta_speed = 1500 # Patch to disable dec ramp

    error = velocity_mode_client.setVelocityModeParameters(params)
    check("setVelocityParameters()", error)
fig-shimooka commented 2 years ago

Thank you. It worked exactly as I had hoped.