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 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(); +} ///////////////////////////////////////////////////////////////////////////