test:test all refactor code

This commit is contained in:
lgv 2026-07-01 10:41:43 +08:00
parent 94ee690796
commit 4654eee0c4
2 changed files with 19 additions and 17 deletions

View File

@ -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 {

View File

@ -67,8 +67,8 @@ ManualUiRunResult runManualUiTest(
std::vector<double> 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()));