Skip to content

Commit

Permalink
add new APIs for go2 sport client
Browse files Browse the repository at this point in the history
  • Loading branch information
holiray committed Jan 10, 2025
1 parent 33d5835 commit ca1bcab
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/unitree/robot/go2/sport/sport_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ const int32_t ROBOT_SPORT_API_ID_DANCE4 = 1038;
const int32_t ROBOT_SPORT_API_ID_HOPSPINLEFT = 1039;
const int32_t ROBOT_SPORT_API_ID_HOPSPINRIGHT = 1040;

const int32_t ROBOT_SPORT_API_ID_LEFTFLIP = 1042;
const int32_t ROBOT_SPORT_API_ID_BACKFLIP = 1044;
const int32_t ROBOT_SPORT_API_ID_FREEWALK = 1045;
const int32_t ROBOT_SPORT_API_ID_FREEBOUND = 1046;
const int32_t ROBOT_SPORT_API_ID_FREEJUMP = 1047;
const int32_t ROBOT_SPORT_API_ID_FREEAVOID = 1048;
const int32_t ROBOT_SPORT_API_ID_WALKSTAIR = 1049;
const int32_t ROBOT_SPORT_API_ID_WALKUPRIGHT = 1050;
const int32_t ROBOT_SPORT_API_ID_CROSSSTEP = 1051;

}
}
Expand Down
54 changes: 54 additions & 0 deletions include/unitree/robot/go2/sport/sport_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,60 @@ class SportClient : public Client
*/
int32_t EconomicGait(bool flag);

/*
* @brief LeftFlip
* @api: 1042
*/
int32_t LeftFlip();

/*
* @brief LeftFlip
* @api: 1044
*/
int32_t BackFlip();

/*
* @brief FreeWalk
* @api: 1045
*/
int32_t FreeWalk();

/*
* @brief FreeBound
* @api: 1046
*/
int32_t FreeBound(bool flag);

/*
* @brief FreeJump
* @api: 1047
*/
int32_t FreeJump(bool flag);

/*
* @brief FreeAvoid
* @api: 1048
*/
int32_t FreeAvoid(bool flag);

/*
* @brief WalkStair
* @api: 1049
*/
int32_t WalkStair(bool flag);

/*
* @brief WalkStair
* @api: 1050
*/
int32_t WalkUpright(bool flag);

/*
* @brief CrossStep
* @api: 1051
*/
int32_t CrossStep(bool flag);

};
}
}
Expand Down
Binary file modified lib/aarch64/libunitree_sdk2.a
Binary file not shown.
Binary file modified lib/x86_64/libunitree_sdk2.a
Binary file not shown.

0 comments on commit ca1bcab

Please sign in to comment.