add ranger motion mode setting

This commit is contained in:
wangzheqie
2021-04-22 13:37:28 +08:00
parent 4d0f718231
commit d6c06897d3
7 changed files with 64 additions and 4 deletions

View File

@@ -59,6 +59,9 @@ class AgilexBase {
LightMode rear_mode, uint8_t rear_custom_value);
void DisableLightControl();
// motion mode change
void SetMotionMode(uint8_t mode);
// reset fault states
void ResetRobotState();

View File

@@ -53,6 +53,12 @@ typedef struct {
bool enable_braking;
} BrakingCommandMessage;
// 0x141
typedef struct
{
uint8_t motion_mode;
} MotionModeMessage;
/**************** Feedback messages *****************/
// 0x211
@@ -288,6 +294,7 @@ typedef enum {
AgxMsgMotionCommand,
AgxMsgLightCommand,
AgxMsgBrakingCommand,
AgxMsgSetMotionMode,
// state feedback
AgxMsgSystemState,
AgxMsgMotionState,
@@ -321,6 +328,7 @@ typedef struct {
MotionCommandMessage motion_command_msg;
LightCommandMessage light_command_msg;
BrakingCommandMessage braking_command_msg;
MotionModeMessage motion_mode_msg;
// state feedback
SystemStateMessage system_state_msg;
MotionStateMessage motion_state_msg;

View File

@@ -68,6 +68,7 @@ class RangerBase : public AgilexBase {
// robot control
void SetMotionCommand(double linear_vel, double angular_vel);
void SetLightCommand(const RangerLightCmd &cmd);
void SetMotionMode(uint8_t mode);
// get robot state
RangerState GetRangerState();