mirror of
https://github.com/westonrobot/ugv_sdk
synced 2023-04-08 06:32:14 +08:00
moved serial connect to scout and tracer interface only
This commit is contained in:
@@ -43,14 +43,11 @@ class RobotCommonInterface {
|
|||||||
|
|
||||||
// functions to be implemented by each robot class
|
// functions to be implemented by each robot class
|
||||||
virtual void Connect(std::string can_name) = 0;
|
virtual void Connect(std::string can_name) = 0;
|
||||||
// functions to be implemented by each robot class
|
|
||||||
virtual void Connect(std::string uart_name, uint32_t baudrate){
|
|
||||||
// use derived version
|
|
||||||
};
|
|
||||||
virtual void ResetRobotState() = 0;
|
virtual void ResetRobotState() = 0;
|
||||||
|
|
||||||
virtual void DisableLightControl() {
|
virtual void DisableLightControl() {
|
||||||
// use derived version
|
// do nothing if no light on robot
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ProtocolVersion GetProtocolVersion() = 0;
|
virtual ProtocolVersion GetProtocolVersion() = 0;
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ struct ScoutActuatorState {
|
|||||||
struct ScoutInterface {
|
struct ScoutInterface {
|
||||||
virtual ~ScoutInterface() = default;
|
virtual ~ScoutInterface() = default;
|
||||||
|
|
||||||
|
virtual void Connect(std::string uart_name, uint32_t baudrate){
|
||||||
|
// use derived version
|
||||||
|
};
|
||||||
|
|
||||||
virtual void SetMotionCommand(double linear_vel, double angular_vel) = 0;
|
virtual void SetMotionCommand(double linear_vel, double angular_vel) = 0;
|
||||||
virtual void SetLightCommand(LightMode f_mode, uint8_t f_value,
|
virtual void SetLightCommand(LightMode f_mode, uint8_t f_value,
|
||||||
LightMode r_mode, uint8_t r_value) = 0;
|
LightMode r_mode, uint8_t r_value) = 0;
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ struct TracerActuatorState {
|
|||||||
struct TracerInterface {
|
struct TracerInterface {
|
||||||
virtual ~TracerInterface() = default;
|
virtual ~TracerInterface() = default;
|
||||||
|
|
||||||
|
virtual void Connect(std::string uart_name, uint32_t baudrate){
|
||||||
|
// use derived version
|
||||||
|
};
|
||||||
|
|
||||||
virtual void SetMotionCommand(double linear_vel, double angular_vel) = 0;
|
virtual void SetMotionCommand(double linear_vel, double angular_vel) = 0;
|
||||||
virtual void SetLightCommand(LightMode f_mode, uint8_t f_value) = 0;
|
virtual void SetLightCommand(LightMode f_mode, uint8_t f_value) = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void ScoutRobot::EnableCommandedMode() { robot_->EnableCommandedMode(); }
|
|||||||
void ScoutRobot::Connect(std::string can_name) { robot_->Connect(can_name); }
|
void ScoutRobot::Connect(std::string can_name) { robot_->Connect(can_name); }
|
||||||
|
|
||||||
void ScoutRobot::Connect(std::string uart_name, uint32_t baudrate) {
|
void ScoutRobot::Connect(std::string uart_name, uint32_t baudrate) {
|
||||||
robot_->Connect(uart_name, baudrate);
|
// robot_->Connect(uart_name, baudrate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScoutRobot::ResetRobotState() { robot_->ResetRobotState(); }
|
void ScoutRobot::ResetRobotState() { robot_->ResetRobotState(); }
|
||||||
|
|||||||
Reference in New Issue
Block a user