Sfoglia il codice sorgente

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

lujw2 1 mese fa
parent
commit
6a97b13572
1 ha cambiato i file con 4 aggiunte e 6 eliminazioni
  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;