Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f9462c

Browse files
committed
rename wrist commands
1 parent 1ec18f7 commit 0f9462c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/udp_command.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ pub struct UdpExtendedCommand {
244244
pub r_elbow_pitch: f32,
245245
#[serde(rename = "RElbowRoll")]
246246
pub r_elbow_roll: f32,
247-
#[serde(rename = "RWristPitch")]
248-
pub r_wrist_pitch: f32,
247+
#[serde(rename = "RWristRoll")]
248+
pub r_wrist_roll: f32,
249249

250250
// 11..15 left arm
251251
#[serde(rename = "LShoulderPitch")]
@@ -256,17 +256,17 @@ pub struct UdpExtendedCommand {
256256
pub l_elbow_pitch: f32,
257257
#[serde(rename = "LElbowRoll")]
258258
pub l_elbow_roll: f32,
259-
#[serde(rename = "LWristPitch")]
260-
pub l_wrist_pitch: f32,
259+
#[serde(rename = "LWristRoll")]
260+
pub l_wrist_roll: f32,
261261
}
262262

263263
impl Default for UdpExtendedCommand {
264264
fn default() -> Self {
265265
Self {
266266
x: 0.0, y: 0.0, yaw_rate: 0.0,
267267
base_height: 0.0, base_roll: 0.0, base_pitch: 0.0,
268-
r_shoulder_pitch: 0.0, r_shoulder_roll: (-15.0f32).to_radians(), r_elbow_pitch: 0.0, r_elbow_roll: (90.0f32).to_radians(), r_wrist_pitch: 0.0,
269-
l_shoulder_pitch: 0.0, l_shoulder_roll: (15.0f32).to_radians(), l_elbow_pitch: 0.0, l_elbow_roll: (-90.0f32).to_radians(), l_wrist_pitch: 0.0,
268+
r_shoulder_pitch: 0.0, r_shoulder_roll: (-15.0f32).to_radians(), r_elbow_pitch: 0.0, r_elbow_roll: (90.0f32).to_radians(), r_wrist_roll: 0.0,
269+
l_shoulder_pitch: 0.0, l_shoulder_roll: (15.0f32).to_radians(), l_elbow_pitch: 0.0, l_elbow_roll: (-90.0f32).to_radians(), l_wrist_roll: 0.0,
270270

271271
}
272272
}
@@ -315,12 +315,12 @@ impl crate::policy_control::InputState for Udp16ControlVectorInputState {
315315
arr[7] = c.r_shoulder_roll;
316316
arr[8] = c.r_elbow_pitch;
317317
arr[9] = c.r_elbow_roll;
318-
arr[10] = c.r_wrist_pitch;
318+
arr[10] = c.r_wrist_roll;
319319
arr[11] = c.l_shoulder_pitch;
320320
arr[12] = c.l_shoulder_roll;
321321
arr[13] = c.l_elbow_pitch;
322322
arr[14] = c.l_elbow_roll;
323-
arr[15] = c.l_wrist_pitch;
323+
arr[15] = c.l_wrist_roll;
324324
debug!("16D UDP command: x={}, y={}, yaw={}, base_height={}, r_shoulder_pitch={}",
325325
c.x, c.y, c.yaw_rate, c.base_height, c.r_shoulder_pitch);
326326
Ok(())
@@ -339,12 +339,12 @@ impl crate::policy_control::InputState for Udp16ControlVectorInputState {
339339
arr[7] = cmd_state.r_shoulder_roll;
340340
arr[8] = cmd_state.r_elbow_pitch;
341341
arr[9] = cmd_state.r_elbow_roll;
342-
arr[10] = cmd_state.r_wrist_pitch;
342+
arr[10] = cmd_state.r_wrist_roll;
343343
arr[11] = cmd_state.l_shoulder_pitch;
344344
arr[12] = cmd_state.l_shoulder_roll;
345345
arr[13] = cmd_state.l_elbow_pitch;
346346
arr[14] = cmd_state.l_elbow_roll;
347-
arr[15] = cmd_state.l_wrist_pitch;
347+
arr[15] = cmd_state.l_wrist_roll;
348348
}
349349
debug!("16D UDP command from robot_description: x={}, y={}, yaw_rate={}, base_height={}",
350350
cmd_state.x, cmd_state.y, cmd_state.yaw_rate, cmd_state.base_height);

0 commit comments

Comments
 (0)