multi_finger_gripper_controller
MultiFingerGripperController
Bases: GripperController
Controller class for multi finger gripper control. This either interprets an input as a binary command (open / close), continuous command (open / close with scaled velocities), or per-joint continuous command
Each controller step consists of the following
- Clip + Scale inputted command according to @command_input_limits and @command_output_limits 2a. Convert command into gripper joint control signals 2b. Clips the resulting control by the motor limits
Source code in omnigibson/controllers/multi_finger_gripper_controller.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
|
__init__(control_freq, motor_type, control_limits, dof_idx, command_input_limits='default', command_output_limits='default', inverted=False, mode='binary', open_qpos=None, closed_qpos=None, limit_tolerance=0.001)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
control_freq
|
int
|
controller loop frequency |
required |
motor_type
|
str
|
type of motor being controlled, one of {position, velocity, effort} |
required |
control_limits
|
Dict[str, Tuple[Array[float], Array[float]]]
|
The min/max limits to the outputted control signal. Should specify per-dof type limits, i.e.: "position": [[min], [max]] "velocity": [[min], [max]] "effort": [[min], [max]] "has_limit": [...bool...] Values outside of this range will be clipped, if the corresponding joint index in has_limit is True. |
required |
dof_idx
|
Array[int]
|
specific dof indices controlled by this robot. Used for inferring controller-relevant values during control computations |
required |
command_input_limits
|
None or default or Tuple[float, float] or Tuple[Array[float], Array[float]]
|
if set, is the min/max acceptable inputted command. Values outside this range will be clipped. If None, no clipping will be used. If "default", range will be set to (-1, 1) |
'default'
|
command_output_limits
|
None or default or Tuple[float, float] or Tuple[Array[float], Array[float]]
|
if set, is the min/max scaled command. If both this value and @command_input_limits is not None, then all inputted command values will be scaled from the input range to the output range. If either is None, no scaling will be used. If "default", then this range will automatically be set to the @control_limits entry corresponding to self.control_type |
'default'
|
inverted
|
bool
|
whether or not the command direction (grasp is negative) and the control direction are inverted, e.g. to grasp you need to move the joint in the positive direction. |
False
|
mode
|
str
|
mode for this controller. Valid options are: "binary": 1D command, if preprocessed value > 0 is interpreted as an max open (send max pos / vel / tor signal), otherwise send max close control signals "smooth": 1D command, sends symmetric signal to all finger joints equal to the preprocessed commands "independent": n-dimensional command, sends independent signals to each finger joint equal to the preprocessed command |
'binary'
|
open_qpos
|
None or Array[float]
|
If specified, the joint positions representing a fully-opened gripper. This is to allow representing the open state as a partially opened gripper, rather than the full opened gripper. If None, will simply use the native joint limits of the gripper joints. Only relevant if using @mode=binary and @motor_type=position |
None
|
closed_qpos
|
None or Array[float]
|
If specified, the joint positions representing a fully-closed gripper. This is to allow representing the closed state as a partially closed gripper, rather than the full closed gripper. If None, will simply use the native joint limits of the gripper joints. Only relevant if using @mode=binary and @motor_type=position |
None
|
limit_tolerance
|
float
|
sets the tolerance from the joint limit ends, below which controls will be zeroed out if the control is using velocity or torque control |
0.001
|
Source code in omnigibson/controllers/multi_finger_gripper_controller.py
compute_control(goal_dict, control_dict)
Converts the (already preprocessed) inputted @command into deployable (non-clipped!) gripper joint control signal
Parameters:
Name | Type | Description | Default |
---|---|---|---|
goal_dict
|
Dict[str, Any]
|
dictionary that should include any relevant keyword-mapped goals necessary for controller computation. Must include the following keys: target: desired gripper target |
required |
control_dict
|
Dict[str, Any]
|
dictionary that should include any relevant keyword-mapped states necessary for controller computation. Must include the following keys: joint_position: Array of current joint positions joint_velocity: Array of current joint velocities |
required |
Returns:
Type | Description |
---|---|
Array[float]
|
outputted (non-clipped!) control signal to deploy |