From: Walter Fetter Lages Date: Fri, 6 Nov 2026 05:29:08 +0000 (-0300) Subject: Add admittance controller configuration. X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=HEAD;p=q2d.git Add admittance controller configuration. --- diff --git a/q2d_bringup/config/admittance.yaml b/q2d_bringup/config/admittance.yaml new file mode 100644 index 0000000..d92001d --- /dev/null +++ b/q2d_bringup/config/admittance.yaml @@ -0,0 +1,87 @@ +admittance_controller: + ros__parameters: + type: admittance_controller/AdmittanceController + joints: + - shoulder_active_joint + - elbow_active_joint + command_joints: + - motion_controller/shoulder_active_joint + - motion_controller/elbow_active_joint + command_interfaces: + - position + state_interfaces: + - position + # - velocity + chainable_command_interfaces: + - position + # - velocity + kinematics: + plugin_name: kinematics_interface_kdl/KinematicsInterfaceKDL + plugin_package: kinematics_interface + base: base_link + tip: tool_link +# alpha: 0.01 + alpha: 0.0005 + ft_sensor: + name: ft_sensor + frame: + id: tool_link +# filter_coefficient: 0.05 + filter_coefficient: 0.005 + control: + frame: + id: tool_link + fixed_world_frame: + frame: + id: base_link + gravity_compensation: + frame: + id: tool_link + CoG: + pos: + - 0.06204831581 + - 0.00000013809 + - 0.01489882531 + force: 6.6246160665465 # mass*9.81 + admittance: + selected_axes: + - true + - true + - false + - false + - false + - true + mass: + - 0.5 + - 0.5 + - 0.5 + - 0.05 + - 0.05 + - 0.05 + damping_ratio: # xi = D / (2 * sqrt( M * S )) + - 1.0 + - 1.0 + - 1.0 + - 1.0 + - 1.0 + - 1.0 + stiffness: + - 250.0 + - 250.0 + - 250.0 + - 250.0 + - 250.0 + - 250.0 + enable_parameter_update_without_reactivation: true + +motion_controller: + ros__parameters: + type: pid_controller/PidController + dof_names: + - shoulder_active_joint + - elbow_active_joint + command_interface: effort + reference_and_state_interfaces: ["position"] + gains: + shoulder_active_joint: {p: 2310.0, i: 4640.0, d: 0.299, i_clamp_max: 100.0, i_clamp_min: -100.0, antiwindup: false} + elbow_active_joint: {p: 339.0, i: 841.0, d: 0.351, i_clamp_max: 100.0, i_clamp_min: -100.0, antiwindup: false} diff --git a/q2d_bringup/config/controller_manager.yaml b/q2d_bringup/config/controller_manager.yaml new file mode 100644 index 0000000..060c83c --- /dev/null +++ b/q2d_bringup/config/controller_manager.yaml @@ -0,0 +1,5 @@ +controller_manager: + ros__parameters: + update_rate: 100 + enforce_command_limits: false + use_sim_time: false diff --git a/q2d_bringup/config/force_torque_sensor_broadcaster.yaml b/q2d_bringup/config/force_torque_sensor_broadcaster.yaml new file mode 100644 index 0000000..6d06db3 --- /dev/null +++ b/q2d_bringup/config/force_torque_sensor_broadcaster.yaml @@ -0,0 +1,5 @@ +ft_sensor_broadcaster: + ros__parameters: + type: force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster + sensor_name: ft_sensor + frame_id: tool_llink diff --git a/q2d_bringup/launch/admittance.launch.xml b/q2d_bringup/launch/admittance.launch.xml new file mode 100644 index 0000000..8678fcc --- /dev/null +++ b/q2d_bringup/launch/admittance.launch.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + diff --git a/q2d_description/urdf/q2d.urdf b/q2d_description/urdf/q2d.urdf index 9b4dd72..012d1b5 100644 --- a/q2d_description/urdf/q2d.urdf +++ b/q2d_description/urdf/q2d.urdf @@ -236,6 +236,23 @@ + + + + + + + + true + + 50.0 + true + true + ft_sensor/wrench + 0 0 0 0 0 0 + + + @@ -247,6 +264,20 @@ q2d_hardware/Q2dSystemHardware + + + sim_hardware/SimSystemHardware + + + + + joint_state_topic_hardware_interface/JointStateTopicSystem + joint_commands + joint_states + false + -1 + + @@ -267,6 +298,15 @@ + + + + + + + + +