You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following diagram describes the relation between packages:
48
+

49
+
Note that this class diagram is NOT comprehensive and only features the main relations.
50
+
51
+
The main core ROS dependencies are `ros_control`, `generate_parameters_library`, `kinematics__interface`.
52
+
The VIC controller makes use of the [dynamics_interface](https://github.com/tpoignonec/dynamics_interface) package for dynamic model access (based on kinematics_interface).
53
+
54
+
Additionally, the servo-based VIC implementation naturally requires the `moveit2` stack, including the latest `moveit_servo` package.
55
+
56
+
__Packages:__
57
+
-`cartesian_control_msgs`: definition of main messages for VIC controllers state and references. Additionally, messages representing the Cartesian state of a manipulator robot are defined here.
58
+
-`cartesian_state_broadcaster`: simple controller to broadcast the cartesian state (pose + velocity + force).
59
+
-`cartesian_vic_controller`: main repos, see following section.
60
+
-`cartesian_vic_teleop_controller`: extension of `cartesian_vic_controller` to bilateral VIC-based teleoperation.
61
+
-`cartesian_vic_servo`: alternative implementation for VIC (admittance controller only) using MoveIt2 servo as underlying Cartesian velocity controller.
62
+
63
+
### Cartesian VIC controller
64
+
65
+
This is the main package that defines the control logic and the default VIC controller (based on ros-control).
66
+
As visible in the diagram class diagram, the main control logic (see details in [cartesian_vic_controller/README.md](./cartesian_vic_controller/README.md)) is provided by the `CartesianVicRule` class.
67
+
68
+
```mermaid
69
+
classDiagram
70
+
note for VicRule "Pluginlib plugin"
71
+
CartesianVicRule <|-- VicRuleImpl
72
+
class CartesianVicRule{
73
+
+ init()*
74
+
+ configure()*
75
+
+ update()
76
+
+ reset()*
77
+
+ init_reference_frame_trajectory()
78
+
+ update_compliant_frame_trajectory()
79
+
+ controller_state_to_msg()
80
+
# compute_controls()*
81
+
}
82
+
class VicRuleImpl{
83
+
+ init()*
84
+
+ configure()*
85
+
+ reset()*
86
+
# compute_controls()*
87
+
}
88
+
```
89
+
90
+
The base class `CartesianVicRule` provide the logic for robot state processing and packaging (see `VicInputData` class).
91
+
It is also responsible for managing robot kinematic / dynamics and measurement filtering.
92
+
The `update()` function inernally calls the `compute_controls()`, a pure virtual function that has to be provided by actual VIC implementations.
93
+
94
+
Each rule inherits from `CartesianVicRule` and provide an implementation of `compute_controls`, whose signature is as follows:
95
+
96
+
```cpp
97
+
boolCartesianVicRule::compute_controls(
98
+
double dt /*period in seconds*/,
99
+
const VicInputData & vic_input_data,
100
+
VicCommandData & vic_command_data);
101
+
```
102
+
103
+
The implementation compute VIC controls from the `VicInputData` and returns commands in the form of a `VicCommandData` object. For instance, if the implementation is based on position control (e.g., admittance control) the following is valid:
0 commit comments