소스 검색

refactor: 更新站立/趴下接口,使用sdk新接口

lujw2 1 개월 전
부모
커밋
6a97b13572
1개의 변경된 파일4개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 6
      saturn_controller/src/saturn_controller.cpp

+ 4 - 6
saturn_controller/src/saturn_controller.cpp

@@ -186,14 +186,12 @@ void SaturnController::robotCommandCallback(
     SPDLOG_INFO("stand or lie {}", common_status_data_.belie_or_stand);
     if (common_status_data_.belie_or_stand ==
         robot_control::common::BODY_POSTURE_STATE::STANDUP) {
-      result = rcClientInterfaceSetScene(
-          robot_control::common::CONTROL_SOURCE_MODE::nav_control,
-          common::SCENE_TYPE::LIE_DOWN);
+      result = rcClientInterfaceLieDownOrStandUp(
+          robot_control::common::CONTROL_SOURCE_MODE::nav_control, 0);
     } else if (common_status_data_.belie_or_stand ==
                robot_control::common::BODY_POSTURE_STATE::LIEDOWN) {
-      result = rcClientInterfaceSetScene(
-          robot_control::common::CONTROL_SOURCE_MODE::nav_control,
-          common::SCENE_TYPE::WALKING);
+      result = rcClientInterfaceLieDownOrStandUp(
+          robot_control::common::CONTROL_SOURCE_MODE::nav_control, 1);
     }
   } else if ("EnableNavigation" == request->comamnd_name) {
     common::CONTROL_SOURCE_MODE nav_joy;