From 0ebce4d4bb5f1f88eb20262853901ebd4849543c Mon Sep 17 00:00:00 2001 From: lgv Date: Thu, 19 Nov 2026 18:59:59 +0800 Subject: [PATCH 1/3] fix(canbus): remove obsolete SocketCAN raw test --- cmvr-es/devices/canbus/CMakeLists.txt | 16 ---- .../socket/socket_can_client_raw_test.cc | 95 ------------------- 2 files changed, 111 deletions(-) delete mode 100644 cmvr-es/devices/canbus/can_client/socket/socket_can_client_raw_test.cc diff --git a/cmvr-es/devices/canbus/CMakeLists.txt b/cmvr-es/devices/canbus/CMakeLists.txt index 76b2a460..67ed448e 100644 --- a/cmvr-es/devices/canbus/CMakeLists.txt +++ b/cmvr-es/devices/canbus/CMakeLists.txt @@ -17,22 +17,6 @@ install(TARGETS canbus LIBRARY DESTINATION lib) # -------------------------------------------------------- # Unit test # -------------------------------------------------------- -add_executable(socket_can_client_raw_test - ${CMAKE_CURRENT_SOURCE_DIR}/can_client/socket/socket_can_client_raw_test.cc -) - - -target_link_libraries(socket_can_client_raw_test - PRIVATE - canbus - gtest - gtest_main - pthread - glog - cmvr_es::proto -) - - add_executable(protocol_data_test ${CMAKE_CURRENT_SOURCE_DIR}/can_comm/protocol_data_test.cc ) diff --git a/cmvr-es/devices/canbus/can_client/socket/socket_can_client_raw_test.cc b/cmvr-es/devices/canbus/can_client/socket/socket_can_client_raw_test.cc deleted file mode 100644 index 07bb3f20..00000000 --- a/cmvr-es/devices/canbus/can_client/socket/socket_can_client_raw_test.cc +++ /dev/null @@ -1,95 +0,0 @@ -#include "canbus/can_client/socket/socket_can_client_raw.h" -#include "canbus/can_comm/can_receiver.h" -#include "cmvr/msgs/robot_detail.pb.h" -#include "gtest/gtest.h" - -#include -#include - -namespace cmvr::device { - -// Test the production receive/timeout/stop paths without a CAN adapter, -// motor commands, or privileged vcan configuration. -class SocketCanClientRawTestPeer { -public: - static bool attach(SocketCanClientRaw& client, int fd) { - if (!client.configureReceiveTimeout(fd)) return false; - client.dev_handler_ = fd; - client.is_started_ = true; - return true; - } -}; - -class SocketCanReceiveTest : public testing::Test { -protected: - config::SocketCanConfig config; - SocketCanClientRaw client{config}; - int peer = -1; - void SetUp() override { - int sockets[2]; - ASSERT_EQ(::socketpair(AF_UNIX, SOCK_DGRAM, 0, sockets), 0); - peer = sockets[1]; - ASSERT_TRUE(SocketCanClientRawTestPeer::attach(client, sockets[0])); - } - void TearDown() override { - client.stop(); - if (peer >= 0) ::close(peer); - } -}; - -TEST_F(SocketCanReceiveTest, IdleReceiveReturnsZeroWithoutAnError) { - std::vector frames(1); - int32_t count = MAX_CAN_RECV_FRAME_LEN; - const auto start = std::chrono::steady_clock::now(); - EXPECT_EQ(client.receive(&frames, &count), msgs::ErrorCode::OK); - EXPECT_EQ(count, 0); - EXPECT_TRUE(frames.empty()); - EXPECT_LT(std::chrono::steady_clock::now() - start, std::chrono::milliseconds(500)); -} - -TEST_F(SocketCanReceiveTest, ReceivedFrameIsReturnedWithActualCount) { - can_frame input{}; - input.can_id = 0x141; - input.can_dlc = 8; - input.data[0] = 0x9A; - ASSERT_EQ(::write(peer, &input, sizeof(input)), sizeof(input)); - std::vector frames; - int32_t count = MAX_CAN_RECV_FRAME_LEN; - ASSERT_EQ(client.receive(&frames, &count), msgs::ErrorCode::OK); - ASSERT_EQ(count, 1); - ASSERT_EQ(frames.size(), 1U); - EXPECT_EQ(frames[0].id, 0x141); - EXPECT_EQ(frames[0].len, 8); - EXPECT_EQ(frames[0].data[0], 0x9A); -} - -TEST_F(SocketCanReceiveTest, ReceiverStopsOnAnIdleBusAndCanRestart) { - MessageManager manager; - CanReceiver receiver; - ASSERT_EQ(receiver.Init(&client, &manager, false), msgs::ErrorCode::OK); - for (int attempt = 0; attempt < 3; ++attempt) { - ASSERT_EQ(receiver.Start(), msgs::ErrorCode::OK); - std::this_thread::sleep_for(std::chrono::milliseconds(5)); - const auto start = std::chrono::steady_clock::now(); - receiver.Stop(); - EXPECT_LT(std::chrono::steady_clock::now() - start, std::chrono::milliseconds(500)); - EXPECT_FALSE(receiver.IsRunning()); - receiver.Stop(); - } -} - -TEST_F(SocketCanReceiveTest, ShortFrameIsRejectedAndStopIsIdempotent) { - const char byte = 0; - ASSERT_EQ(::write(peer, &byte, 1), 1); - std::vector frames; - int32_t count = 1; - EXPECT_EQ(client.receive(&frames, &count), msgs::ErrorCode::CAN_CLIENT_ERROR_RECV_FAILED); - EXPECT_EQ(count, 0); - EXPECT_TRUE(client.stop()); - EXPECT_TRUE(client.stop()); - count = 1; - EXPECT_EQ(client.receive(&frames, &count), msgs::ErrorCode::CAN_CLIENT_ERROR_RECV_FAILED); - EXPECT_EQ(count, 0); -} - -} // namespace cmvr::device From 45b01719e3498d85f6741c1bed83df99699dbbc4 Mon Sep 17 00:00:00 2001 From: lgv Date: Thu, 19 Nov 2026 19:00:19 +0800 Subject: [PATCH 2/3] feat(xiaozhao): split simulation and real device profiles --- cmvr-es/config/cmvr_es.pb.txt | 2 +- ..._arm.pb.txt => xiaozhao_mujoco_arm.pb.txt} | 12 +- ...ead.pb.txt => xiaozhao_mujoco_head.pb.txt} | 6 +- .../devices/arm/xiaozhao_tchl_arm.pb.txt | 330 ++++++++++++++++++ .../devices/camera/xiaozhao_camera.pb.txt | 59 ++-- .../camera/xiaozhao_mujoco_camera.pb.txt | 63 ++++ cmvr-es/config/devices/dexhand/dexhand.pb.txt | 2 +- ...s.pb.txt => xiaozhao_mujoco_motors.pb.txt} | 8 +- .../devices/motor/xiaozhao_tchl_motors.pb.txt | 92 +++++ ...ager.pb.txt => real_device_manager.pb.txt} | 123 ++----- .../config/manager/sim_device_manager.pb.txt | 96 +++++ cmvr-es/config/manager/task_manager.pb.txt | 6 +- .../self_collision_task_xiaozhao_left.pb.txt | 2 +- .../self_collision_task_xiaozhao_right.pb.txt | 2 +- .../touch_screen_task_xiaozhao_mujoco.pb.txt | 8 +- cmvr-es/devices/agv/seer_robokit/README.md | 4 +- .../src/realsense_camera_test.cpp | 2 +- .../src/touch_screen_task_test.cpp | 6 +- cmvr-es/test/mujoco_manual_ui_test.cpp | 3 + docs/ethercat_motor_tutorial.md | 2 +- model/README.md | 45 +-- model/xiaozhao/collision/README.md | 4 +- scripts/test_wait_network_devices.py | 21 +- scripts/wait_network_devices.py | 7 +- 24 files changed, 722 insertions(+), 183 deletions(-) rename cmvr-es/config/devices/arm/{xiaozhao_arm.pb.txt => xiaozhao_mujoco_arm.pb.txt} (97%) rename cmvr-es/config/devices/arm/{xiaozhao_head.pb.txt => xiaozhao_mujoco_head.pb.txt} (84%) create mode 100644 cmvr-es/config/devices/arm/xiaozhao_tchl_arm.pb.txt create mode 100644 cmvr-es/config/devices/camera/xiaozhao_mujoco_camera.pb.txt rename cmvr-es/config/devices/motor/{xiaozhao_motors.pb.txt => xiaozhao_mujoco_motors.pb.txt} (95%) create mode 100644 cmvr-es/config/devices/motor/xiaozhao_tchl_motors.pb.txt rename cmvr-es/config/manager/{device_manager.pb.txt => real_device_manager.pb.txt} (74%) create mode 100644 cmvr-es/config/manager/sim_device_manager.pb.txt diff --git a/cmvr-es/config/cmvr_es.pb.txt b/cmvr-es/config/cmvr_es.pb.txt index f5674fb8..77e4ea16 100644 --- a/cmvr-es/config/cmvr_es.pb.txt +++ b/cmvr-es/config/cmvr_es.pb.txt @@ -1,5 +1,5 @@ cmvr_es { logger_config_file: "logger/logger.pb.txt" - device_manager_config_file: "manager/device_manager.pb.txt" + device_manager_config_file: "manager/real_device_manager.pb.txt" task_manager_config_file: "manager/task_manager.pb.txt" } diff --git a/cmvr-es/config/devices/arm/xiaozhao_arm.pb.txt b/cmvr-es/config/devices/arm/xiaozhao_mujoco_arm.pb.txt similarity index 97% rename from cmvr-es/config/devices/arm/xiaozhao_arm.pb.txt rename to cmvr-es/config/devices/arm/xiaozhao_mujoco_arm.pb.txt index e99b6f4b..7975f168 100644 --- a/cmvr-es/config/devices/arm/xiaozhao_arm.pb.txt +++ b/cmvr-es/config/devices/arm/xiaozhao_mujoco_arm.pb.txt @@ -4,10 +4,10 @@ arm { robot_arms { - id: "xiaozhao_left_arm" + id: "xiaozhao_mujoco_left_arm" motor { - motor_system_id: "xiaozhao_left_arm_motors" - motor_group_ids: "xiaozhao_left_arm_motors" + motor_system_id: "xiaozhao_mujoco_left_arm_motors" + motor_group_ids: "xiaozhao_mujoco_left_arm_motors" dof: 7 joint_names: "joint1-left" joint_names: "joint2-left" @@ -167,10 +167,10 @@ arm { } robot_arms { - id: "xiaozhao_right_arm" + id: "xiaozhao_mujoco_right_arm" motor { - motor_system_id: "xiaozhao_right_arm_motors" - motor_group_ids: "xiaozhao_right_arm_motors" + motor_system_id: "xiaozhao_mujoco_right_arm_motors" + motor_group_ids: "xiaozhao_mujoco_right_arm_motors" dof: 7 joint_names: "joint1-right" joint_names: "joint2-right" diff --git a/cmvr-es/config/devices/arm/xiaozhao_head.pb.txt b/cmvr-es/config/devices/arm/xiaozhao_mujoco_head.pb.txt similarity index 84% rename from cmvr-es/config/devices/arm/xiaozhao_head.pb.txt rename to cmvr-es/config/devices/arm/xiaozhao_mujoco_head.pb.txt index 6803f199..465c7e9a 100644 --- a/cmvr-es/config/devices/arm/xiaozhao_head.pb.txt +++ b/cmvr-es/config/devices/arm/xiaozhao_mujoco_head.pb.txt @@ -2,11 +2,11 @@ # MoveJ 目标顺序为 neck-joint1、neck-joint2、neck-joint3,单位为弧度。 arm { robot_arms { - id: "xiaozhao_head" + id: "xiaozhao_mujoco_head" motor { - motor_system_id: "xiaozhao_head_motors" - motor_group_ids: "xiaozhao_head_motors" + motor_system_id: "xiaozhao_mujoco_head_motors" + motor_group_ids: "xiaozhao_mujoco_head_motors" dof: 3 joint_names: "neck-joint1" joint_names: "neck-joint2" diff --git a/cmvr-es/config/devices/arm/xiaozhao_tchl_arm.pb.txt b/cmvr-es/config/devices/arm/xiaozhao_tchl_arm.pb.txt new file mode 100644 index 00000000..c8faa407 --- /dev/null +++ b/cmvr-es/config/devices/arm/xiaozhao_tchl_arm.pb.txt @@ -0,0 +1,330 @@ +# 小赵 TCHL 实机双臂配置,所有关节位置使用 rad。 +# TCP 与第七连杆同向,局部偏移左 (0.007, 0.23, -0.045) m、右 (0.007, -0.23, -0.045) m。 +# 两臂分别规划 MoveP。关节路径碰撞检测的最小间距为 10 mm。 +arm { + robot_arms { + id: "xiaozhao_tchl_right_arm" + motor { + motor_system_id: "xiaozhao_tchl_motors" + motor_group_ids: "xiaozhao_tchl_motors" + dof: 7 + joint_names: "joint1-right" + joint_names: "joint2-right" + joint_names: "joint3-right" + joint_names: "joint4-right" + joint_names: "joint5-right" + joint_names: "joint6-right" + joint_names: "joint7-right" + upd_freq: 1000 + buffer_size: 50 + default_vel: 0.5 + default_acc: 2.0 + } + kinematics { + pinocchio_qp_ik_solver { + urdf_path: "model/xiaozhao/urdf/xiaozhao.urdf" + base_frame_name: "base_link" + flange_frame_name: "link7-right" + tcp_frame_name: "tcp-right" + lambda: 1e-4 + w_posrot: 0.5 + max_iters: 100 + tol: 1e-6 + qp_time_limit: 1e-2 + joint_limit_policy { + limits { + enable: true + source: JOINT_LIMIT_SOURCE_CUSTOM + joints { joint_name: "joint1-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint2-right" q_lb: -1.57 q_ub: 1.57 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint3-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint4-right" q_lb: -2.35 q_ub: 0 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint5-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint6-right" q_lb: -0.45 q_ub: 0.785 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint7-right" q_lb: -1.05 q_ub: 1.05 qd: 1.0 qdd: 5.0 } + } + soft_limit { + enable: true + margin_ratio: 0.01 + min_margin_rad: 0.01 + } + avoidance { + enable: false + } + } + } + } + motion { + joint_path { + algorithm: RRT_CONNECT + rrt_connect { + timeout_s: 2.0 + range_rad: 0.2 + collision_check_step_rad: 0.02 + } + collision_checker { + urdf_path: "model/xiaozhao/collision/xiaozhao_collision.urdf" + ignored_pairs { first: "link5-right" second: "link7-right" } + } + minimum_distance_m: 0.01 + } + joint_trajectory_smoother { + sample_period_s: 0.001 + quintic_bspline { + control_point_spacing_rad: 0.05 + } + } + move_j { + settle_timeout_s: 3.0 + settle_position_tolerance_rad: 0.002 + settle_velocity_tolerance_rad_s: 0.02 + settle_stable_sample_count: 3 + } + move_l { + pinocchio_cartesian_motion_planner { + sample_period_s: 0.001 + position_gain: 4.0 + rotation_gain: 4.0 + line_deviation_check { + enable: true + line_deviation_warn_m: 0.01 + line_deviation_stop_m: 0.03 + line_direction_warn_deg: 20.0 + line_direction_stop_deg: 45.0 + line_direction_reset_deg: 10.0 + line_check_min_distance_m: 0.005 + } + joint_continuity_check { + enable: true + max_joint_delta_rad: 0.05 + max_joint_velocity_rad_s: 1.0 + max_joint_acceleration_rad_s2: 5.0 + } + cartesian_step_feasibility_check { + enable: true + min_linear_speed_ratio: 0.2 + max_linear_direction_deviation_deg: 10.0 + min_angular_speed_ratio: 0.2 + max_angular_direction_deviation_deg: 10.0 + min_desired_linear_speed: 1e-4 + min_desired_angular_speed: 1e-4 + } + } + } + speed_l { + pinocchio_cartesian_motion_planner { + linear_velocity_max: 0.1 + linear_acceleration_max: 0.5 + linear_jerk_max: 5.0 + angular_velocity_max: 0.5 + angular_acceleration_max: 2.0 + angular_jerk_max: 10.0 + linear_target_replan_threshold: 1e-4 + angular_target_replan_threshold: 1e-4 + enforce_joint_acceleration_limits: true + adaptive_speed { + enable: true + lookahead_s: 0.15 + min_speed_ratio: 0.10 + } + line_deviation_check { + enable: true + line_deviation_warn_m: 0.01 + line_deviation_stop_m: 0.03 + line_direction_warn_deg: 20.0 + line_direction_stop_deg: 45.0 + line_direction_reset_deg: 10.0 + line_check_min_distance_m: 0.005 + } + joint_velocity_check { + enable: true + max_joint_velocity_rad_s: 1.0 + max_joint_acceleration_rad_s2: 5.0 + } + cartesian_velocity_feasibility_check { + enable: true + min_linear_speed_ratio: 0.2 + max_linear_direction_deviation_deg: 10.0 + min_angular_speed_ratio: 0.2 + max_angular_direction_deviation_deg: 10.0 + min_desired_linear_speed: 0.01 + min_desired_angular_speed: 1e-4 + } + } + speed_l_controller { + cartesian_velocity_controller { + control_period_s: 0.001 + stop_twist_norm: 1e-9 + stop_command_velocity_norm: 1e-3 + stop_measured_velocity_norm: 1e-2 + stop_acceleration: 2.0 + stop_timeout_s: 2.0 + } + } + } + } + } + + robot_arms { + id: "xiaozhao_tchl_left_arm" + motor { + motor_system_id: "xiaozhao_tchl_motors" + motor_group_ids: "xiaozhao_tchl_motors" + dof: 7 + joint_names: "joint1-left" + joint_names: "joint2-left" + joint_names: "joint3-left" + joint_names: "joint4-left" + joint_names: "joint5-left" + joint_names: "joint6-left" + joint_names: "joint7-left" + upd_freq: 1000 + buffer_size: 50 + default_vel: 0.5 + default_acc: 2.0 + } + kinematics { + pinocchio_qp_ik_solver { + urdf_path: "model/xiaozhao/urdf/xiaozhao.urdf" + base_frame_name: "base_link" + flange_frame_name: "link7-left" + tcp_frame_name: "tcp-left" + lambda: 1e-4 + w_posrot: 0.5 + max_iters: 100 + tol: 1e-6 + qp_time_limit: 1e-2 + joint_limit_policy { + limits { + enable: true + source: JOINT_LIMIT_SOURCE_CUSTOM + joints { joint_name: "joint1-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint2-left" q_lb: -1.57 q_ub: 1.57 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint3-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint4-left" q_lb: 0 q_ub: 2.35 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint5-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint6-left" q_lb: -0.785 q_ub: 0.45 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint7-left" q_lb: -1.05 q_ub: 1.05 qd: 1.0 qdd: 5.0 } + } + soft_limit { + enable: true + margin_ratio: 0.01 + min_margin_rad: 0.01 + } + avoidance { + enable: false + } + } + } + } + motion { + joint_path { + algorithm: RRT_CONNECT + rrt_connect { + timeout_s: 2.0 + range_rad: 0.2 + collision_check_step_rad: 0.02 + } + collision_checker { + urdf_path: "model/xiaozhao/collision/xiaozhao_collision.urdf" + ignored_pairs { first: "link5-left" second: "link7-left" } + } + minimum_distance_m: 0.01 + } + joint_trajectory_smoother { + sample_period_s: 0.001 + quintic_bspline { + control_point_spacing_rad: 0.05 + } + } + move_j { + settle_timeout_s: 3.0 + settle_position_tolerance_rad: 0.002 + settle_velocity_tolerance_rad_s: 0.02 + settle_stable_sample_count: 3 + } + move_l { + pinocchio_cartesian_motion_planner { + sample_period_s: 0.001 + position_gain: 4.0 + rotation_gain: 4.0 + line_deviation_check { + enable: true + line_deviation_warn_m: 0.01 + line_deviation_stop_m: 0.03 + line_direction_warn_deg: 20.0 + line_direction_stop_deg: 45.0 + line_direction_reset_deg: 10.0 + line_check_min_distance_m: 0.005 + } + joint_continuity_check { + enable: true + max_joint_delta_rad: 0.05 + max_joint_velocity_rad_s: 1.0 + max_joint_acceleration_rad_s2: 5.0 + } + cartesian_step_feasibility_check { + enable: true + min_linear_speed_ratio: 0.2 + max_linear_direction_deviation_deg: 10.0 + min_angular_speed_ratio: 0.2 + max_angular_direction_deviation_deg: 10.0 + min_desired_linear_speed: 1e-4 + min_desired_angular_speed: 1e-4 + } + } + } + speed_l { + pinocchio_cartesian_motion_planner { + linear_velocity_max: 0.1 + linear_acceleration_max: 0.5 + linear_jerk_max: 5.0 + angular_velocity_max: 0.5 + angular_acceleration_max: 2.0 + angular_jerk_max: 10.0 + linear_target_replan_threshold: 1e-4 + angular_target_replan_threshold: 1e-4 + enforce_joint_acceleration_limits: true + adaptive_speed { + enable: true + lookahead_s: 0.15 + min_speed_ratio: 0.10 + } + line_deviation_check { + enable: true + line_deviation_warn_m: 0.01 + line_deviation_stop_m: 0.03 + line_direction_warn_deg: 20.0 + line_direction_stop_deg: 45.0 + line_direction_reset_deg: 10.0 + line_check_min_distance_m: 0.005 + } + joint_velocity_check { + enable: true + max_joint_velocity_rad_s: 1.0 + max_joint_acceleration_rad_s2: 5.0 + } + cartesian_velocity_feasibility_check { + enable: true + min_linear_speed_ratio: 0.2 + max_linear_direction_deviation_deg: 10.0 + min_angular_speed_ratio: 0.2 + max_angular_direction_deviation_deg: 10.0 + min_desired_linear_speed: 0.01 + min_desired_angular_speed: 1e-4 + } + } + speed_l_controller { + cartesian_velocity_controller { + control_period_s: 0.001 + stop_twist_norm: 1e-9 + stop_command_velocity_norm: 1e-3 + stop_measured_velocity_norm: 1e-2 + stop_acceleration: 2.0 + stop_timeout_s: 2.0 + } + } + } + } + } +} diff --git a/cmvr-es/config/devices/camera/xiaozhao_camera.pb.txt b/cmvr-es/config/devices/camera/xiaozhao_camera.pb.txt index 8a88213d..f319a831 100644 --- a/cmvr-es/config/devices/camera/xiaozhao_camera.pb.txt +++ b/cmvr-es/config/devices/camera/xiaozhao_camera.pb.txt @@ -1,63 +1,50 @@ -# xiaozhao 触屏仿真相机。手相机保持 1280x720 点击像素坐标。 -# 头部相机使用 2560x1440,提高 16 mm 屏幕 Tag 的像素尺寸与姿态估计稳定性。 +# 小赵实机相机。每路使用该安装位置对应的 RealSense 序列号。 camera { cameras { - id: "mujoco_hand_cam" - mujoco { - world_id: "mujoco_world" - camera_name: "hand_cam" - render { + id: "head_carme" + realsense { + serialNumber: "243122075389" + camera_mode: CAMERA_MODE_VIDEO + capture { width: 1280 height: 720 fps: 30 - stream_mode: STREAM_MODE_RGBD + stream_mode: STREAM_MODE_RGB } encoder { - width: 480 - height: 320 + width: 640 + height: 360 fps: 30 codec: "H264" enable_stream_timestamp: true buffer_size: 30 } - consume_new_frame_only: false - viewer_pip { - enable: false - left: -10 - bottom: 10 - width: 320 - height: 180 - } + align_mode: ALIGN_MODE_COLOR + sync: false } } cameras { - id: "mujoco_external_touch_cam" - mujoco { - world_id: "mujoco_world" - camera_name: "external_touch_cam" - render { - width: 2560 - height: 1440 + id: "right_hand_carme" + realsense { + serialNumber: "263122071711" + camera_mode: CAMERA_MODE_VIDEO + capture { + width: 1280 + height: 720 fps: 30 - stream_mode: STREAM_MODE_RGBD + stream_mode: STREAM_MODE_RGB } encoder { - width: 480 - height: 320 + width: 640 + height: 360 fps: 30 codec: "H264" enable_stream_timestamp: true buffer_size: 30 } - consume_new_frame_only: false - viewer_pip { - enable: false - left: 10 - bottom: 10 - width: 320 - height: 180 - } + align_mode: ALIGN_MODE_COLOR + sync: false } } } diff --git a/cmvr-es/config/devices/camera/xiaozhao_mujoco_camera.pb.txt b/cmvr-es/config/devices/camera/xiaozhao_mujoco_camera.pb.txt new file mode 100644 index 00000000..250c99ff --- /dev/null +++ b/cmvr-es/config/devices/camera/xiaozhao_mujoco_camera.pb.txt @@ -0,0 +1,63 @@ +# xiaozhao 触屏仿真相机。手相机保持 1280x720 点击像素坐标。 +# 头部相机使用 2560x1440,提高 16 mm 屏幕 Tag 的像素尺寸与姿态估计稳定性。 +camera { + cameras { + id: "xiaozhao_mujoco_hand_cam" + mujoco { + world_id: "mujoco_world" + camera_name: "hand_cam" + render { + width: 1280 + height: 720 + fps: 30 + stream_mode: STREAM_MODE_RGBD + } + encoder { + width: 480 + height: 320 + fps: 30 + codec: "H264" + enable_stream_timestamp: true + buffer_size: 30 + } + consume_new_frame_only: false + viewer_pip { + enable: false + left: -10 + bottom: 10 + width: 320 + height: 180 + } + } + } + + cameras { + id: "xiaozhao_mujoco_external_touch_cam" + mujoco { + world_id: "mujoco_world" + camera_name: "external_touch_cam" + render { + width: 2560 + height: 1440 + fps: 30 + stream_mode: STREAM_MODE_RGBD + } + encoder { + width: 480 + height: 320 + fps: 30 + codec: "H264" + enable_stream_timestamp: true + buffer_size: 30 + } + consume_new_frame_only: false + viewer_pip { + enable: false + left: 10 + bottom: 10 + width: 320 + height: 180 + } + } + } +} diff --git a/cmvr-es/config/devices/dexhand/dexhand.pb.txt b/cmvr-es/config/devices/dexhand/dexhand.pb.txt index 1cd6e8f9..f2260be1 100644 --- a/cmvr-es/config/devices/dexhand/dexhand.pb.txt +++ b/cmvr-es/config/devices/dexhand/dexhand.pb.txt @@ -12,7 +12,7 @@ dexhand { } # LiteS001 uses the same six-axis OYMotion CAN control protocol as AP001, - # but it has no tactile sensor matrix. Add this id to device_manager.pb.txt + # but it has no tactile sensor matrix. Add this id to real_device_manager.pb.txt # when the LiteS001 is installed; do not enable it together with AP001 when # both entries address the same physical CAN hand id. dexhands { diff --git a/cmvr-es/config/devices/motor/xiaozhao_motors.pb.txt b/cmvr-es/config/devices/motor/xiaozhao_mujoco_motors.pb.txt similarity index 95% rename from cmvr-es/config/devices/motor/xiaozhao_motors.pb.txt rename to cmvr-es/config/devices/motor/xiaozhao_mujoco_motors.pb.txt index 834534dc..eb3b818e 100644 --- a/cmvr-es/config/devices/motor/xiaozhao_motors.pb.txt +++ b/cmvr-es/config/devices/motor/xiaozhao_mujoco_motors.pb.txt @@ -1,10 +1,10 @@ # MuJoCo 仿真限值:位置范围与 xiaozhao/config/joint_limits.csv 一致。 # URDF 的 velocity/effort 为占位值,速度和加速度在这里显式设置。 motor { - id: "xiaozhao_motors" + id: "xiaozhao_mujoco_motors" motor_groups { - id: "xiaozhao_left_arm_motors" + id: "xiaozhao_mujoco_left_arm_motors" bus_type: MOTOR_BUS_MUJOCO vendor: MOTOR_VENDOR_MUJOCO protocol: MOTOR_PROTOCOL_MUJOCO @@ -34,7 +34,7 @@ motor { } motor_groups { - id: "xiaozhao_right_arm_motors" + id: "xiaozhao_mujoco_right_arm_motors" bus_type: MOTOR_BUS_MUJOCO vendor: MOTOR_VENDOR_MUJOCO protocol: MOTOR_PROTOCOL_MUJOCO @@ -64,7 +64,7 @@ motor { } motor_groups { - id: "xiaozhao_head_motors" + id: "xiaozhao_mujoco_head_motors" bus_type: MOTOR_BUS_MUJOCO vendor: MOTOR_VENDOR_MUJOCO protocol: MOTOR_PROTOCOL_MUJOCO diff --git a/cmvr-es/config/devices/motor/xiaozhao_tchl_motors.pb.txt b/cmvr-es/config/devices/motor/xiaozhao_tchl_motors.pb.txt new file mode 100644 index 00000000..1f423512 --- /dev/null +++ b/cmvr-es/config/devices/motor/xiaozhao_tchl_motors.pb.txt @@ -0,0 +1,92 @@ +# 双臂共用一个 EtherCAT 主站。接线、编码器计数和减速比沿用 TCHL 双臂模板。 +# 启用前按实机核对从站顺序、关节方向、零位、编码器计数、减速比和限位。 +motor { + id: "xiaozhao_tchl_motors" + + motor_groups { + id: "xiaozhao_tchl_motors" + bus_type: MOTOR_BUS_ETHERCAT + vendor: MOTOR_VENDOR_TCHL + protocol: MOTOR_PROTOCOL_ETHERCAT_CIA402 + + ethercat { + master_index: 0 + cycle_us: 1000 + slave_op_timeout_ms: 12000 + slave_state_poll_period_ms: 10 + + cia402 { + state_transition_timeout_ms: 1200 + velocity_stop_timeout_ms: 2000 + status_poll_period_ms: 10 + stopped_velocity_tolerance_rad_s: 0.001 + } + + zero_calibration { + timeout_ms: 2000 + poll_period_ms: 10 + stable_sample_count: 5 + position_tolerance_counts: 10000 + stable_delta_counts: 1000 + } + + dc { + enable: false + } + + # 分线器位于位置 0。端口 1 接右臂,J1 到 J7 对应位置 1 到 7。 + slaves { motor_id: 1 alias: 0 position: 1 } + slaves { motor_id: 2 alias: 0 position: 2 } + slaves { motor_id: 3 alias: 0 position: 3 } + slaves { motor_id: 4 alias: 0 position: 4 } + slaves { motor_id: 5 alias: 0 position: 5 } + slaves { motor_id: 6 alias: 0 position: 6 } + slaves { motor_id: 7 alias: 0 position: 7 } + # 端口 2 接左臂,J1 到 J7 对应位置 8 到 14。 + slaves { motor_id: 8 alias: 0 position: 8 } + slaves { motor_id: 9 alias: 0 position: 9 } + slaves { motor_id: 10 alias: 0 position: 10 } + slaves { motor_id: 11 alias: 0 position: 11 } + slaves { motor_id: 12 alias: 0 position: 12 } + slaves { motor_id: 13 alias: 0 position: 13 } + slaves { motor_id: 14 alias: 0 position: 14 } + } + + # 初始软件限位沿用小赵模型。位置、速度和加速度分别使用 rad、rad/s 和 rad/s²。 + joint_limits { + enable: true + source: JOINT_LIMIT_SOURCE_CUSTOM + joints { joint_name: "joint1-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint2-right" q_lb: -1.57 q_ub: 1.57 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint3-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint4-right" q_lb: -2.35 q_ub: 0 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint5-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint6-right" q_lb: -0.45 q_ub: 0.785 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint7-right" q_lb: -1.05 q_ub: 1.05 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint1-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint2-left" q_lb: -1.57 q_ub: 1.57 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint3-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint4-left" q_lb: 0 q_ub: 2.35 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint5-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint6-left" q_lb: -0.785 q_ub: 0.45 qd: 1.0 qdd: 5.0 } + joints { joint_name: "joint7-left" q_lb: -1.05 q_ub: 1.05 qd: 1.0 qdd: 5.0 } + } + + motors { + motors { id: 1 joint_name: "joint1-right" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 2 joint_name: "joint2-right" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 3 joint_name: "joint3-right" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 4 joint_name: "joint4-right" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 5 joint_name: "joint5-right" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 6 joint_name: "joint6-right" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 7 joint_name: "joint7-right" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 8 joint_name: "joint1-left" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 9 joint_name: "joint2-left" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 10 joint_name: "joint3-left" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 11 joint_name: "joint4-left" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 12 joint_name: "joint5-left" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 13 joint_name: "joint6-left" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + motors { id: 14 joint_name: "joint7-left" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } + } + } +} diff --git a/cmvr-es/config/manager/device_manager.pb.txt b/cmvr-es/config/manager/real_device_manager.pb.txt similarity index 74% rename from cmvr-es/config/manager/device_manager.pb.txt rename to cmvr-es/config/manager/real_device_manager.pb.txt index 6278ca46..5ad13e95 100644 --- a/cmvr-es/config/manager/device_manager.pb.txt +++ b/cmvr-es/config/manager/real_device_manager.pb.txt @@ -2,86 +2,15 @@ device_manager { name: "cmvr_es" version: "0.1" description: "cmvr edge system version 0.1" - # xiaozhao 双臂、颈部与右臂触屏仿真:先创建 world,再创建电机、机械臂、viewer 和传感器。 devices { - id: "mujoco_world" - type: DEVICE_TYPE_MUJOCO_WORLD - config_file: "devices/mujoco/xiaozhao_world.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_left_arm_motors" - type: DEVICE_TYPE_MOTOR_SYSTEM - config_file: "devices/motor/xiaozhao_motors.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_right_arm_motors" - type: DEVICE_TYPE_MOTOR_SYSTEM - config_file: "devices/motor/xiaozhao_motors.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_head_motors" - type: DEVICE_TYPE_MOTOR_SYSTEM - config_file: "devices/motor/xiaozhao_motors.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_left_arm" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/xiaozhao_arm.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_right_arm" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/xiaozhao_arm.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_head" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/xiaozhao_head.pb.txt" - enable: false - } - - devices { - id: "right_arm_mujoco_motors" - type: DEVICE_TYPE_MOTOR_SYSTEM - config_file: "devices/motor/mujoco_motors.pb.txt" - enable: false - } - - devices { - id: "mujoco_right_arm" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/arm_mujoco_qp.pb.txt" - enable: false - } - - devices { - id: "mujoco_viewer" - type: DEVICE_TYPE_MUJOCO_VIEWER - config_file: "devices/mujoco/mujoco_viewer.pb.txt" - enable: false - } - - devices { - id: "mujoco_hand_cam" + id: "head_carme" type: DEVICE_TYPE_CAMERA config_file: "devices/camera/xiaozhao_camera.pb.txt" enable: false } devices { - id: "mujoco_external_touch_cam" + id: "right_hand_carme" type: DEVICE_TYPE_CAMERA config_file: "devices/camera/xiaozhao_camera.pb.txt" enable: false @@ -94,13 +23,12 @@ device_manager { enable: false } - devices { - id: "left_hand_cam" - type: DEVICE_TYPE_CAMERA - config_file: "devices/camera/camera.pb.txt" - enable: false - } - + devices { + id: "left_hand_cam" + type: DEVICE_TYPE_CAMERA + config_file: "devices/camera/camera.pb.txt" + enable: false + } devices { id: "right_hand_ap001" @@ -130,13 +58,6 @@ device_manager { enable: false } - devices { - id: "mujoco_zero_touch" - type: DEVICE_TYPE_TOUCH - config_file: "devices/touch/touch.pb.txt" - enable: false - } - devices { id: "left_arm_can_motors" type: DEVICE_TYPE_MOTOR_SYSTEM @@ -277,30 +198,56 @@ device_manager { enable: false } + # 小赵实机双臂共用一个 TCHL EtherCAT 电机组。 + devices { + id: "xiaozhao_tchl_motors" + type: DEVICE_TYPE_MOTOR_SYSTEM + config_file: "devices/motor/xiaozhao_tchl_motors.pb.txt" + enable: true + } + + devices { + id: "xiaozhao_tchl_right_arm" + type: DEVICE_TYPE_ROBOT_ARM + config_file: "devices/arm/xiaozhao_tchl_arm.pb.txt" + enable: true + } + + devices { + id: "xiaozhao_tchl_left_arm" + type: DEVICE_TYPE_ROBOT_ARM + config_file: "devices/arm/xiaozhao_tchl_arm.pb.txt" + enable: true + } + devices { id: "tchl_single_axis" type: DEVICE_TYPE_MOTOR_SYSTEM config_file: "devices/motor/tchl_motors.pb.txt" enable: false } + devices { id: "lingkong_can_motors" type: DEVICE_TYPE_MOTOR_SYSTEM config_file: "devices/motor/lingkong_motors.pb.txt" enable: false } + devices { id: "lingkong_arm" type: DEVICE_TYPE_ROBOT_ARM config_file: "devices/arm/lingkong_arm.pb.txt" enable: false } + devices { id: "tchl_joint_motors" type: DEVICE_TYPE_MOTOR_SYSTEM config_file: "devices/motor/tchl_multi_motors.pb.txt" enable: false } + devices { id: "tchl_arm" type: DEVICE_TYPE_ROBOT_ARM @@ -315,12 +262,14 @@ device_manager { config_file: "devices/motor/lingkong_mixed_motors.pb.txt" enable: false } + devices { id: "lingkong_mixed_arm" type: DEVICE_TYPE_ROBOT_ARM config_file: "devices/arm/lingkong_mixed_arm.pb.txt" enable: false } + devices { id: "usb_head" type: DEVICE_TYPE_BIO_HEAD_ROBOT diff --git a/cmvr-es/config/manager/sim_device_manager.pb.txt b/cmvr-es/config/manager/sim_device_manager.pb.txt new file mode 100644 index 00000000..41edb54a --- /dev/null +++ b/cmvr-es/config/manager/sim_device_manager.pb.txt @@ -0,0 +1,96 @@ +device_manager { + name: "cmvr_es" + version: "0.1" + description: "cmvr edge system version 0.1" + # xiaozhao 双臂、颈部与右臂触屏仿真:先创建 world,再创建电机、机械臂、viewer 和传感器。 + devices { + id: "mujoco_world" + type: DEVICE_TYPE_MUJOCO_WORLD + config_file: "devices/mujoco/xiaozhao_world.pb.txt" + enable: false + } + + devices { + id: "xiaozhao_mujoco_left_arm_motors" + type: DEVICE_TYPE_MOTOR_SYSTEM + config_file: "devices/motor/xiaozhao_mujoco_motors.pb.txt" + enable: false + } + + devices { + id: "xiaozhao_mujoco_right_arm_motors" + type: DEVICE_TYPE_MOTOR_SYSTEM + config_file: "devices/motor/xiaozhao_mujoco_motors.pb.txt" + enable: false + } + + devices { + id: "xiaozhao_mujoco_head_motors" + type: DEVICE_TYPE_MOTOR_SYSTEM + config_file: "devices/motor/xiaozhao_mujoco_motors.pb.txt" + enable: false + } + + devices { + id: "xiaozhao_mujoco_left_arm" + type: DEVICE_TYPE_ROBOT_ARM + config_file: "devices/arm/xiaozhao_mujoco_arm.pb.txt" + enable: false + } + + devices { + id: "xiaozhao_mujoco_right_arm" + type: DEVICE_TYPE_ROBOT_ARM + config_file: "devices/arm/xiaozhao_mujoco_arm.pb.txt" + enable: false + } + + devices { + id: "xiaozhao_mujoco_head" + type: DEVICE_TYPE_ROBOT_ARM + config_file: "devices/arm/xiaozhao_mujoco_head.pb.txt" + enable: false + } + + devices { + id: "right_arm_mujoco_motors" + type: DEVICE_TYPE_MOTOR_SYSTEM + config_file: "devices/motor/mujoco_motors.pb.txt" + enable: false + } + + devices { + id: "mujoco_right_arm" + type: DEVICE_TYPE_ROBOT_ARM + config_file: "devices/arm/arm_mujoco_qp.pb.txt" + enable: false + } + + devices { + id: "mujoco_viewer" + type: DEVICE_TYPE_MUJOCO_VIEWER + config_file: "devices/mujoco/mujoco_viewer.pb.txt" + enable: false + } + + devices { + id: "xiaozhao_mujoco_hand_cam" + type: DEVICE_TYPE_CAMERA + config_file: "devices/camera/xiaozhao_mujoco_camera.pb.txt" + enable: false + } + + devices { + id: "xiaozhao_mujoco_external_touch_cam" + type: DEVICE_TYPE_CAMERA + config_file: "devices/camera/xiaozhao_mujoco_camera.pb.txt" + enable: false + } + + devices { + id: "mujoco_zero_touch" + type: DEVICE_TYPE_TOUCH + config_file: "devices/touch/touch.pb.txt" + enable: false + } +} diff --git a/cmvr-es/config/manager/task_manager.pb.txt b/cmvr-es/config/manager/task_manager.pb.txt index a95113c1..b9c0796f 100644 --- a/cmvr-es/config/manager/task_manager.pb.txt +++ b/cmvr-es/config/manager/task_manager.pb.txt @@ -6,7 +6,7 @@ task_manager { run_mode: TASK_RUN_MODE_PERIODIC_STEP control_period_s: 0.001 config_file: "tasks/touch_screen_task/touch_screen_task_xiaozhao_mujoco.pb.txt" - enable: true + enable: false } tasks { id: "grpc_server" @@ -23,7 +23,7 @@ task_manager { config_file: "tasks/self_collision_task/self_collision_task.pb.txt" enable: false } - # 小赵 MuJoCo 当前仅启用右臂实时自碰撞监控。 + # 小赵 MuJoCo 实时自碰撞监控。 tasks { id: "xiaozhao_left_arm_self_collision" type: TASK_TYPE_SELF_COLLISION @@ -38,7 +38,7 @@ task_manager { run_mode: TASK_RUN_MODE_PERIODIC_STEP control_period_s: 0.002 config_file: "tasks/self_collision_task/self_collision_task_xiaozhao_right.pb.txt" - enable: true + enable: false } tasks { id: "quic_edge" diff --git a/cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_left.pb.txt b/cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_left.pb.txt index fc092a6c..0e48e426 100644 --- a/cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_left.pb.txt +++ b/cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_left.pb.txt @@ -1,7 +1,7 @@ # 小赵左臂独立自碰撞检测:仅本臂 + 固定 base,排除另一臂与活动头部。 self_collision_task { id: "xiaozhao_left_arm_self_collision" - arm_id: "xiaozhao_left_arm" + arm_id: "xiaozhao_mujoco_left_arm" checker { urdf_path: "model/xiaozhao/collision/xiaozhao_collision.urdf" diff --git a/cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_right.pb.txt b/cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_right.pb.txt index c2f0f679..798d4d57 100644 --- a/cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_right.pb.txt +++ b/cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_right.pb.txt @@ -1,7 +1,7 @@ # 小赵右臂独立自碰撞检测:仅本臂 + 固定 base,排除另一臂与活动头部。 self_collision_task { id: "xiaozhao_right_arm_self_collision" - arm_id: "xiaozhao_right_arm" + arm_id: "xiaozhao_mujoco_right_arm" checker { urdf_path: "model/xiaozhao/collision/xiaozhao_collision.urdf" diff --git a/cmvr-es/config/tasks/touch_screen_task/touch_screen_task_xiaozhao_mujoco.pb.txt b/cmvr-es/config/tasks/touch_screen_task/touch_screen_task_xiaozhao_mujoco.pb.txt index f9f31711..f66ed3ef 100644 --- a/cmvr-es/config/tasks/touch_screen_task/touch_screen_task_xiaozhao_mujoco.pb.txt +++ b/cmvr-es/config/tasks/touch_screen_task/touch_screen_task_xiaozhao_mujoco.pb.txt @@ -7,13 +7,13 @@ touch_screen_task { debug_coordinate_axis_length_m: 0.02 devices { - arm_id: "xiaozhao_right_arm" - head_id: "xiaozhao_head" + arm_id: "xiaozhao_mujoco_right_arm" + head_id: "xiaozhao_mujoco_head" # ZeroSimTouch 始终返回零力,用于测试无接触时的前进限距和回撤流程。 touch_id: "mujoco_zero_touch" # 手部相机和外部相机的 DeviceManager ID。 - camera_id: "mujoco_hand_cam" - external_camera_id: "mujoco_external_touch_cam" + camera_id: "xiaozhao_mujoco_hand_cam" + external_camera_id: "xiaozhao_mujoco_external_touch_cam" } # 任务 init() 时同步执行一次头部 MoveJ,到位后任务才进入 IDLE。 diff --git a/cmvr-es/devices/agv/seer_robokit/README.md b/cmvr-es/devices/agv/seer_robokit/README.md index 3e1134d1..65a9cf77 100644 --- a/cmvr-es/devices/agv/seer_robokit/README.md +++ b/cmvr-es/devices/agv/seer_robokit/README.md @@ -38,7 +38,7 @@ - 设备配置: [`../../../config/devices/agv/agv.pb.txt`](../../../config/devices/agv/agv.pb.txt) - DeviceManager 配置: - [`../../../config/manager/device_manager.pb.txt`](../../../config/manager/device_manager.pb.txt) + [`../../../config/manager/real_device_manager.pb.txt`](../../../config/manager/real_device_manager.pb.txt) - gRPC API: [`../../../../protos/cmvr/api/agv_service.proto`](../../../../protos/cmvr/api/agv_service.proto)、 [`../../../../protos/cmvr/api/agv_command.proto`](../../../../protos/cmvr/api/agv_command.proto)、 @@ -72,7 +72,7 @@ agv { } ``` -还要在 `device_manager.pb.txt` 中确认同一个设备 id,并在完成现场安全检查后把 +还要在 `real_device_manager.pb.txt` 中确认同一个设备 id,并在完成现场安全检查后把 `enable` 改为 `true`。源码默认配置故意保持关闭。 ```textproto diff --git a/cmvr-es/devices/camera/realsense_camera/src/realsense_camera_test.cpp b/cmvr-es/devices/camera/realsense_camera/src/realsense_camera_test.cpp index d66d9495..7b0b3530 100644 --- a/cmvr-es/devices/camera/realsense_camera/src/realsense_camera_test.cpp +++ b/cmvr-es/devices/camera/realsense_camera/src/realsense_camera_test.cpp @@ -19,7 +19,7 @@ DeviceManager& getTestDeviceManager() { static bool initialized = [] { cmvr::ConfigHelper::setConfigRootFromFile("cmvr-es/config/cmvr_es.pb.txt"); cmvr::config::DeviceManagerRootConfig root_cfg; - if (!cmvr::ConfigHelper::loadConfigFile("manager/device_manager.pb.txt", root_cfg)) { + if (!cmvr::ConfigHelper::loadConfigFile("manager/real_device_manager.pb.txt", root_cfg)) { throw std::runtime_error("Failed to load test DeviceManagerConfig"); } DeviceManager::getInstance(root_cfg.device_manager()); diff --git a/cmvr-es/task/touch_screen_task/src/touch_screen_task_test.cpp b/cmvr-es/task/touch_screen_task/src/touch_screen_task_test.cpp index 582e34ff..c8ee4a4b 100644 --- a/cmvr-es/task/touch_screen_task/src/touch_screen_task_test.cpp +++ b/cmvr-es/task/touch_screen_task/src/touch_screen_task_test.cpp @@ -397,7 +397,7 @@ cmvr::device::DeviceManager& getTestDeviceManager() { static bool initialized = [] { cmvr::ConfigHelper::setConfigRootFromFile("cmvr-es/config/cmvr_es.pb.txt"); cmvr::config::DeviceManagerRootConfig root_cfg; - if (!cmvr::ConfigHelper::loadConfigFile("manager/device_manager.pb.txt", root_cfg)) { + if (!cmvr::ConfigHelper::loadConfigFile("manager/real_device_manager.pb.txt", root_cfg)) { throw std::runtime_error("Failed to load test DeviceManagerConfig"); } cmvr::device::DeviceManager::getInstance(root_cfg.device_manager()); @@ -1137,7 +1137,7 @@ TEST(TouchScreenTaskTest, MotorArmConfigurationsSupportMoveP) { ASSERT_FALSE(project_root.empty()); for (const auto* file_name : {"arm.pb.txt", "arm_qp.pb.txt", "arm_mujoco.pb.txt", "arm_mujoco_qp.pb.txt", "ethercat_dual_arm.pb.txt", - "arm_gen2_mujoco.pb.txt", "xiaozhao_arm.pb.txt"}) { + "arm_gen2_mujoco.pb.txt", "xiaozhao_mujoco_arm.pb.txt"}) { SCOPED_TRACE(file_name); cmvr::config::ArmRootConfig root; ASSERT_TRUE(ProtoMessageIo::getProtoFromAsciiFile( @@ -1354,7 +1354,7 @@ TEST(TouchScreenTaskTest, RunEyeToHandTouchInMujoco) { const auto touch_config = loadMujocoTouchConfig(project_root); cmvr::config::DeviceManagerRootConfig runtime_devices; ASSERT_TRUE(cmvr::ConfigHelper::loadConfigFile( - "manager/device_manager.pb.txt", runtime_devices)); + "manager/sim_device_manager.pb.txt", runtime_devices)); const auto& entries = runtime_devices.device_manager().devices(); const auto arm_entry = std::find_if(entries.begin(), entries.end(), [](const auto& entry) { return entry.id() == "mujoco_right_arm"; diff --git a/cmvr-es/test/mujoco_manual_ui_test.cpp b/cmvr-es/test/mujoco_manual_ui_test.cpp index bbdf21d5..88bb1397 100644 --- a/cmvr-es/test/mujoco_manual_ui_test.cpp +++ b/cmvr-es/test/mujoco_manual_ui_test.cpp @@ -190,6 +190,9 @@ TEST(MujocoManualUiTest, RunMujocoArm) const std::string arm_id = manualArmId(); auto arm = devices.getDevice(arm_id); auto mujoco_camera = devices.getDevice("mujoco_hand_cam"); + if (!mujoco_camera) { + mujoco_camera = devices.getDevice("xiaozhao_mujoco_hand_cam"); + } auto viewer = runtime.mujocoViewer("mujoco_viewer"); auto mujoco_world = cmvr::simulate::MujocoWorldDevice::worldFor("mujoco_world"); diff --git a/docs/ethercat_motor_tutorial.md b/docs/ethercat_motor_tutorial.md index 8f5b5870..5b6f62b5 100644 --- a/docs/ethercat_motor_tutorial.md +++ b/docs/ethercat_motor_tutorial.md @@ -141,7 +141,7 @@ motor { 修改: ```text -cmvr-es/config/manager/device_manager.pb.txt +cmvr-es/config/manager/real_device_manager.pb.txt ``` 加入: diff --git a/model/README.md b/model/README.md index 2ae6aaa9..8da27969 100644 --- a/model/README.md +++ b/model/README.md @@ -2,11 +2,14 @@ ## 启动 xiaozhao MuJoCo 仿真 -默认设备配置 `cmvr-es/config/manager/device_manager.pb.txt` 已选择 +仿真设备清单 `cmvr-es/config/manager/sim_device_manager.pb.txt` 中的 MuJoCo world 使用 `devices/mujoco/xiaozhao_world.pb.txt`,加载 `model/xiaozhao/xml/scene.xml`。 场景包含机器人、地面、灯光、触控测试屏幕、手部/外部相机和共 17 个位置执行器(双臂 14 个、颈部 3 个),仿真步长为 1 ms。 -已启用 MuJoCo world、viewer、xiaozhao 双臂与颈部电机、左右臂、头部、两路仿真相机、 -零力触觉设备、右臂触屏任务和 gRPC 控制服务。原 xiaoyan 的电机、机械臂及真实硬件保持关闭。 +切换到该仿真时,启用 MuJoCo world、viewer、小赵的双臂与颈部电机、左右臂、头部、两路仿真相机、 +零力触觉设备、右臂触屏任务和 gRPC 控制服务。 +在运行所用的 `cmvr_es.pb.txt` 中,将 `device_manager_config_file` 设为 +`"manager/sim_device_manager.pb.txt"`。源码安装时使用 `cmvr-es/config/cmvr_es.pb.txt`, +已有安装使用 `output/bin/config/cmvr_es.pb.txt`。 xiaozhao 的双臂关节名为 `joint1-left`…`joint7-left` 和 `joint1-right`…`joint7-right`,不能直接复用原模型的机械臂配置。 @@ -28,9 +31,9 @@ J2 `[-1.57, 0.44]`、J3 `[-0.44, 0.44]` rad;首关节已补偿现有基座绕 模型现有 17 个活动关节及对应的位置执行器,限位 CSV 包含双臂和颈部。 `actuators.xml` 中的 `neck-joint1_pos`~`neck-joint3_pos` 追加在双臂执行器之后, 保持双臂索引不变;颈部初始 `kp=80`、`dampratio=1`,控制量为弧度,范围与 URDF 限位一致。 -颈部已通过 `xiaozhao_head_motors` 接入 CMVR,并注册为 3DOF 机械臂 `xiaozhao_head`, -使用 `devices/arm/xiaozhao_head.pb.txt`,复用 MoveJ 关节控制,无需配置运动学求解器。 -头部接管控制后,通过 ArmService 的 `xiaozhao_head` 控制三轴目标角。 +颈部已通过 `xiaozhao_mujoco_head_motors` 接入 CMVR,并注册为 3DOF 机械臂 `xiaozhao_mujoco_head`, +使用 `devices/arm/xiaozhao_mujoco_head.pb.txt`,复用 MoveJ 关节控制,无需配置运动学求解器。 +头部接管控制后,通过 ArmService 的 `xiaozhao_mujoco_head` 控制三轴目标角。 颈部真正的零位(`qpos=0`)是直立的;Control 面板中的数值是执行器目标角度。 头部与下段颈部的凸包在内部机构处重叠,曾把零目标下的 J3 推到约 19.62°。 颈部仅排除 `neck_Link1`/`neck_Link3` 这一对内部碰撞,保留其他碰撞、关节原点、轴向及限位。 @@ -85,12 +88,12 @@ blender --background --factory-startup --threads 4 --python-exit-code 1 \ 相机相对 Base/世界的外参随脖子关节位置变化。 加载 `scene.xml` 即可显示整套场景,模型文件也已同步到 `output/bin/model/xiaozhao`。 小赵使用独立配置 `cmvr-es/config/tasks/touch_screen_task/touch_screen_task_xiaozhao_mujoco.pb.txt`, -绑定 `xiaozhao_right_arm`、`mujoco_hand_cam`、`mujoco_external_touch_cam` 和 `mujoco_zero_touch`。 -两路相机使用 `devices/camera/xiaozhao_camera.pb.txt`,手相机原图为 1280 × 720, +绑定 `xiaozhao_mujoco_right_arm`、`xiaozhao_mujoco_hand_cam`、`xiaozhao_mujoco_external_touch_cam` 和 `mujoco_zero_touch`。 +两路相机使用 `devices/camera/xiaozhao_mujoco_camera.pb.txt`,手相机原图为 1280 × 720, 头部相机为 2560 × 1440;旧居中屏幕布局下,16 mm 屏幕 Tag 在头部相机的 720p 图中 存在明显姿态误估,因此保留 1440p。旧布局测得的屏幕 Tag 姿态误差约 0.26°、 G/H 相对位置误差约 1.3 mm,不作为当前 S05 参考布局的精度结论。 -触控配置中的 `devices.head_id` 指向 `xiaozhao_head`;`head_initialization.enable: true` +触控配置中的 `devices.head_id` 指向 `xiaozhao_mujoco_head`;`head_initialization.enable: true` 使任务在初始化期间执行一次头部 MoveJ,三轴 `neck-joint1/2/3` 的初始角设为 `[0, -0.1, 0.1]` rad, 速度 `0.25 rad/s`、加速度 `0.5 rad/s²`。可直接修改 `head_initialization.joint_positions`。 头部到位后任务才进入 IDLE,随后等待 gRPC `HlcService.touch(u, v)`;每次 touch 不重复移动头部。 @@ -106,7 +109,7 @@ G/H 相对位置误差约 1.3 mm,不作为当前 S05 参考布局的精度结 对应物理手部正立、TCP +Z 沿屏幕向上;不能仅按 body 坐标将 rz 改成 0。 触屏测试前,先将右臂 MoveJ 到新配置 `initialization.joint_positions` 给出的初始位,再获取 -`mujoco_hand_cam` 的 RGB 图像并点击屏幕上的目标。`u/v` 使用原始图像的 1280 × 720 像素坐标; +`xiaozhao_mujoco_hand_cam` 的 RGB 图像并点击屏幕上的目标。`u/v` 使用原始图像的 1280 × 720 像素坐标; 上位机 RGB Image 页面会按原图尺寸换算点击坐标。不要使用外部相机或编码视频的像素直接调用 touch。 每次 touch 请求还会确认初始位,点击后不要手动改变机械臂姿态。 `initialization.motion_method` 统一选择三个回初始位开关(`before_start`、`after_finish`、`after_failure`)启用时调用的关节运动。 @@ -138,13 +141,13 @@ TCP 目标停在屏幕前 5 cm,沿 Tool -Y 以 0.02 m/s 前进最多 2 cm, 以下本次变更,无需重新编译: ```bash -cp cmvr-es/config/manager/device_manager.pb.txt output/bin/config/manager/ +cp cmvr-es/config/manager/sim_device_manager.pb.txt output/bin/config/manager/ cp cmvr-es/config/manager/task_manager.pb.txt output/bin/config/manager/ cp cmvr-es/config/devices/mujoco/xiaozhao_world.pb.txt output/bin/config/devices/mujoco/ -cp cmvr-es/config/devices/motor/xiaozhao_motors.pb.txt output/bin/config/devices/motor/ -cp cmvr-es/config/devices/arm/xiaozhao_arm.pb.txt output/bin/config/devices/arm/ -cp cmvr-es/config/devices/arm/xiaozhao_head.pb.txt output/bin/config/devices/arm/ -cp cmvr-es/config/devices/camera/xiaozhao_camera.pb.txt output/bin/config/devices/camera/ +cp cmvr-es/config/devices/motor/xiaozhao_mujoco_motors.pb.txt output/bin/config/devices/motor/ +cp cmvr-es/config/devices/arm/xiaozhao_mujoco_arm.pb.txt output/bin/config/devices/arm/ +cp cmvr-es/config/devices/arm/xiaozhao_mujoco_head.pb.txt output/bin/config/devices/arm/ +cp cmvr-es/config/devices/camera/xiaozhao_mujoco_camera.pb.txt output/bin/config/devices/camera/ cp cmvr-es/config/tasks/touch_screen_task/touch_screen_task_xiaozhao_mujoco.pb.txt output/bin/config/tasks/touch_screen_task/ cp cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_{left,right}.pb.txt output/bin/config/tasks/self_collision_task/ cp -a model/xiaozhao output/bin/model/ @@ -155,13 +158,13 @@ MuJoCo 窗口关闭后程序退出。修改配置后需要重启程序才能生 ### 控制左右臂 -机械臂配置为 `cmvr-es/config/devices/arm/xiaozhao_arm.pb.txt`, -电机配置为 `cmvr-es/config/devices/motor/xiaozhao_motors.pb.txt`。 +机械臂配置为 `cmvr-es/config/devices/arm/xiaozhao_mujoco_arm.pb.txt`, +电机配置为 `cmvr-es/config/devices/motor/xiaozhao_mujoco_motors.pb.txt`。 | 机械臂设备 ID | 电机组 / motor_system_id | 关节顺序 | 默认 TCP | | --- | --- | --- | --- | -| `xiaozhao_left_arm` | `xiaozhao_left_arm_motors` | `joint1-left`…`joint7-left` | `tcp-left` | -| `xiaozhao_right_arm` | `xiaozhao_right_arm_motors` | `joint1-right`…`joint7-right` | `tcp-right` | +| `xiaozhao_mujoco_left_arm` | `xiaozhao_mujoco_left_arm_motors` | `joint1-left`…`joint7-left` | `tcp-left` | +| `xiaozhao_mujoco_right_arm` | `xiaozhao_mujoco_right_arm_motors` | `joint1-right`…`joint7-right` | `tcp-right` | 两臂均使用 QP 逆运动学,基准坐标系为 `base_link`,法兰仍为 `link7-left/right`。 TCP 与各自第七连杆的坐标轴方向一致,仅作固定平移:左侧相对 `link7-left` @@ -200,8 +203,8 @@ MuJoCo 触控当前启用右臂自碰撞监控,左臂的独立监控任务已 | 机械臂 | J1~J7,单位 ° | | --- | --- | -| `xiaozhao_left_arm` | `90, -30, 0, -90, 0, -30, -15` | -| `xiaozhao_right_arm` | `-90, 30, 0, 90, 0, 30, 15` | +| `xiaozhao_mujoco_left_arm` | `90, -30, 0, -90, 0, -30, -15` | +| `xiaozhao_mujoco_right_arm` | `-90, 30, 0, 90, 0, 30, 15` | 使用 `ARM_FRAME_BASE`,基准为 `base_link`,TCP 分别为 `tcp-left` / `tcp-right`。 调用 `getPose` 时,`base_link` 填 `base_link`,`ee_link` 按左右臂填 `tcp-left` 或 `tcp-right`。 diff --git a/model/xiaozhao/collision/README.md b/model/xiaozhao/collision/README.md index e9892ea0..4b660f16 100644 --- a/model/xiaozhao/collision/README.md +++ b/model/xiaozhao/collision/README.md @@ -111,12 +111,12 @@ Python 分块测试与 C++ collision checker 测试覆盖倒角分层、层间 ## 在线任务状态 -两套配置分别绑定 `xiaozhao_left_arm`、`xiaozhao_right_arm`: +两套配置分别绑定 `xiaozhao_mujoco_left_arm`、`xiaozhao_mujoco_right_arm`: - `cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_left.pb.txt` - `cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_right.pb.txt` -`cmvr-es/config/manager/task_manager.pb.txt` 仅启用右臂周期任务,左臂实时监控已关闭。 +在 `cmvr-es/config/manager/task_manager.pb.txt` 中可按需启用左右臂的周期监控任务。 右臂简化碰撞体间距进入 20 mm 时预警,达到 5 mm 时触发右臂保护停止。 两臂各自忽略同侧 `link5 ↔ link7`。当前右臂触控初姿的 J4 为 `-1.46915 rad`, 该姿态下 `link5-right ↔ link7-right` 的原始 STL 表面间距约为 8.9 mm。 diff --git a/scripts/test_wait_network_devices.py b/scripts/test_wait_network_devices.py index 1542792c..bf38425b 100644 --- a/scripts/test_wait_network_devices.py +++ b/scripts/test_wait_network_devices.py @@ -15,7 +15,12 @@ class ReadinessTest(unittest.TestCase): self.root = Path(self.temp.name) (self.root / "manager").mkdir() (self.root / "devices").mkdir() - (self.root / "manager/device_manager.pb.txt").write_text('''device_manager { + self.app_config = self.root / "cmvr_es.pb.txt" + self.real_manager = self.root / "manager/real_devices.pb.txt" + self.app_config.write_text('''cmvr_es { + device_manager_config_file: "manager/real_devices.pb.txt" + }''') + self.real_manager.write_text('''device_manager { devices { id: "aubo_arm" type: DEVICE_TYPE_ROBOT_ARM config_file: "devices/arm.pb.txt" enable: true } devices { id: "src1100" type: DEVICE_TYPE_AGV config_file: "devices/agv.pb.txt" enable: true } devices { id: "disabled" type: DEVICE_TYPE_AGV config_file: "not-present" enable: false } @@ -39,9 +44,16 @@ class ReadinessTest(unittest.TestCase): self.assertEqual([p.port for p in values], [30004, 19204, 19205, 19206, 19207, 19301]) self.assertEqual(values[1].host, "192.168.192.5") + def test_switching_manager_configuration_changes_endpoints(self): + (self.root / "manager/sim_devices.pb.txt").write_text("device_manager {}") + self.assertTrue(readiness.endpoints(self.root)) + self.app_config.write_text('''cmvr_es { + device_manager_config_file: "manager/sim_devices.pb.txt" + }''') + self.assertEqual(readiness.endpoints(self.root), []) + def test_disabled_devices_do_not_block(self): - manager = self.root / "manager/device_manager.pb.txt" - manager.write_text(manager.read_text().replace("enable: true", "enable: false")) + self.real_manager.write_text(self.real_manager.read_text().replace("enable: true", "enable: false")) self.assertEqual(readiness.endpoints(self.root), []) def test_disabled_push_not_required(self): @@ -62,8 +74,7 @@ class ReadinessTest(unittest.TestCase): self.assertEqual(readiness.scalar(values[0], "id"), "x}#//{") def test_path_escape_rejected(self): - path = self.root / "manager/device_manager.pb.txt" - path.write_text(path.read_text().replace("devices/arm.pb.txt", "../elsewhere")) + self.real_manager.write_text(self.real_manager.read_text().replace("devices/arm.pb.txt", "../elsewhere")) with self.assertRaises(ValueError): readiness.endpoints(self.root) diff --git a/scripts/wait_network_devices.py b/scripts/wait_network_devices.py index d62eeffb..4f05e9f4 100755 --- a/scripts/wait_network_devices.py +++ b/scripts/wait_network_devices.py @@ -67,7 +67,12 @@ def scalar(text, key, default=None): def endpoints(config_dir): root = Path(config_dir).resolve() - manager = (root / "manager/device_manager.pb.txt").read_text(encoding="utf-8") + app_config = (root / "cmvr_es.pb.txt").read_text(encoding="utf-8") + app = next(blocks(app_config, "cmvr_es"), "") + manager_file = scalar(app, "device_manager_config_file") + if not manager_file: + raise ValueError("missing device_manager_config_file in cmvr_es.pb.txt") + manager = (root / manager_file).read_text(encoding="utf-8") result = [] for device in blocks(manager, "devices"): if scalar(device, "enable", "false") != "true": From 7d230fa50c9e116803cc1d0d48115bdf509b02c8 Mon Sep 17 00:00:00 2001 From: lgv Date: Thu, 19 Nov 2026 19:01:54 +0800 Subject: [PATCH 3/3] chore(config): remove legacy device templates and update EtherCAT settings --- cmvr-es/config/devices/arm/arm.pb.txt | 351 ------------------ .../config/devices/arm/arm_gen2_mujoco.pb.txt | 182 --------- cmvr-es/config/devices/arm/arm_mujoco.pb.txt | 184 --------- .../config/devices/arm/arm_mujoco_qp.pb.txt | 183 --------- cmvr-es/config/devices/arm/arm_qp.pb.txt | 183 --------- .../devices/arm/ethercat_dual_arm.pb.txt | 63 ---- .../devices/arm/ethercat_single_arm.pb.txt | 160 -------- cmvr-es/config/devices/arm/tchl_arm.pb.txt | 36 -- .../config/devices/arm/tchl_dual_arm.pb.txt | 63 ---- .../motor/dual_arm_ethercat_motors.pb.txt | 93 ----- .../devices/motor/ethercat_motors.pb.txt | 72 ---- .../ethercat_motors_four_real_test.pb.txt | 63 ---- .../motor/ethercat_single_arm_motors.pb.txt | 72 ---- .../config/devices/motor/mujoco_motors.pb.txt | 35 -- .../devices/motor/mujoco_motors_gen2.pb.txt | 35 -- .../devices/motor/tchl_dual_arm_motors.pb.txt | 95 ----- .../config/devices/motor/tchl_motors.pb.txt | 54 --- .../devices/motor/tchl_multi_motors.pb.txt | 64 ---- .../config/devices/motor/ti5_motors.pb.txt | 99 ----- .../ethercat/v1.7.0/etc/ethercat.conf | 6 +- 20 files changed, 3 insertions(+), 2090 deletions(-) delete mode 100644 cmvr-es/config/devices/arm/arm.pb.txt delete mode 100644 cmvr-es/config/devices/arm/arm_gen2_mujoco.pb.txt delete mode 100644 cmvr-es/config/devices/arm/arm_mujoco.pb.txt delete mode 100644 cmvr-es/config/devices/arm/arm_mujoco_qp.pb.txt delete mode 100644 cmvr-es/config/devices/arm/arm_qp.pb.txt delete mode 100644 cmvr-es/config/devices/arm/ethercat_dual_arm.pb.txt delete mode 100644 cmvr-es/config/devices/arm/ethercat_single_arm.pb.txt delete mode 100644 cmvr-es/config/devices/arm/tchl_arm.pb.txt delete mode 100644 cmvr-es/config/devices/arm/tchl_dual_arm.pb.txt delete mode 100644 cmvr-es/config/devices/motor/dual_arm_ethercat_motors.pb.txt delete mode 100644 cmvr-es/config/devices/motor/ethercat_motors.pb.txt delete mode 100644 cmvr-es/config/devices/motor/ethercat_motors_four_real_test.pb.txt delete mode 100644 cmvr-es/config/devices/motor/ethercat_single_arm_motors.pb.txt delete mode 100644 cmvr-es/config/devices/motor/mujoco_motors.pb.txt delete mode 100644 cmvr-es/config/devices/motor/mujoco_motors_gen2.pb.txt delete mode 100644 cmvr-es/config/devices/motor/tchl_dual_arm_motors.pb.txt delete mode 100644 cmvr-es/config/devices/motor/tchl_motors.pb.txt delete mode 100644 cmvr-es/config/devices/motor/tchl_multi_motors.pb.txt delete mode 100644 cmvr-es/config/devices/motor/ti5_motors.pb.txt diff --git a/cmvr-es/config/devices/arm/arm.pb.txt b/cmvr-es/config/devices/arm/arm.pb.txt deleted file mode 100644 index f5540dc2..00000000 --- a/cmvr-es/config/devices/arm/arm.pb.txt +++ /dev/null @@ -1,351 +0,0 @@ -arm { - robot_arms { - id: "right_arm" - - motor { - motor_system_id: "right_arm_can_motors" - motor_group_ids: "right_arm_can_motors" - dof: 7 - joint_names: "R_SHOULDER_P" - joint_names: "R_SHOULDER_R" - joint_names: "R_SHOULDER_Y" - joint_names: "R_ELBOW_R" - joint_names: "R_WRIST_P" - joint_names: "R_WRIST_Y" - joint_names: "R_WRIST_R" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_dls_ik_solver { - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - base_frame_name: "PELVIS_S" - flange_frame_name: "R_WRIST_R_S" - tcp_frame_name: "R_FINGER_TIP_FIXED" - max_iters: 100 - pos_eps: 1e-6 - rot_eps: 1e-6 - damping: 1e-6 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - } - soft_limit { - enable: true - margin_ratio: 0.01 - min_margin_rad: 0.01 - } - avoidance { - enable: false - gain: 0.2 - margin_ratio: 0.15 - max_push: 0.25 - } - } - } - } - - motion { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaoyan_description/dual_arm_collision.urdf" - ignored_pairs { first: "R_WRIST_P_S" second: "R_WRIST_R_S" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - move_j { - # MoveJ 轨迹完成后等待关节稳定的最长时间,单位为秒。 - settle_timeout_s: 2.0 - # MoveJ 完成时允许的最大关节位置误差,单位为弧度。 - settle_position_tolerance_rad: 0.002 - # MoveJ 完成时允许的最大关节速度,单位为弧度/秒。 - settle_velocity_tolerance_rad_s: 0.02 - # 位置和速度连续满足条件的采样次数。 - settle_stable_sample_count: 3 - } - - move_l { - pinocchio_cartesian_motion_planner { - sample_period_s: 0.001 - position_gain: 4.0 - rotation_gain: 4.0 - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_continuity_check { - enable: true - max_joint_delta_rad: 0.05 - max_joint_velocity_rad_s: 10.0 - max_joint_acceleration_rad_s2: 5000.0 - } - cartesian_step_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 45.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 45.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - } - - speed_l { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 0.55 - linear_acceleration_max: 5.0 - linear_jerk_max: 10.0 - angular_velocity_max: 1.0 - angular_acceleration_max: 5.0 - angular_jerk_max: 12.0 - linear_target_replan_threshold: 1e-4 - angular_target_replan_threshold: 1e-4 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_velocity_check { - enable: true - max_joint_velocity_rad_s: 30.0 - max_joint_acceleration_rad_s2: 10000.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 5.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 5.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - - speed_l_controller { - cartesian_velocity_controller { - control_period_s: 0.001 - stop_twist_norm: 1e-9 - stop_command_velocity_norm: 1e-3 - stop_measured_velocity_norm: 1e-2 - stop_acceleration: 10 - # 等待 Cartesian 速度运动停止的最长时间,单位为秒。 - stop_timeout_s: 2.0 - } - } - } - } - } - - robot_arms { - id: "left_arm" - - motor { - motor_system_id: "left_arm_can_motors" - motor_group_ids: "left_arm_can_motors" - dof: 7 - joint_names: "L_SHOULDER_P" - joint_names: "L_SHOULDER_R" - joint_names: "L_SHOULDER_Y" - joint_names: "L_ELBOW_R" - joint_names: "L_WRIST_P" - joint_names: "L_WRIST_Y" - joint_names: "L_WRIST_R" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_dls_ik_solver { - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - base_frame_name: "PELVIS_S" - flange_frame_name: "L_WRIST_R_S" - tcp_frame_name: "L_FINGER_TIP_FIXED" - max_iters: 100 - pos_eps: 1e-6 - rot_eps: 1e-6 - damping: 1e-6 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "L_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - } - soft_limit { - enable: true - margin_ratio: 0.01 - min_margin_rad: 0.01 - } - avoidance { - enable: false - gain: 0.2 - margin_ratio: 0.15 - max_push: 0.25 - } - } - } - } - - motion { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaoyan_description/dual_arm_collision.urdf" - ignored_pairs { first: "L_WRIST_P_S" second: "L_WRIST_R_S" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - - move_l { - pinocchio_cartesian_motion_planner { - sample_period_s: 0.001 - position_gain: 4.0 - rotation_gain: 4.0 - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_continuity_check { - enable: true - max_joint_delta_rad: 0.05 - max_joint_velocity_rad_s: 10.0 - max_joint_acceleration_rad_s2: 5000.0 - } - cartesian_step_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 45.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 45.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - } - - speed_l { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 0.55 - linear_acceleration_max: 5.0 - linear_jerk_max: 10.0 - angular_velocity_max: 1.0 - angular_acceleration_max: 5.0 - angular_jerk_max: 12.0 - linear_target_replan_threshold: 1e-4 - angular_target_replan_threshold: 1e-4 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_velocity_check { - enable: true - max_joint_velocity_rad_s: 30.0 - max_joint_acceleration_rad_s2: 10000.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 5.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 5.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - - speed_l_controller { - cartesian_velocity_controller { - control_period_s: 0.001 - stop_twist_norm: 1e-9 - stop_command_velocity_norm: 1e-3 - stop_measured_velocity_norm: 1e-2 - stop_acceleration: 10 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/arm_gen2_mujoco.pb.txt b/cmvr-es/config/devices/arm/arm_gen2_mujoco.pb.txt deleted file mode 100644 index f16cdbe8..00000000 --- a/cmvr-es/config/devices/arm/arm_gen2_mujoco.pb.txt +++ /dev/null @@ -1,182 +0,0 @@ -arm { - robot_arms { - id: "mujoco_right_arm" - - motor { - motor_system_id: "right_arm_mujoco_motors" - motor_group_ids: "right_arm_mujoco_motors" - dof: 7 - joint_names: "right_arm_J1" - joint_names: "right_arm_J2" - joint_names: "right_arm_J3" - joint_names: "right_arm_J4" - joint_names: "right_arm_J5" - joint_names: "right_arm_J6" - joint_names: "right_arm_J7" - upd_freq: 1000 - buffer_size: 50 - default_vel: 0.6 - default_acc: 2.0 - } - - kinematics { - pinocchio_dls_ik_solver { - urdf_path: "model/gen2/robot.urdf" - base_frame_name: "body_link" - flange_frame_name: "arm_link_7_2" - max_iters: 200 - pos_eps: 1e-6 - rot_eps: 1e-6 - damping: 1e-5 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "right_arm_J1" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J2" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J3" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J4" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J5" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J6" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - } - soft_limit { - enable: true - margin_ratio: 0.01 - min_margin_rad: 0.01 - } - avoidance { - enable: false - gain: 0.2 - margin_ratio: 0.15 - max_push: 0.25 - } - } - } - } - - motion { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/gen2/collision/robot_collision.urdf" - ignored_pairs { first: "arm_link_5_2" second: "arm_link_7_2" } - ignored_pairs { first: "body_link" second: "arm_link_2_2" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - move_j { - # MoveJ 轨迹完成后等待关节稳定的最长时间,单位为秒。 - settle_timeout_s: 2.0 - # MoveJ 完成时允许的最大关节位置误差,单位为弧度。 - settle_position_tolerance_rad: 0.002 - # MoveJ 完成时允许的最大关节速度,单位为弧度/秒。 - settle_velocity_tolerance_rad_s: 0.02 - # 位置和速度连续满足条件的采样次数。 - settle_stable_sample_count: 3 - } - - move_l { - pinocchio_cartesian_motion_planner { - sample_period_s: 0.001 - position_gain: 4.0 - rotation_gain: 4.0 - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.005 - } - joint_continuity_check { - enable: true - max_joint_delta_rad: 0.05 - max_joint_velocity_rad_s: 4.0 - max_joint_acceleration_rad_s2: 100.0 - } - cartesian_step_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 10.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 10.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - } - - speed_l { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 0.5 - linear_acceleration_max: 2.0 - linear_jerk_max: 10.0 - angular_velocity_max: 1.0 - angular_acceleration_max: 5.0 - angular_jerk_max: 12.0 - linear_target_replan_threshold: 1e-4 - angular_target_replan_threshold: 1e-4 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.005 - } - joint_velocity_check { - enable: true - max_joint_velocity_rad_s: 4.0 - max_joint_acceleration_rad_s2: 100.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 10.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 10.0 - min_desired_linear_speed: 0.01 - min_desired_angular_speed: 1e-4 - } - } - - speed_l_controller { - cartesian_velocity_controller { - control_period_s: 0.001 - stop_twist_norm: 1e-9 - stop_command_velocity_norm: 1e-3 - stop_measured_velocity_norm: 1e-2 - stop_acceleration: 2.0 - # 等待 Cartesian 速度运动停止的最长时间,单位为秒。 - stop_timeout_s: 2.0 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/arm_mujoco.pb.txt b/cmvr-es/config/devices/arm/arm_mujoco.pb.txt deleted file mode 100644 index d682461f..00000000 --- a/cmvr-es/config/devices/arm/arm_mujoco.pb.txt +++ /dev/null @@ -1,184 +0,0 @@ -arm { - robot_arms { - id: "mujoco_right_arm" - - motor { - motor_system_id: "right_arm_mujoco_motors" - motor_group_ids: "right_arm_mujoco_motors" - dof: 7 - joint_names: "R_SHOULDER_P" - joint_names: "R_SHOULDER_R" - joint_names: "R_SHOULDER_Y" - joint_names: "R_ELBOW_R" - joint_names: "R_WRIST_P" - joint_names: "R_WRIST_Y" - joint_names: "R_WRIST_R" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_dls_ik_solver { - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - base_frame_name: "PELVIS_S" - flange_frame_name: "R_WRIST_R_S" - tcp_frame_name: "R_FINGER_TIP_FIXED" - max_iters: 100 - pos_eps: 1e-6 - rot_eps: 1e-6 - damping: 1e-6 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 100.0 } - } - soft_limit { - enable: true - margin_ratio: 0.01 - min_margin_rad: 0.01 - } - avoidance { - enable: false - gain: 0.2 - margin_ratio: 0.15 - max_push: 0.25 - } - } - } - } - - motion { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaoyan_description/dual_arm_collision.urdf" - ignored_pairs { first: "R_WRIST_P_S" second: "R_WRIST_R_S" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - move_j { - # 轨迹关节位置限位检查的数值容差,单位 rad;0 表示严格检查。 - joint_limit_tolerance_rad: 0.00001 - # MoveJ 轨迹完成后等待关节稳定的最长时间,单位为秒。 - settle_timeout_s: 2.0 - # MoveJ 完成时允许的最大关节位置误差,单位为弧度。 - settle_position_tolerance_rad: 0.002 - # MoveJ 完成时允许的最大关节速度,单位为弧度/秒。 - settle_velocity_tolerance_rad_s: 0.02 - # 位置和速度连续满足条件的采样次数。 - settle_stable_sample_count: 3 - } - - move_l { - pinocchio_cartesian_motion_planner { - sample_period_s: 0.001 - position_gain: 4.0 - rotation_gain: 4.0 - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_continuity_check { - enable: true - max_joint_delta_rad: 0.05 - max_joint_velocity_rad_s: 10.0 - max_joint_acceleration_rad_s2: 5000.0 - } - cartesian_step_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 5.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 5.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - } - - speed_l { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 2.0 - linear_acceleration_max: 15.0 - linear_jerk_max: 60.0 - angular_velocity_max: 1.0 - angular_acceleration_max: 5.0 - angular_jerk_max: 12.0 - linear_target_replan_threshold: 1e-4 - angular_target_replan_threshold: 1e-4 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_velocity_check { - enable: true - max_joint_velocity_rad_s: 10.0 - max_joint_acceleration_rad_s2: 5000.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 5.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 5.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - - speed_l_controller { - cartesian_velocity_controller { - control_period_s: 0.001 - stop_twist_norm: 1e-9 - stop_command_velocity_norm: 1e-3 - stop_measured_velocity_norm: 1e-2 - stop_acceleration: 10 - # 等待 Cartesian 速度运动停止的最长时间,单位为秒。 - stop_timeout_s: 2.0 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/arm_mujoco_qp.pb.txt b/cmvr-es/config/devices/arm/arm_mujoco_qp.pb.txt deleted file mode 100644 index ee8aa674..00000000 --- a/cmvr-es/config/devices/arm/arm_mujoco_qp.pb.txt +++ /dev/null @@ -1,183 +0,0 @@ -arm { - robot_arms { - id: "mujoco_right_arm" - - motor { - motor_system_id: "right_arm_mujoco_motors" - motor_group_ids: "right_arm_mujoco_motors" - dof: 7 - joint_names: "R_SHOULDER_P" - joint_names: "R_SHOULDER_R" - joint_names: "R_SHOULDER_Y" - joint_names: "R_ELBOW_R" - joint_names: "R_WRIST_P" - joint_names: "R_WRIST_Y" - joint_names: "R_WRIST_R" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_qp_ik_solver { - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - base_frame_name: "PELVIS_S" - flange_frame_name: "R_WRIST_R_S" - tcp_frame_name: "R_FINGER_TIP_FIXED" - lambda: 1e-4 - w_posrot: 0.5 - max_iters: 100 - tol: 1e-6 - qp_time_limit: 1e-2 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 100.0 } - } - soft_limit { - enable: true - margin_ratio: 0.01 - min_margin_rad: 0.01 - } - avoidance { - enable: false - gain: 0.2 - margin_ratio: 0.01 - max_push: 0.02 - } - } - } - } - - motion { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaoyan_description/dual_arm_collision.urdf" - ignored_pairs { first: "R_WRIST_P_S" second: "R_WRIST_R_S" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - move_j { - # MoveJ 轨迹完成后等待关节稳定的最长时间,单位为秒。 - settle_timeout_s: 2.0 - # MoveJ 完成时允许的最大关节位置误差,单位为弧度。 - settle_position_tolerance_rad: 0.002 - # MoveJ 完成时允许的最大关节速度,单位为弧度/秒。 - settle_velocity_tolerance_rad_s: 0.02 - # 位置和速度连续满足条件的采样次数。 - settle_stable_sample_count: 3 - } - - move_l { - pinocchio_cartesian_motion_planner { - sample_period_s: 0.001 - position_gain: 4.0 - rotation_gain: 4.0 - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_continuity_check { - enable: true - max_joint_delta_rad: 0.05 - max_joint_velocity_rad_s: 10.0 - max_joint_acceleration_rad_s2: 5000.0 - } - cartesian_step_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 5.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 5.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - } - - speed_l { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 2.0 - linear_acceleration_max: 15.0 - linear_jerk_max: 500.0 - angular_velocity_max: 1.0 - angular_acceleration_max: 5.0 - angular_jerk_max: 12.0 - linear_target_replan_threshold: 1e-4 - angular_target_replan_threshold: 1e-4 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - line_deviation_check { - enable: true - line_deviation_warn_m: 0.005 - line_deviation_stop_m: 0.005 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_velocity_check { - enable: true - max_joint_velocity_rad_s: 10.0 - max_joint_acceleration_rad_s2: 5000.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 20.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 20.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - - speed_l_controller { - cartesian_velocity_controller { - control_period_s: 0.001 - stop_twist_norm: 1e-9 - stop_command_velocity_norm: 1e-3 - stop_measured_velocity_norm: 1e-2 - stop_acceleration: 5 - # 等待 Cartesian 速度运动停止的最长时间,单位为秒。 - stop_timeout_s: 2.0 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/arm_qp.pb.txt b/cmvr-es/config/devices/arm/arm_qp.pb.txt deleted file mode 100644 index 249a5493..00000000 --- a/cmvr-es/config/devices/arm/arm_qp.pb.txt +++ /dev/null @@ -1,183 +0,0 @@ -arm { - robot_arms { - id: "right_arm" - - motor { - motor_system_id: "right_arm_can_motors" - motor_group_ids: "right_arm_can_motors" - dof: 7 - joint_names: "R_SHOULDER_P" - joint_names: "R_SHOULDER_R" - joint_names: "R_SHOULDER_Y" - joint_names: "R_ELBOW_R" - joint_names: "R_WRIST_P" - joint_names: "R_WRIST_Y" - joint_names: "R_WRIST_R" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_qp_ik_solver { - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - base_frame_name: "PELVIS_S" - flange_frame_name: "R_WRIST_R_S" - tcp_frame_name: "R_FINGER_TIP_FIXED" - lambda: 1e-4 - w_posrot: 0.5 - max_iters: 100 - tol: 1e-6 - qp_time_limit: 1e-2 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - } - soft_limit { - enable: true - margin_ratio: 0.01 - min_margin_rad: 0.01 - } - avoidance { - enable: false - gain: 0.2 - margin_ratio: 0.01 - max_push: 0.02 - } - } - } - } - - motion { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaoyan_description/dual_arm_collision.urdf" - ignored_pairs { first: "R_WRIST_P_S" second: "R_WRIST_R_S" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - move_j { - # MoveJ 轨迹完成后等待关节稳定的最长时间,单位为秒。 - settle_timeout_s: 2.0 - # MoveJ 完成时允许的最大关节位置误差,单位为弧度。 - settle_position_tolerance_rad: 0.01 - # MoveJ 完成时允许的最大关节速度,单位为弧度/秒。 - settle_velocity_tolerance_rad_s: 0.02 - # 位置和速度连续满足条件的采样次数。 - settle_stable_sample_count: 3 - } - - move_l { - pinocchio_cartesian_motion_planner { - sample_period_s: 0.001 - position_gain: 4.0 - rotation_gain: 4.0 - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_continuity_check { - enable: true - max_joint_delta_rad: 0.05 - max_joint_velocity_rad_s: 10.0 - max_joint_acceleration_rad_s2: 5000.0 - } - cartesian_step_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 45.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 45.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - } - - speed_l { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 0.8 - linear_acceleration_max: 10.0 - linear_jerk_max: 200.0 - angular_velocity_max: 1.0 - angular_acceleration_max: 5.0 - angular_jerk_max: 12.0 - linear_target_replan_threshold: 1e-4 - angular_target_replan_threshold: 1e-4 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_velocity_check { - enable: true - max_joint_velocity_rad_s: 30.0 - max_joint_acceleration_rad_s2: 10000.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 70 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 70 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - - speed_l_controller { - cartesian_velocity_controller { - control_period_s: 0.001 - stop_twist_norm: 1e-9 - stop_command_velocity_norm: 1e-3 - stop_measured_velocity_norm: 1e-2 - stop_acceleration: 5 - # 等待 Cartesian 速度运动停止的最长时间,单位为秒。 - stop_timeout_s: 2.0 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/ethercat_dual_arm.pb.txt b/cmvr-es/config/devices/arm/ethercat_dual_arm.pb.txt deleted file mode 100644 index b601ef6f..00000000 --- a/cmvr-es/config/devices/arm/ethercat_dual_arm.pb.txt +++ /dev/null @@ -1,63 +0,0 @@ -# Joint-only minimal configuration; MoveJ follows joint_names order. -arm { - robot_arms { - id: "right_ethercat_arm" - motor { - motor_system_id: "dual_arm_ethercat_motors" - motor_group_ids: "dual_arm_ethercat_motors" - dof: 7 - joint_names: "right_arm_J1" - joint_names: "right_arm_J2" - joint_names: "right_arm_J3" - joint_names: "right_arm_J4" - joint_names: "right_arm_J5" - joint_names: "right_arm_J6" - joint_names: "right_arm_J7" - upd_freq: 1000 - } - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.1 - } - } - move_j { - settle_timeout_s: 2.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } - robot_arms { - id: "left_ethercat_arm" - motor { - motor_system_id: "dual_arm_ethercat_motors" - motor_group_ids: "dual_arm_ethercat_motors" - dof: 7 - joint_names: "left_arm_J1" - joint_names: "left_arm_J2" - joint_names: "left_arm_J3" - joint_names: "left_arm_J4" - joint_names: "left_arm_J5" - joint_names: "left_arm_J6" - joint_names: "left_arm_J7" - upd_freq: 1000 - } - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.1 - } - } - move_j { - settle_timeout_s: 2.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } -} diff --git a/cmvr-es/config/devices/arm/ethercat_single_arm.pb.txt b/cmvr-es/config/devices/arm/ethercat_single_arm.pb.txt deleted file mode 100644 index d1e57e79..00000000 --- a/cmvr-es/config/devices/arm/ethercat_single_arm.pb.txt +++ /dev/null @@ -1,160 +0,0 @@ -arm { - robot_arms { - id: "right_ethercat_arm" - - motor { - motor_system_id: "right_arm_ethercat_motors" - motor_group_ids: "right_arm_ethercat_motors" - dof: 7 - joint_names: "right_arm_J1" - joint_names: "right_arm_J2" - joint_names: "right_arm_J3" - joint_names: "right_arm_J4" - joint_names: "right_arm_J5" - joint_names: "right_arm_J6" - joint_names: "right_arm_J7" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_dls_ik_solver { - urdf_path: "model/gen2/robot.urdf" - base_frame_name: "body_link" - flange_frame_name: "arm_link_7_2" - max_iters: 100 - pos_eps: 1e-6 - rot_eps: 1e-6 - damping: 1e-6 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "right_arm_J1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J2" q_lb: -1.64 q_ub: 1.64 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J4" q_lb: -1.60 q_ub: 1.60 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J6" q_lb: -0.37 q_ub: 0.79 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -0.61 q_ub: 0.58 qd: 5.0 qdd: 10.0 } - } - soft_limit { - enable: true - margin_ratio: 0.01 - min_margin_rad: 0.01 - } - avoidance { - enable: false - gain: 0.2 - margin_ratio: 0.15 - max_push: 0.25 - } - } - } - } - - motion { - move_j { - # MoveJ 轨迹完成后等待关节稳定的最长时间,单位为秒。 - settle_timeout_s: 2.0 - # MoveJ 完成时允许的最大关节位置误差,单位为弧度。 - settle_position_tolerance_rad: 0.002 - # MoveJ 完成时允许的最大关节速度,单位为弧度/秒。 - settle_velocity_tolerance_rad_s: 0.02 - # 位置和速度连续满足条件的采样次数。 - settle_stable_sample_count: 3 - toppra_joint_motion_planner { - path_type: TOPPRA_PATH_TYPE_QUINTIC - sample_period_s: 0.001 - grid_size: 150 - high_grid_size: 300 - } - } - - move_l { - pinocchio_cartesian_motion_planner { - sample_period_s: 0.001 - position_gain: 4.0 - rotation_gain: 4.0 - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_continuity_check { - enable: true - max_joint_delta_rad: 0.05 - max_joint_velocity_rad_s: 10.0 - max_joint_acceleration_rad_s2: 5000.0 - } - cartesian_step_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 45.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 45.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - } - - speed_l { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 0.55 - linear_acceleration_max: 5.0 - linear_jerk_max: 10.0 - angular_velocity_max: 1.0 - angular_acceleration_max: 5.0 - angular_jerk_max: 12.0 - linear_target_replan_threshold: 1e-4 - angular_target_replan_threshold: 1e-4 - linear_reverse_cos_threshold: -0.8660254037844386 - linear_reverse_switch_speed_threshold: 1e-3 - enforce_joint_acceleration_limits: true - line_deviation_check { - enable: true - line_deviation_warn_m: 0.01 - line_deviation_stop_m: 0.03 - line_direction_warn_deg: 20.0 - line_direction_stop_deg: 45.0 - line_direction_reset_deg: 10.0 - line_check_min_distance_m: 0.01 - } - joint_velocity_check { - enable: true - max_joint_velocity_rad_s: 30.0 - max_joint_acceleration_rad_s2: 10000.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 5.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 5.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - - speed_l_controller { - cartesian_velocity_controller { - control_period_s: 0.001 - stop_twist_norm: 1e-9 - stop_command_velocity_norm: 1e-3 - stop_measured_velocity_norm: 1e-2 - stop_acceleration: 10 - # 等待 Cartesian 速度运动停止的最长时间,单位为秒。 - stop_timeout_s: 2.0 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/tchl_arm.pb.txt b/cmvr-es/config/devices/arm/tchl_arm.pb.txt deleted file mode 100644 index f2ef0ece..00000000 --- a/cmvr-es/config/devices/arm/tchl_arm.pb.txt +++ /dev/null @@ -1,36 +0,0 @@ -# 七轴纯关节运动配置;MoveJ 目标向量按 joint_names 的顺序填写。 -arm { - robot_arms { - id: "tchl_arm" - - motor { - motor_system_id: "tchl_joint_motors" - motor_group_ids: "tchl_joint_motors" - dof: 7 - joint_names: "TCHL_AXIS_1" - joint_names: "TCHL_AXIS_2" - joint_names: "TCHL_AXIS_3" - joint_names: "TCHL_AXIS_4" - joint_names: "TCHL_AXIS_5" - joint_names: "TCHL_AXIS_6" - joint_names: "TCHL_AXIS_7" - upd_freq: 1000 - } - - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.1 - } - } - - move_j { - settle_timeout_s: 2.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } -} diff --git a/cmvr-es/config/devices/arm/tchl_dual_arm.pb.txt b/cmvr-es/config/devices/arm/tchl_dual_arm.pb.txt deleted file mode 100644 index 0f0c63fc..00000000 --- a/cmvr-es/config/devices/arm/tchl_dual_arm.pb.txt +++ /dev/null @@ -1,63 +0,0 @@ -# Joint-only minimal configuration; MoveJ follows joint_names order. -arm { - robot_arms { - id: "right_tchl_arm" - motor { - motor_system_id: "tchl_dual_arm_motors" - motor_group_ids: "tchl_dual_arm_motors" - dof: 7 - joint_names: "right_arm_J1" - joint_names: "right_arm_J2" - joint_names: "right_arm_J3" - joint_names: "right_arm_J4" - joint_names: "right_arm_J5" - joint_names: "right_arm_J6" - joint_names: "right_arm_J7" - upd_freq: 1000 - } - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.1 - } - } - move_j { - settle_timeout_s: 2.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } - robot_arms { - id: "left_tchl_arm" - motor { - motor_system_id: "tchl_dual_arm_motors" - motor_group_ids: "tchl_dual_arm_motors" - dof: 7 - joint_names: "left_arm_J1" - joint_names: "left_arm_J2" - joint_names: "left_arm_J3" - joint_names: "left_arm_J4" - joint_names: "left_arm_J5" - joint_names: "left_arm_J6" - joint_names: "left_arm_J7" - upd_freq: 1000 - } - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.1 - } - } - move_j { - settle_timeout_s: 2.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } -} diff --git a/cmvr-es/config/devices/motor/dual_arm_ethercat_motors.pb.txt b/cmvr-es/config/devices/motor/dual_arm_ethercat_motors.pb.txt deleted file mode 100644 index c6b8a10b..00000000 --- a/cmvr-es/config/devices/motor/dual_arm_ethercat_motors.pb.txt +++ /dev/null @@ -1,93 +0,0 @@ -motor { - id: "dual_arm_ethercat_motors" - - motor_groups { - id: "dual_arm_ethercat_motors" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_EYOU - protocol: MOTOR_PROTOCOL_ETHERCAT_CIA402 - - ethercat { - master_index: 0 - cycle_us: 1000 - slave_op_timeout_ms: 12000 - slave_state_poll_period_ms: 10 - - cia402 { - state_transition_timeout_ms: 1200 - velocity_stop_timeout_ms: 2000 - status_poll_period_ms: 10 - stopped_velocity_tolerance_rad_s: 0.001 - } - - zero_calibration { - timeout_ms: 2000 - poll_period_ms: 10 - stable_sample_count: 5 - position_tolerance_counts: 10000 - stable_delta_counts: 1000 - } - - dc { - enable: false - reference_motor_id: 1 - sync0_cycle_us: 1000 - sync0_shift_us: 0 - sync_reference_clock_period: 1 - assign_activate: 768 - sync_monitor_period_ms: 1000 - } - - slaves { motor_id: 1 alias: 0 position: 1 } - slaves { motor_id: 2 alias: 0 position: 2 } - slaves { motor_id: 3 alias: 0 position: 3 } - slaves { motor_id: 4 alias: 0 position: 4 } - slaves { motor_id: 5 alias: 0 position: 5 } - slaves { motor_id: 6 alias: 0 position: 6 } - slaves { motor_id: 7 alias: 0 position: 7 } - slaves { motor_id: 8 alias: 0 position: 8 } - slaves { motor_id: 9 alias: 0 position: 9 } - slaves { motor_id: 10 alias: 0 position: 10 } - slaves { motor_id: 11 alias: 0 position: 11 } - slaves { motor_id: 12 alias: 0 position: 12 } - slaves { motor_id: 13 alias: 0 position: 13 } - slaves { motor_id: 14 alias: 0 position: 14 } - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "right_arm_J1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J2" q_lb: -1.64 q_ub: 1.64 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J4" q_lb: -1.60 q_ub: 1.60 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J6" q_lb: -0.37 q_ub: 0.79 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -0.61 q_ub: 0.58 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J2" q_lb: -1.64 q_ub: 1.64 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J4" q_lb: -1.60 q_ub: 1.60 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J6" q_lb: -0.37 q_ub: 0.79 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J7" q_lb: -0.61 q_ub: 0.58 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "right_arm_J1" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 2 joint_name: "right_arm_J2" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 3 joint_name: "right_arm_J3" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 4 joint_name: "right_arm_J4" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 5 joint_name: "right_arm_J5" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 6 joint_name: "right_arm_J6" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 7 joint_name: "right_arm_J7" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 8 joint_name: "left_arm_J1" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 9 joint_name: "left_arm_J2" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 10 joint_name: "left_arm_J3" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 11 joint_name: "left_arm_J4" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 12 joint_name: "left_arm_J5" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 13 joint_name: "left_arm_J6" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 14 joint_name: "left_arm_J7" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } -} diff --git a/cmvr-es/config/devices/motor/ethercat_motors.pb.txt b/cmvr-es/config/devices/motor/ethercat_motors.pb.txt deleted file mode 100644 index f8c2fe88..00000000 --- a/cmvr-es/config/devices/motor/ethercat_motors.pb.txt +++ /dev/null @@ -1,72 +0,0 @@ -motor { - id: "ethercat_motors" - - motor_groups { - id: "right_arm_ethercat_motors" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_EYOU - protocol: MOTOR_PROTOCOL_ETHERCAT_CIA402 - - ethercat { - master_index: 0 - cycle_us: 1000 - slave_op_timeout_ms: 12000 - slave_state_poll_period_ms: 10 - - cia402 { - state_transition_timeout_ms: 1200 - velocity_stop_timeout_ms: 2000 - status_poll_period_ms: 10 - stopped_velocity_tolerance_rad_s: 0.001 - } - - zero_calibration { - timeout_ms: 2000 - poll_period_ms: 10 - stable_sample_count: 5 - position_tolerance_counts: 10000 - stable_delta_counts: 1000 - } - - dc { - enable: false - reference_motor_id: 1 - sync0_cycle_us: 1000 - sync0_shift_us: 0 - sync_reference_clock_period: 1 - assign_activate: 768 - sync_monitor_period_ms: 1000 - } - - slaves { motor_id: 1 alias: 0 position: 0 } - slaves { motor_id: 2 alias: 0 position: 1 } - slaves { motor_id: 3 alias: 0 position: 2 } - slaves { motor_id: 4 alias: 0 position: 3 } - slaves { motor_id: 5 alias: 0 position: 4 } - slaves { motor_id: 6 alias: 0 position: 5 } - slaves { motor_id: 7 alias: 0 position: 6 } - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -1.64 q_ub: 1.64 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: -1.60 q_ub: 1.60 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.37 q_ub: 0.79 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.61 q_ub: 0.58 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "R_SHOULDER_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 2 joint_name: "R_SHOULDER_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 3 joint_name: "R_SHOULDER_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 4 joint_name: "R_ELBOW_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 5 joint_name: "R_WRIST_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 6 joint_name: "R_WRIST_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 7 joint_name: "R_WRIST_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } -} diff --git a/cmvr-es/config/devices/motor/ethercat_motors_four_real_test.pb.txt b/cmvr-es/config/devices/motor/ethercat_motors_four_real_test.pb.txt deleted file mode 100644 index 4f649ab1..00000000 --- a/cmvr-es/config/devices/motor/ethercat_motors_four_real_test.pb.txt +++ /dev/null @@ -1,63 +0,0 @@ -motor { - id: "ethercat_motors" - - motor_groups { - id: "right_arm_ethercat_motors" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_EYOU - protocol: MOTOR_PROTOCOL_ETHERCAT_CIA402 - - ethercat { - master_index: 0 - cycle_us: 1000 - slave_op_timeout_ms: 15000 - slave_state_poll_period_ms: 10 - - cia402 { - state_transition_timeout_ms: 1200 - velocity_stop_timeout_ms: 2000 - status_poll_period_ms: 10 - stopped_velocity_tolerance_rad_s: 0.001 - } - - zero_calibration { - timeout_ms: 2000 - poll_period_ms: 10 - stable_sample_count: 5 - position_tolerance_counts: 10000 - stable_delta_counts: 1000 - } - - dc { - enable: false - reference_motor_id: 1 - sync0_cycle_us: 1000 - sync0_shift_us: 0 - sync_reference_clock_period: 1 - assign_activate: 768 - sync_monitor_period_ms: 1000 - } - - slaves { motor_id: 1 alias: 0 position: 0 } - slaves { motor_id: 2 alias: 0 position: 1 } - slaves { motor_id: 3 alias: 0 position: 2 } - slaves { motor_id: 4 alias: 0 position: 3 } - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "R_SHOULDER_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 2 joint_name: "R_SHOULDER_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 3 joint_name: "R_SHOULDER_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 4 joint_name: "R_ELBOW_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } -} diff --git a/cmvr-es/config/devices/motor/ethercat_single_arm_motors.pb.txt b/cmvr-es/config/devices/motor/ethercat_single_arm_motors.pb.txt deleted file mode 100644 index 36ac9978..00000000 --- a/cmvr-es/config/devices/motor/ethercat_single_arm_motors.pb.txt +++ /dev/null @@ -1,72 +0,0 @@ -motor { - id: "right_arm_ethercat_motors" - - motor_groups { - id: "right_arm_ethercat_motors" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_EYOU - protocol: MOTOR_PROTOCOL_ETHERCAT_CIA402 - - ethercat { - master_index: 0 - cycle_us: 1000 - slave_op_timeout_ms: 12000 - slave_state_poll_period_ms: 10 - - cia402 { - state_transition_timeout_ms: 1200 - velocity_stop_timeout_ms: 2000 - status_poll_period_ms: 10 - stopped_velocity_tolerance_rad_s: 0.001 - } - - zero_calibration { - timeout_ms: 2000 - poll_period_ms: 10 - stable_sample_count: 5 - position_tolerance_counts: 10000 - stable_delta_counts: 1000 - } - - dc { - enable: false - reference_motor_id: 1 - sync0_cycle_us: 1000 - sync0_shift_us: 0 - sync_reference_clock_period: 1 - assign_activate: 768 - sync_monitor_period_ms: 1000 - } - - slaves { motor_id: 1 alias: 0 position: 0 } - slaves { motor_id: 2 alias: 0 position: 1 } - slaves { motor_id: 3 alias: 0 position: 2 } - slaves { motor_id: 4 alias: 0 position: 3 } - slaves { motor_id: 5 alias: 0 position: 4 } - slaves { motor_id: 6 alias: 0 position: 5 } - slaves { motor_id: 7 alias: 0 position: 6 } - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "right_arm_J1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J2" q_lb: -1.64 q_ub: 1.64 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J4" q_lb: -1.60 q_ub: 1.60 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J6" q_lb: -0.37 q_ub: 0.79 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -0.61 q_ub: 0.58 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "right_arm_J1" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 2 joint_name: "right_arm_J2" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 3 joint_name: "right_arm_J3" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 4 joint_name: "right_arm_J4" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 5 joint_name: "right_arm_J5" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 6 joint_name: "right_arm_J6" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 7 joint_name: "right_arm_J7" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } -} diff --git a/cmvr-es/config/devices/motor/mujoco_motors.pb.txt b/cmvr-es/config/devices/motor/mujoco_motors.pb.txt deleted file mode 100644 index 448270e3..00000000 --- a/cmvr-es/config/devices/motor/mujoco_motors.pb.txt +++ /dev/null @@ -1,35 +0,0 @@ -motor { - id: "mujoco_motors" - - motor_groups { - id: "right_arm_mujoco_motors" - bus_type: MOTOR_BUS_MUJOCO - vendor: MOTOR_VENDOR_MUJOCO - protocol: MOTOR_PROTOCOL_MUJOCO - mujoco { - world_id: "mujoco_world" - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "R_SHOULDER_P" } - motors { id: 2 joint_name: "R_SHOULDER_R" } - motors { id: 3 joint_name: "R_SHOULDER_Y" } - motors { id: 4 joint_name: "R_ELBOW_R" } - motors { id: 5 joint_name: "R_WRIST_P" } - motors { id: 6 joint_name: "R_WRIST_Y" } - motors { id: 7 joint_name: "R_WRIST_R" } - } - } -} diff --git a/cmvr-es/config/devices/motor/mujoco_motors_gen2.pb.txt b/cmvr-es/config/devices/motor/mujoco_motors_gen2.pb.txt deleted file mode 100644 index a45bafae..00000000 --- a/cmvr-es/config/devices/motor/mujoco_motors_gen2.pb.txt +++ /dev/null @@ -1,35 +0,0 @@ -motor { - id: "mujoco_motors" - - motor_groups { - id: "right_arm_mujoco_motors" - bus_type: MOTOR_BUS_MUJOCO - vendor: MOTOR_VENDOR_MUJOCO - protocol: MOTOR_PROTOCOL_MUJOCO - mujoco { - world_id: "mujoco_world" - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "right_arm_J1" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J2" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J3" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J4" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J5" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J6" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "right_arm_J1" } - motors { id: 2 joint_name: "right_arm_J2" } - motors { id: 3 joint_name: "right_arm_J3" } - motors { id: 4 joint_name: "right_arm_J4" } - motors { id: 5 joint_name: "right_arm_J5" } - motors { id: 6 joint_name: "right_arm_J6" } - motors { id: 7 joint_name: "right_arm_J7" } - } - } -} diff --git a/cmvr-es/config/devices/motor/tchl_dual_arm_motors.pb.txt b/cmvr-es/config/devices/motor/tchl_dual_arm_motors.pb.txt deleted file mode 100644 index 3ea59db9..00000000 --- a/cmvr-es/config/devices/motor/tchl_dual_arm_motors.pb.txt +++ /dev/null @@ -1,95 +0,0 @@ -motor { - id: "tchl_dual_arm_motors" - - motor_groups { - id: "tchl_dual_arm_motors" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_TCHL - protocol: MOTOR_PROTOCOL_ETHERCAT_CIA402 - - ethercat { - master_index: 0 - cycle_us: 1000 - slave_op_timeout_ms: 12000 - slave_state_poll_period_ms: 10 - - cia402 { - state_transition_timeout_ms: 1200 - velocity_stop_timeout_ms: 2000 - status_poll_period_ms: 10 - stopped_velocity_tolerance_rad_s: 0.001 - } - - zero_calibration { - timeout_ms: 2000 - poll_period_ms: 10 - stable_sample_count: 5 - position_tolerance_counts: 10000 - stable_delta_counts: 1000 - } - - dc { - enable: false - reference_motor_id: 1 - sync0_cycle_us: 1000 - sync0_shift_us: 0 - sync_reference_clock_period: 1 - assign_activate: 768 - sync_monitor_period_ms: 1000 - } - - # Junction position 0: Port 1 -> right arm J1-J7 (positions 1-7). - slaves { motor_id: 1 alias: 0 position: 1 } - slaves { motor_id: 2 alias: 0 position: 2 } - slaves { motor_id: 3 alias: 0 position: 3 } - slaves { motor_id: 4 alias: 0 position: 4 } - slaves { motor_id: 5 alias: 0 position: 5 } - slaves { motor_id: 6 alias: 0 position: 6 } - slaves { motor_id: 7 alias: 0 position: 7 } - # Junction Port 2 -> left arm J1-J7 (positions 8-14). - slaves { motor_id: 8 alias: 0 position: 8 } - slaves { motor_id: 9 alias: 0 position: 9 } - slaves { motor_id: 10 alias: 0 position: 10 } - slaves { motor_id: 11 alias: 0 position: 11 } - slaves { motor_id: 12 alias: 0 position: 12 } - slaves { motor_id: 13 alias: 0 position: 13 } - slaves { motor_id: 14 alias: 0 position: 14 } - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "right_arm_J1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J2" q_lb: -1.96 q_ub: 2.02 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J4" q_lb: -2.04 q_ub: 1.10 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J6" q_lb: -3.14 q_ub: 0.21 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J2" q_lb: -2.02 q_ub: 1.96 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J4" q_lb: -1.10 q_ub: 2.04 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J6" q_lb: -0.21 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J7" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "right_arm_J1" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 2 joint_name: "right_arm_J2" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 3 joint_name: "right_arm_J3" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 4 joint_name: "right_arm_J4" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 5 joint_name: "right_arm_J5" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 6 joint_name: "right_arm_J6" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 7 joint_name: "right_arm_J7" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 8 joint_name: "left_arm_J1" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 9 joint_name: "left_arm_J2" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 10 joint_name: "left_arm_J3" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 11 joint_name: "left_arm_J4" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 12 joint_name: "left_arm_J5" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 13 joint_name: "left_arm_J6" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - motors { id: 14 joint_name: "left_arm_J7" encoder_counts_per_rev: 131072 gear_ratio: 101.0 } - } - } -} diff --git a/cmvr-es/config/devices/motor/tchl_motors.pb.txt b/cmvr-es/config/devices/motor/tchl_motors.pb.txt deleted file mode 100644 index 56672f9d..00000000 --- a/cmvr-es/config/devices/motor/tchl_motors.pb.txt +++ /dev/null @@ -1,54 +0,0 @@ -# 同川 TC600E TR 单轴模板;未注册为活动设备。 -# 当前按实机 PrD.00=0、电子齿轮1:1配置;减速比需读取实机3D06后填写。 -motor { - id: "tchl_motors" - - motor_groups { - id: "tchl_single_axis" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_TCHL - protocol: MOTOR_PROTOCOL_ETHERCAT_CIA402 - - ethercat { - master_index: 0 - cycle_us: 1000 - slave_op_timeout_ms: 12000 - slave_state_poll_period_ms: 10 - - cia402 { - state_transition_timeout_ms: 1200 - velocity_stop_timeout_ms: 2000 - status_poll_period_ms: 10 - stopped_velocity_tolerance_rad_s: 0.001 - } - - dc { - enable: false - reference_motor_id: 1 - sync0_cycle_us: 1000 - sync0_shift_us: 0 - sync_reference_clock_period: 1 - assign_activate: 768 - sync_monitor_period_ms: 1000 - } - - slaves { motor_id: 1 alias: 0 position: 0 } - } - - # 必须先填写实际行程及速度/加速度上限,再设 enable: true;0不是可运行值。 - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "TCHL_AXIS_1" q_lb: -3.14 q_ub: 3.14 qd: 10 qdd: 100 } - } - - motors { - motors { - id: 1 - joint_name: "TCHL_AXIS_1" - encoder_counts_per_rev: 131072 - gear_ratio: 101 - } - } - } -} diff --git a/cmvr-es/config/devices/motor/tchl_multi_motors.pb.txt b/cmvr-es/config/devices/motor/tchl_multi_motors.pb.txt deleted file mode 100644 index c528c9ec..00000000 --- a/cmvr-es/config/devices/motor/tchl_multi_motors.pb.txt +++ /dev/null @@ -1,64 +0,0 @@ -# 同川 TC600E TR 七轴模板;设备管理器默认不启用。 -# 各轴按实机确认 PrD.00、电子齿轮、编码器分辨率和减速比。 -# 以下 131072 / 101 仅为 PrD.00=0、电子齿轮 1:1 的配置示例。 -motor { - id: "tchl_motors" - - motor_groups { - id: "tchl_joint_motors" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_TCHL - protocol: MOTOR_PROTOCOL_ETHERCAT_CIA402 - - ethercat { - master_index: 0 - cycle_us: 1000 - slave_op_timeout_ms: 12000 - slave_state_poll_period_ms: 10 - - cia402 { - state_transition_timeout_ms: 1200 - velocity_stop_timeout_ms: 2000 - status_poll_period_ms: 10 - stopped_velocity_tolerance_rad_s: 0.001 - } - - dc { enable: false } - - slaves { motor_id: 1 alias: 0 position: 0 } - slaves { motor_id: 2 alias: 0 position: 1 } - slaves { motor_id: 3 alias: 0 position: 2 } - slaves { motor_id: 4 alias: 0 position: 3 } - slaves { motor_id: 5 alias: 0 position: 4 } - slaves { motor_id: 6 alias: 0 position: 5 } - slaves { motor_id: 7 alias: 0 position: 6 } - - } - - # 示例限位;启用设备前按各轴实际行程和允许速度、加速度填写。 - # q: rad,qd: rad/s,qdd: rad/s^2。 - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "TCHL_AXIS_1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_2" q_lb: -1.96 q_ub: 2.02 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_4" q_lb: -2.04 q_ub: 1.10 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_6" q_lb: -3.14 q_ub: 0.21 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_7" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - - } - - motors { - motors { id: 1 joint_name: "TCHL_AXIS_1" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 2 joint_name: "TCHL_AXIS_2" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 3 joint_name: "TCHL_AXIS_3" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 4 joint_name: "TCHL_AXIS_4" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 5 joint_name: "TCHL_AXIS_5" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 6 joint_name: "TCHL_AXIS_6" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 7 joint_name: "TCHL_AXIS_7" encoder_counts_per_rev: 131072 gear_ratio: 101 } - - } - } -} diff --git a/cmvr-es/config/devices/motor/ti5_motors.pb.txt b/cmvr-es/config/devices/motor/ti5_motors.pb.txt deleted file mode 100644 index 173d7b1c..00000000 --- a/cmvr-es/config/devices/motor/ti5_motors.pb.txt +++ /dev/null @@ -1,99 +0,0 @@ -motor { - id: "ti5_motors" - - motor_groups { - id: "left_arm_can_motors" - bus_type: MOTOR_BUS_CAN - vendor: MOTOR_VENDOR_TI5 - protocol: MOTOR_PROTOCOL_CANOPEN - can { - channel_id: 0 - } - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_URDF - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - } - motors { - motors { id: 23 joint_name: "L_SHOULDER_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 24 joint_name: "L_SHOULDER_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 25 joint_name: "L_SHOULDER_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 26 joint_name: "L_ELBOW_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 27 joint_name: "L_WRIST_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 28 joint_name: "L_WRIST_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 29 joint_name: "L_WRIST_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } - - motor_groups { - id: "right_arm_can_motors" - bus_type: MOTOR_BUS_CAN - vendor: MOTOR_VENDOR_TI5 - protocol: MOTOR_PROTOCOL_CANOPEN - can { - channel_id: 1 - } - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - } - motors { - motors { id: 16 joint_name: "R_SHOULDER_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 17 joint_name: "R_SHOULDER_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 18 joint_name: "R_SHOULDER_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 19 joint_name: "R_ELBOW_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 20 joint_name: "R_WRIST_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 21 joint_name: "R_WRIST_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 22 joint_name: "R_WRIST_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } - - motor_groups { - id: "head_can_motors" - bus_type: MOTOR_BUS_CAN - vendor: MOTOR_VENDOR_TI5 - protocol: MOTOR_PROTOCOL_CANOPEN - can { - channel_id: 2 - } - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "HEAD_Y" q_lb: -3.14 q_ub: 3.14 qd: 3.0 } - joints { joint_name: "HEAD_P" q_lb: -3.14 q_ub: 3.14 qd: 3.0 } - joints { joint_name: "HEAD_R" q_lb: -3.14 q_ub: 3.14 qd: 3.0 } - } - motors { - motors { id: 32 joint_name: "HEAD_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 30 joint_name: "HEAD_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 31 joint_name: "HEAD_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } - - motor_groups { - id: "waist_can_motors" - bus_type: MOTOR_BUS_CAN - vendor: MOTOR_VENDOR_TI5 - protocol: MOTOR_PROTOCOL_CANOPEN - can { - channel_id: 3 - } - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "WAIST_Y" q_lb: -3.14 q_ub: 3.14 qd: 3.0 } - joints { joint_name: "WAIST_P" q_lb: -3.14 q_ub: 3.14 qd: 3.0 } - } - motors { - motors { id: 4 joint_name: "WAIST_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 15 joint_name: "WAIST_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } -} diff --git a/dependency/x86/third_party/ethercat/v1.7.0/etc/ethercat.conf b/dependency/x86/third_party/ethercat/v1.7.0/etc/ethercat.conf index 9ec7a2ce..5ba100d7 100644 --- a/dependency/x86/third_party/ethercat/v1.7.0/etc/ethercat.conf +++ b/dependency/x86/third_party/ethercat/v1.7.0/etc/ethercat.conf @@ -1,3 +1,3 @@ -MASTER0_DEVICE="a0:ad:9f:c4:c2:2c" -DEVICE_MODULES="generic" -UPDOWN_INTERFACES="eno1" +MASTER0_DEVICE="00:e0:4c:a2:ea:25" +DEVICE_MODULES="igc" +UPDOWN_INTERFACES="enp2s0"