From b0184f2084a633dba3ee6d26ee4c799d78cecd05 Mon Sep 17 00:00:00 2001 From: hanskw-weston Date: Mon, 5 Feb 2024 15:45:45 +0800 Subject: [PATCH 1/2] src: fix scout bms feedback interface --- .../ugv_sdk/details/interface/scout_interface.hpp | 1 + include/ugv_sdk/details/robot_base/scout_base.hpp | 12 ++++++++++++ include/ugv_sdk/mobile_robot/scout_robot.hpp | 1 + src/mobile_robot/scout_robot.cpp | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/include/ugv_sdk/details/interface/scout_interface.hpp b/include/ugv_sdk/details/interface/scout_interface.hpp index c552db87..38733df6 100644 --- a/include/ugv_sdk/details/interface/scout_interface.hpp +++ b/include/ugv_sdk/details/interface/scout_interface.hpp @@ -53,6 +53,7 @@ struct ScoutInterface { // get robot state virtual ScoutCoreState GetRobotState() = 0; virtual ScoutActuatorState GetActuatorState() = 0; + virtual ScoutCommonSensorState GetCommonSensorState() = 0; }; struct ScoutOmniInterface { diff --git a/include/ugv_sdk/details/robot_base/scout_base.hpp b/include/ugv_sdk/details/robot_base/scout_base.hpp index c567c0aa..36c998ac 100644 --- a/include/ugv_sdk/details/robot_base/scout_base.hpp +++ b/include/ugv_sdk/details/robot_base/scout_base.hpp @@ -71,6 +71,18 @@ class ScoutBase : public AgilexBase, public ScoutInterface { } return scout_actuator; } + + ScoutCommonSensorState GetCommonSensorState() override { + auto common_sensor = + AgilexBase::GetCommonSensorStateMsgGroup(); + + ScoutCommonSensorState scout_bms; + + scout_bms.time_stamp = common_sensor.time_stamp; + scout_bms.bms_basic_state = common_sensor.bms_basic_state; + + return scout_bms; + } }; template diff --git a/include/ugv_sdk/mobile_robot/scout_robot.hpp b/include/ugv_sdk/mobile_robot/scout_robot.hpp index b05259f8..33cb95c8 100644 --- a/include/ugv_sdk/mobile_robot/scout_robot.hpp +++ b/include/ugv_sdk/mobile_robot/scout_robot.hpp @@ -39,6 +39,7 @@ class ScoutRobot : public RobotCommonInterface, public ScoutInterface { // get robot state ScoutCoreState GetRobotState() override; ScoutActuatorState GetActuatorState() override; + ScoutCommonSensorState GetCommonSensorState() override; protected: RobotCommonInterface* robot_; diff --git a/src/mobile_robot/scout_robot.cpp b/src/mobile_robot/scout_robot.cpp index 050c16ca..1e6b63a9 100644 --- a/src/mobile_robot/scout_robot.cpp +++ b/src/mobile_robot/scout_robot.cpp @@ -72,6 +72,10 @@ ScoutActuatorState ScoutRobot::GetActuatorState() { auto scout = dynamic_cast(robot_); return scout->GetActuatorState(); } +ScoutCommonSensorState ScoutRobot::GetCommonSensorState() { + auto scout = dynamic_cast(robot_); + return scout->GetCommonSensorState(); +} /////////////////////////////////////////////////////////////////////////// From 20fdbe9735594f33ee4871538ec12bf19faa44a1 Mon Sep 17 00:00:00 2001 From: hanskw-weston Date: Mon, 5 Feb 2024 15:54:52 +0800 Subject: [PATCH 2/2] [Release] bump version to v0.6.0 --- CMakeLists.txt | 2 +- doxyfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7fffafa..1882e98a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5.1) -project(ugv_sdk VERSION 0.5.0) +project(ugv_sdk VERSION 0.6.0) find_program(CCACHE_PROGRAM ccache) if(CCACHE_PROGRAM) diff --git a/doxyfile b/doxyfile index 69d375bd..6e9be61d 100644 --- a/doxyfile +++ b/doxyfile @@ -32,13 +32,13 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = "My Project" +PROJECT_NAME = "ugv_sdk" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = "v0.6.0" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a