From e68ecdf5f140943aa052aa7f80dab07ff61446a2 Mon Sep 17 00:00:00 2001 From: Ruixiang Du Date: Tue, 5 Oct 2021 13:35:07 +0800 Subject: [PATCH] cleanup: cleaned up a few comments and types --- include/ugv_sdk/details/interface/agilex_message.h | 1 + include/ugv_sdk/details/interface/agilex_types.h | 6 +++--- include/ugv_sdk/details/robot_base/agilex_base.hpp | 10 ++-------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/include/ugv_sdk/details/interface/agilex_message.h b/include/ugv_sdk/details/interface/agilex_message.h index 8701dce..261b610 100644 --- a/include/ugv_sdk/details/interface/agilex_message.h +++ b/include/ugv_sdk/details/interface/agilex_message.h @@ -124,6 +124,7 @@ typedef struct { uint8_t driver_state; } ActuatorLSStateMessage; +// for ranger typedef struct { uint8_t motion_mode; uint8_t mode_changing; diff --git a/include/ugv_sdk/details/interface/agilex_types.h b/include/ugv_sdk/details/interface/agilex_types.h index 64fba5a..4e28c6d 100644 --- a/include/ugv_sdk/details/interface/agilex_types.h +++ b/include/ugv_sdk/details/interface/agilex_types.h @@ -29,9 +29,9 @@ typedef struct { } AgxLightOperation; typedef enum { - VehicleStateNormal = 0x00, - VehicleStateEStop = 0x01, - VehicleStateException = 0x02 + VEHICLE_STATE_NORMAL = 0x00, + VEHICLE_STATE_ESTOP = 0x01, + VEHICLE_STATE_EXCEPTION = 0x02 } AgxVehicleState; typedef enum { diff --git a/include/ugv_sdk/details/robot_base/agilex_base.hpp b/include/ugv_sdk/details/robot_base/agilex_base.hpp index a976f5c..b5bbeb6 100644 --- a/include/ugv_sdk/details/robot_base/agilex_base.hpp +++ b/include/ugv_sdk/details/robot_base/agilex_base.hpp @@ -4,12 +4,6 @@ * Created on: Dec 22, 2020 17:14 * Description: * - * Each robot class derived from this base class should provide implementation - * for the following two functions: - * - * - virtual void Connect(std::string dev_name) = 0; - * - virtual void ParseCANFrame(can_frame *rx_frame) = 0; - * * Copyright (c) 2020 Ruixiang Du (rdu) */ @@ -87,8 +81,8 @@ class AgilexBase : public RobotCommonInterface { msg.body.motion_command_msg.steering_angle = steering_angle; } - std::cout << "sending motion cmd: " << linear_vel << "," << angular_vel - << "," << lateral_vel << std::endl; + std::cout << "Sending motion cmd: " << linear_vel << ", " << angular_vel + << ", " << lateral_vel << std::endl; // send to can bus can_frame frame;