This is a cartesian VIC controller inspired by the package admittance_controller
from ros-controls/ros2_controllers.
Warning
This package is currently under development and possibly unsafe if used to control an actual robot! For instance, a singularity avoidance strategy has still to be implemented in the default VIC.
Let us consider a
where
Note
In the code as well as in the following, we define
The controller imposes the following cartesian behavior
where
The cartesian acceleration command
The cartesian acceleration is integrated to obtain the cartesian velocity command
The joint velocity command kinematics_interface
.
In order to accommodate for both the position
and velocity
command interfaces, the joint velocity command
where
See vanilla_cartesian_admittance_rule for implementation details.
The joint acceleration command is first computed as
Then, the joint torque control is computed from
If the gravity compensation is activated (see vic.activate_gravity_compensation
parameters), the control law becomes
See vanilla_cartesian_impedance_rule for implementation details.
-
~/compliant_frame_reference
(input topic) [cartesian_control_msgs::msg::CompliantFrameTrajectory
]Target (cartesian) compliant frame containing at least a pose, a twist.
Additionally, a desired compliance (stiffness, damping, inertia) can be provided for each reference cartesian state in the trajectory. Otherwise, the ros parameters are used to retrieve the default values. For instance you could provide the following default impedance parameters:
<controller_name>: vic: frame: id: <vic_reference_frame> # e.g., tool0 or world inertia: [1.0, 1.0, 1.0, 0.1, 0.1, 0.1] damping_ratio: [1., 1., 1., 1., 1., 1.] stiffness: [200., 200., 200., 50., 50., 50.]
-
~/status
(output topic) [cartesian_control_msgs::msg::VicControllerState
]Topic publishing controller internal states.
The state interfaces are defined with joints
and state_interfaces
parameters as follows: <joint>/<state_interface>
.
The necessary state interfaces are position
and velocity
.
Both are mandatory!
The Force Torque Sensor
semantic component is used and requires force state interfaces (optional, depending on rule requirements).
To disable the force-torque sensor, set ft_sensor.is_enabled
to false.
<controller_name>:
...
ft_sensor:
is_enabled: false
name: "" # sensor name in URDF
frame:
id: "" # F/T sensor frame (in which the wrench is expressed)
...
Similarly, some rules can use external torque sensor (e.g., useful for nullspace control)
<controller_name>:
...
external_torque_sensor:
is_enabled: false # set to true to enable
name: "" # sensor name use by the semantic component
...
-
Admittance control:
Ideally, the control interface is a joint
velocity
group. The controller can also use aposition
command interface. -
Impedance control:
effort
command interface required.