From 4654eee0c4186539224a5b2eda99c1605b2eb7db Mon Sep 17 00:00:00 2001 From: lgv Date: Wed, 1 Jul 2026 10:41:43 +0800 Subject: [PATCH] test:test all refactor code --- cmvr-es/config/manager/device_manager.pb.txt | 14 ++++++------- cmvr-es/test/mujoco_manual_ui_test.cpp | 22 +++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/cmvr-es/config/manager/device_manager.pb.txt b/cmvr-es/config/manager/device_manager.pb.txt index 5a3ff6be..2c4ddc4f 100644 --- a/cmvr-es/config/manager/device_manager.pb.txt +++ b/cmvr-es/config/manager/device_manager.pb.txt @@ -7,28 +7,28 @@ device_manager { id: "mujoco_world" type: DEVICE_TYPE_MUJOCO_WORLD config_file: "devices/mujoco/mujoco_world.pb.txt" - enable: true + enable: false } devices { id: "mujoco_motors" type: DEVICE_TYPE_MOTOR_SYSTEM config_file: "devices/motor/mujoco_motors.pb.txt" - enable: true + enable: false } devices { id: "mujoco_right_arm" type: DEVICE_TYPE_ROBOT_ARM config_file: "devices/arm/arm_mujoco_qp.pb.txt" - enable: true + enable: false } devices { id: "mujoco_viewer" type: DEVICE_TYPE_MUJOCO_VIEWER config_file: "devices/mujoco/mujoco_viewer.pb.txt" - enable: true + enable: false } devices { @@ -49,7 +49,7 @@ device_manager { id: "cam5" type: DEVICE_TYPE_CAMERA config_file: "devices/camera/camera.pb.txt" - enable: true + enable: false } @@ -71,14 +71,14 @@ device_manager { id: "ti5_motors" type: DEVICE_TYPE_MOTOR_SYSTEM config_file: "devices/motor/ti5_motors.pb.txt" - enable: false + enable: true } devices { id: "right_arm" type: DEVICE_TYPE_ROBOT_ARM config_file: "devices/arm/arm.pb.txt" - enable: false + enable: true } devices { diff --git a/cmvr-es/test/mujoco_manual_ui_test.cpp b/cmvr-es/test/mujoco_manual_ui_test.cpp index a0773538..bbdf21d5 100644 --- a/cmvr-es/test/mujoco_manual_ui_test.cpp +++ b/cmvr-es/test/mujoco_manual_ui_test.cpp @@ -67,8 +67,8 @@ ManualUiRunResult runManualUiTest( std::vector q_target = {0, 1, 1.6, 1.6, -2.5, 0.12, 0.12}; cmvr::device::MotionOptions joint_options; - joint_options.velocity = 5.0; - joint_options.acceleration = 15.0; + joint_options.velocity = 1.0; + joint_options.acceleration = 5.0; joint_options.joint_velocity_limits.assign(7, 2.5); CMVR_LOG(INFO) << "[MujocoManualUiTest] moveJ " << arm_id; @@ -84,13 +84,13 @@ ManualUiRunResult runManualUiTest( std::this_thread::sleep_for(std::chrono::seconds(1)); auto move_l_target = arm->getTcpPose(cmvr::device::FrameType::Base); - move_l_target.z += 0.05; - // move_l_target.ry += 0.5; + // move_l_target.x += -0.1; + move_l_target.rz += -0.2; cmvr::device::MotionOptions cartesian_options; - cartesian_options.velocity = 0.01; - cartesian_options.acceleration = 10.0; - cartesian_options.jerk = 50.0; + cartesian_options.velocity = 0.1; + cartesian_options.acceleration = 5.0; + cartesian_options.jerk = 10.0; CMVR_LOG(INFO) << "[MujocoManualUiTest] moveL +X"; result = arm->moveL(move_l_target, cartesian_options, cmvr::device::FrameType::Base); @@ -172,6 +172,8 @@ ManualUiRunResult runManualUiTest( // } // (void)arm->stopL(10); + // std::this_thread::sleep_for(std::chrono::seconds(1000)); + return {}; } @@ -217,9 +219,9 @@ TEST(MujocoManualUiTest, RunMujocoArm) TEST(MujocoManualUiTest, RunRealArm) { - if (!shouldRunRealArmTest()) { - GTEST_SKIP() << "Set CMVR_RUN_REAL_ARM_TEST=1 to run the real arm manual UI test."; - } + // if (!shouldRunRealArmTest()) { + // GTEST_SKIP() << "Set CMVR_RUN_REAL_ARM_TEST=1 to run the real arm manual UI test."; + // } cmvr::Runtime runtime; ASSERT_TRUE(runtime.init(manualConfigPath()));