new file: img/blocks/LARS.svg

new file:   img/blocks/LARS_BLH.svg
	new file:   img/blocks/LARS_BLL.svg
	new file:   img/blocks/LARS_BRH.svg
	new file:   img/blocks/LARS_BRL.svg
	new file:   img/blocks/LARS_FLH.svg
	new file:   img/blocks/LARS_FLL.svg
	new file:   img/blocks/LARS_FRH.svg
	new file:   img/blocks/LARS_FRL.svg
	new file:   img/blocks/acknowledgements.html
	new file:   lang/LARS.json
	modified:   lars_blocks.js
	modified:   src/LARS.cpp
	modified:   src/LARS.h
This commit is contained in:
roboticafacil
2017-12-12 00:01:01 +01:00
parent b5ac2d6875
commit 84f01d277b
14 changed files with 880 additions and 346 deletions

View File

@ -59,6 +59,18 @@ void LARS::init() {
home();
}
void init(int FRH, int FLH, int BRH, int BLH, int FRL, int FLL, int BRL, int BLL)
{
board_pins[FRONT_RIGHT_HIP] = FRH; // front right inner
board_pins[FRONT_LEFT_HIP] = FLH; // front left inner
board_pins[BACK_RIGHT_HIP] = BRH; // back right inner
board_pins[BACK_LEFT_HIP] = BLH; // back left inner
board_pins[FRONT_RIGHT_LEG] = FRL; // front right outer
board_pins[FRONT_LEFT_LEG] = FLL; // front left outer // POSITIONS LOOKING FROM THE MIDDLE OF THE ROBOT!!!!!
board_pins[BACK_RIGHT_LEG] = BRL; // back right outer
board_pins[BACK_LEFT_LEG] = BLL; // back left outer
}
void LARS::turnR(float steps, float T = 600) {
//int x_amp = 15;
//int z_amp = 15;

View File

@ -20,6 +20,7 @@ class LARS {
public:
LARS();
void init();
void init(int FRH, int FLH, int BRH, int BLH, int FRL, int FLL, int BRL, int BLL);
void walk(int dir = 1, float steps = 1, float T = 800); // T initial 400
void omniWalk(float steps, float T, bool side, float turn_factor);
void turnL(float steps, float period);