mirror of
https://github.com/westonrobot/ugv_sdk
synced 2023-04-08 06:32:14 +08:00
memory: fixed memory leak issue in scout mini omni wheel base
This commit is contained in:
@@ -39,6 +39,8 @@ struct RangerActuatorState {
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct RangerInterface {
|
||||
virtual ~RangerInterface() = default;
|
||||
|
||||
virtual bool Connect(std::string dev_name) = 0;
|
||||
|
||||
// robot control
|
||||
|
||||
@@ -45,7 +45,7 @@ struct CommonSensorStateMsgGroup {};
|
||||
|
||||
class RobotCommonInterface {
|
||||
public:
|
||||
~RobotCommonInterface() = default;
|
||||
virtual ~RobotCommonInterface() = default;
|
||||
|
||||
// functions to be implemented by class AgilexBase
|
||||
virtual void EnableCommandedMode() = 0;
|
||||
|
||||
@@ -23,7 +23,7 @@ template <typename ParserType>
|
||||
class ScoutBase : public AgilexBase<ParserType>, public ScoutInterface {
|
||||
public:
|
||||
ScoutBase() : AgilexBase<ParserType>(){};
|
||||
~ScoutBase() = default;
|
||||
virtual ~ScoutBase() = default;
|
||||
|
||||
// set up connection
|
||||
bool Connect(std::string can_name) override {
|
||||
|
||||
@@ -72,7 +72,8 @@ ScoutActuatorState ScoutRobot::GetActuatorState() {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ScoutMiniOmniRobot::ScoutMiniOmniRobot(ProtocolVersion protocol) {
|
||||
ScoutMiniOmniRobot::ScoutMiniOmniRobot(ProtocolVersion protocol)
|
||||
: ScoutRobot(ProtocolVersion::UNKONWN) {
|
||||
if (protocol == ProtocolVersion::AGX_V1) {
|
||||
robot_ = new ScoutMiniOmniBaseV1();
|
||||
} else if (protocol == ProtocolVersion::AGX_V2) {
|
||||
|
||||
Reference in New Issue
Block a user