Skip to content

Commit c98992b

Browse files
committed
comments for hand impl
1 parent 80e3d0a commit c98992b

4 files changed

Lines changed: 23 additions & 0 deletions

File tree

src/CAN/CANBoard.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,12 @@ void CANBoard::read(uint16_t endpoint) {
169169
sendCANPacket(p);
170170
}
171171

172+
/*
173+
void setStepper(float revs) {
174+
CANMotorPacket_Stepper_DriveRevolutions()
175+
sendCanPacket
176+
}
177+
178+
*/
179+
172180
} // namespace can

src/CAN/CANBoard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class CANBoard {
1717
void setMotorState(can::motor::axis_state_t state);
1818
void setMotorVel(int8_t velocity);
1919

20+
// Motor/Peripheral
21+
void setStepper(float revs);
22+
2023
// Universal
2124
void read(uint16_t endpoint);
2225

src/control_interface.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ void setJointMotorPower(robot::types::jointid_t joint, double power) {
188188
Globals::wristKinematics.jointPowerToGearPower(jointPwr);
189189
setMotorPower(boardid_t::wristDiffLeft, gearPwr.left);
190190
setMotorPower(boardid_t::wristDiffRight, gearPwr.right);
191+
} else if (joint == jointid_t::hand) {
192+
// we need a stepper power packet in real_world_interface (by extension in world_interface and simuator_interface)
193+
// that we can call here with boardid_t::hand and float revs
191194
} else {
192195
LOG_F(WARNING, "setJointPower called for currently unsupported joint %s",
193196
util::to_string(joint).c_str());

src/world_interface/real_world_interface.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,4 +302,13 @@ void handleMotorEncoderEstimate(robot::types::boardid_t board, int32_t positionM
302302
}
303303
}
304304

305+
/*
306+
307+
void setStepper(boardid_t board, float revs) {
308+
getBoard_(board);
309+
board_ptr->runStepper(revs)
310+
}
311+
312+
*/
313+
305314
} // namespace robot

0 commit comments

Comments
 (0)