Add simple drive function to API
The wheel speed function requires setting individual wheel speed. And knowledge of the max and min values. The simple drive function can accept x, y, and r speeds from -1 to 1, and will compute the wheel speeds for the user to achieve the desired velocity.
This commit is contained in:
@@ -27,3 +27,12 @@ static inline void byte2host(uint8_t b, uint8_t* host, uint8_t* index) {
|
||||
*index = b >> 5;
|
||||
}
|
||||
|
||||
/*
|
||||
* Drive the wheels of the robot. Values should be [-1, 1]
|
||||
*
|
||||
* x: positive is forward, negative is backwards
|
||||
* y: positive is right, negative is left
|
||||
* r: positive is clockwise, negative is counterclockwise
|
||||
*/
|
||||
void drive(Client client, float x, float y, float r);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user