Skip to content

k_velocity has value of 0 in safety_controller, limiting effort commands to 0 #376

@JohnTGZ

Description

@JohnTGZ

Within urdf/ur_macro.xacro and other parts of the file, the k_velocity is defined as 0. As a result, if we enable the safety_controller and use the effort interface of the UR robot, the effort command sent to the hardware_interface will be limited to 0.0.
This is because enabling the safety_controller results in the use of soft joint limits where the k_velocity parameter is used to calculate the soft effort limits here with the following code section copied here:

      soft_min_eff = std::clamp(
        -soft_joint_limits.k_velocity * (actual.velocity.value() - soft_min_vel),
        -hard_limits.max_effort, hard_limits.max_effort);

      soft_max_eff = std::clamp(
        -soft_joint_limits.k_velocity * (actual.velocity.value() - soft_max_vel),
        -hard_limits.max_effort, hard_limits.max_effort);

In order to use the safety_controller with effort interfaces, we will need to set k_velocity to an appropriate value. However, it is not immediately obvious what this value should be from the relationships between actual velocity, velocity limit and the effort limit.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions