Commit Graph

93 Commits

Author SHA1 Message Date
827ccdb438 perf(continuous_move): 将连续运动线程频率从50Hz提升至100Hz以改善运动平滑度 2025-10-09 19:24:01 +08:00
2e60da5b5b refactor(robot_control): 移除轨迹模式功能并添加连续移动控制
移除原有的复杂轨迹模式实现(包括正弦波、圆形、正方形等路径生成),
替换为更简单的连续移动控制接口,支持直接设置速度参数(vx,vy,vyaw)。
修改了相关线程控制和运动命令处理逻辑,简化了代码结构。
2025-10-09 19:17:26 +08:00
06bf2fa208 feat(轨迹控制): 为start_traj命令添加参数解析功能
扩展start_traj命令以支持从消息中解析轨迹参数,包括模式、比例、速度等配置项。这使得轨迹控制更加灵活可配置。
2025-10-09 18:26:07 +08:00
993ed111a6 feat(轨迹控制): 添加多种轨迹模式支持并重构轨迹生成逻辑
新增轨迹模式枚举和参数结构体,支持正弦波、圆形、正方形、菱形和8字形五种轨迹模式
重构轨迹生成逻辑为独立的生成函数,增加参数验证和配置灵活性
2025-10-09 17:49:08 +08:00
5b5d390bc4 refactor(monitor): 移除调试用的打印语句以清理输出 2025-10-09 16:56:53 +08:00
80060562e8 fix: 更新MQTT代理服务器IP地址
将MQTT代理服务器地址从192.168.2.236更改为192.168.11.24以匹配新的网络配置
2025-10-09 16:43:13 +08:00
3a209734de feat(robot): 添加监控模块到自定义机器人
在自定义机器人中添加Monitor模块,用于监控机器人状态。包括在头文件中添加Monitor成员变量声明,在实现文件中添加初始化和资源释放逻辑。
2025-09-30 16:38:00 +08:00
d3487a2613 feat(monitor): 添加监控模块用于订阅和打印运动状态和里程计数据
添加新的Monitor类,用于订阅并打印SportModeState和Odometry消息数据
移除custom_robot.cpp中冗余的日志信息
更新CMakeLists.txt以包含新的监控模块
2025-09-30 15:53:12 +08:00
99b5b17421 refactor(custom_robot): Add logging for dynamic trajectory control start
- Introduced a log message to indicate the start of dynamic trajectory control in the trajControl method, enhancing traceability during execution.
2025-09-27 16:46:53 +08:00
789e85c5a2 refactor(custom_robot): Reorganize trajectory control and remove example trajectory generation
- Moved the trajControl method to the private section of the CustomRobot class for better encapsulation.
- Introduced traj_dt_ and traj_count_ member variables to manage trajectory timing and state.
- Removed the createExampleTrajectory function to streamline the code and eliminate unused functionality in trajectory handling.
2025-09-27 16:29:41 +08:00
f430360516 refactor(recharge): Add include for ROS2 String message
- Added #include for unitree/idl/ros2/String_.hpp in recharge.hpp to support new functionality related to ROS2 string messages.
2025-09-23 19:29:13 +08:00
f0e516a1a3 refactor(custom_robot): Remove unused method calls in destructor and stopTraj
- Deleted the Close method call for the recharge object in the CustomRobot destructor to simplify resource management.
- Removed the Stop method call for the traj_th_ thread in stopTraj, streamlining the stopping process of trajectory control.
2025-09-23 19:25:39 +08:00
9ac38382a3 refactor(custom_robot): Remove FootRaiseHeight command processing
- Deleted the FootRaiseHeight command processing from the CustomRobot class to streamline command handling and eliminate unused functionality.
2025-09-23 19:24:47 +08:00
acae58fa18 refactor(controller): Remove StaticWalk method from controller interface
- Deleted the StaticWalk method from the controller header and implementation files to streamline the interface and eliminate unused functionality.
2025-09-23 19:23:34 +08:00
175b37ad49 refactor(controller): Replace ClassicWalk with StaticWalk method
- Renamed the ClassicWalk method to StaticWalk in the controller interface, removing the flag parameter for a simplified usage.
- Updated the implementation to reflect the new method signature, ensuring consistency across the controller functionality.
2025-09-23 19:22:08 +08:00
44becb76e6 refactor(controller): Update TrajectoryFollow method signature to accept non-const reference
- Modified the TrajectoryFollow method in both the header and implementation files to accept a non-const reference to a vector of unitree::robot::go2::PathPoint, allowing for in-place modifications of the path.
2025-09-23 19:19:18 +08:00
d66fbae01f feat(controller): Add ClassicWalk method to controller interface
- Introduced a new method ClassicWalk to the controller class, allowing for additional walking functionality.
2025-09-23 19:15:12 +08:00
0238455ce0 refactor(recharge): Remove unused include for ROS2 String message
- Deleted the unused #include for std_msgs/msg/dds_/_String.hpp in recharge.hpp to clean up the codebase.
2025-09-23 19:12:16 +08:00
97c16f3d44 refactor(custom_robot): Remove unused MQTT client include
- Deleted the unused #include for mqtt_client.hpp in custom_robot.hpp to clean up the codebase.
2025-09-23 19:10:08 +08:00
e3ba6f7225 refactor(custom_robot): Simplify SwitchSet command processing
- Removed redundant state retrieval for the SwitchSet command.
- Added error handling for missing 'enable' parameter in the command message.
- Streamlined the logic for setting the switch state based on the provided parameter.
2025-09-23 19:09:13 +08:00
4a06204645 feat(trajectory): Implement dynamic trajectory control in CustomRobot
- Added methods for trajectory control: trajControl, startTraj, and stopTraj.
- Integrated trajectory control into command processing for starting and stopping dynamic trajectories.
- Introduced a recurrent thread for continuous trajectory updates at a frequency of 50Hz.
- Initialized trajectory control state management with atomic flags.
2025-09-23 18:55:31 +08:00
6c8a4a3b38 refactor(controller): Update TrajectoryFollow method signature and improve path handling
- Changed the signature of TrajectoryFollow to accept a vector of unitree::robot::go2::PathPoint instead of std::array<float, 6>.
- Updated the implementation of TrajectoryFollow in controller.cpp to utilize the new path type.
- Removed unnecessary status message in CMakeLists.txt related to unitree_sdk2 detection.
- Added a new function in custom_robot.cpp to create example trajectories for different path types (line, square, circle) and integrated it into the command processing for TrajectoryFollow.
2025-09-23 18:40:42 +08:00
e0e1b5f642 feat(recharge): Implement automatic recharge functionality
- Added Recharge class for managing automatic recharge capabilities using ArUco markers.
- Integrated recharge functionality into CustomRobot, including command processing for starting and stopping recharge.
- Updated CMakeLists.txt to include the new recharge.cpp source file.
- Enhanced README.md to document the new auto recharge support feature.
2025-09-23 18:27:30 +08:00
6fe07ac73c refactor(custom_robot): 移除与low_controller相关的注释代码
清理不再使用的low_controller相关代码注释,保持代码整洁
2025-09-23 10:36:02 +08:00
4cce0b69c8 refactor(custom_robot): Disable LowController functionality temporarily
- Commented out all references to LowController in custom_robot.hpp and custom_robot.cpp to disable its functionality.
- Added warning log in processLowCmd to indicate that LowController functionality is currently disabled until re-implementation.
2025-09-22 19:50:39 +08:00
20d75ca377 feat(logger): Enhance logging functionality with variadic templates for formatted messages
- Added variadic template methods to the Logger class for formatted logging at different log levels (debug, info, warn, error).
- Updated existing logging calls in CustomRobot to utilize the new formatted logging methods for improved readability and consistency.
- Removed the old log method implementation from logger.cpp to streamline the codebase.
2025-09-22 19:35:03 +08:00
5247295521 refactor(low_controller): 移动UT_CPU_ID_NONE定义并更新引用
将UT_CPU_ID_NONE宏定义移动到头文件顶部常量定义区域
在cpp文件中使用新的宏定义位置替代完整命名空间引用
2025-09-22 19:29:17 +08:00
95446bdc94 refactor(low_controller): 移除停止时的线程清理并添加CPU ID宏定义
移除LowController::stop()中不必要的线程清理代码,因为running_标志位已足够控制线程行为
在头文件中添加UT_CPU_ID_NONE宏定义用于CPU标识
2025-09-22 19:27:04 +08:00
a2a3040967 refactor(custom_robot): 移除服务列表的详细日志输出
移除GetServiceList方法中对每个服务状态的详细日志输出,保留获取服务列表成功的基本日志
2025-09-22 19:21:55 +08:00
c5cff9fbdb feat(low_controller): Integrate LowController for low-level command handling
- Added LowController class to manage low-level commands and communication.
- Updated CustomRobot to initialize and manage LowController, including methods for processing low-level commands.
- Enhanced logger functionality with variadic template methods for formatted logging.
- Updated CMakeLists.txt to include the new low_controller.cpp source file and low_controller.hpp header.
2025-09-22 19:11:20 +08:00
1a0618f50f refactor(controller): Remove unused motion control methods and update CMake configuration
- Removed several unused methods from the Controller class, including HandStand, ClassicWalk, AutoRecoverSet, StaticWalk, TrotRun, EconomicGait, and SwitchAvoidMode.
- Updated CMakeLists.txt to remove the hardcoded include path for unitree SDK, streamlining the include directories for the main target.
2025-09-22 16:03:43 +08:00
af7eeafd0f build(CMake): Add status message for unitree_sdk2 detection
- Included a status message to confirm the location of the found unitree_sdk2 during the CMake configuration process.
2025-09-22 15:55:19 +08:00
d7c51ac004 refactor(CMake): Add include directory for unitree SDK
- Included the path for unitree SDK in the CMake configuration to ensure proper access to necessary headers.
2025-09-22 15:53:11 +08:00
513fbe8d6a refactor(CMake): Update include directories for main target
- Reintroduced the target include directory for the main target to use a hardcoded path.
- Removed the previous target include directory declaration to streamline the configuration.
2025-09-22 15:44:15 +08:00
ec880c8a8d refactor(CMake): Rename project from 'lzwc_go2' to 'main'
- Updated the project name in CMakeLists.txt to reflect a more generic naming convention.
2025-09-22 15:42:22 +08:00
317b375bad refactor(CMake): Remove debug messages and update include directories
- Removed status messages for unitree_sdk2 include directories and libraries from the CMake configuration.
- Updated the target include directories for the main target to use a hardcoded path instead of the variable.
2025-09-22 15:40:25 +08:00
a058f3c2c9 build(CMake): Add debug messages for unitree_sdk2 include directories and libraries
- Added status messages to display the include directories and libraries for unitree_sdk2 during the CMake configuration process.
2025-09-22 15:37:06 +08:00
ef57e9b8a4 refactor(CMake): Rename project and update include directories
- Changed project name from 'unitree_go2_custom' to 'lzwc_go2'.
- Added include directory for 'unitree_sdk2' to the main target.
2025-09-22 15:33:00 +08:00
26b9c11a25 Revert "fix(custom_robot): Remove unused status variable in ServiceSwitch method"
This reverts commit 7afb7e2b77.
2025-09-22 15:26:00 +08:00
de6e080dca Revert "refactor(controller): Remove unused motion control methods"
This reverts commit bd023eaba3.
2025-09-22 15:25:42 +08:00
cdcc95bff3 Revert "refactor(controller): Remove additional unused motion control methods"
This reverts commit 2189d7841f.
2025-09-22 15:24:58 +08:00
2189d7841f refactor(controller): Remove additional unused motion control methods
- Deleted the UseRemoteCommandFromApi, MoveToAbsolutePosition, and MoveToIncrementPosition methods from the controller interface and implementation. This further simplifies the code structure and enhances maintainability.
2025-09-22 15:18:30 +08:00
bd023eaba3 refactor(controller): Remove unused motion control methods
- Eliminated several unused motion control methods from the controller interface and implementation, including Content, LeftFlip, BackFlip, HandStand, FreeWalk, FreeBound, FreeJump, FreeAvoid, ClassicWalk, WalkUpright, CrossStep, AutoRecoverSet, StaticWalk, TrotRun, and EconomicGait. This cleanup simplifies the code structure and improves maintainability.
2025-09-22 15:15:10 +08:00
7afb7e2b77 fix(custom_robot): Remove unused status variable in ServiceSwitch method
- Eliminated the unused 'status' variable from the ServiceSwitch method to streamline the code and improve clarity.
2025-09-22 15:08:33 +08:00
48cae46960 refactor(navigation): Update ChannelSubscriberPtr to use specific message type
- Changed ChannelSubscriberPtr to ChannelSubscriberPtr<std_msgs::msg::dds_::String_> for slamInfo and slamKeyInfo in navigation.hpp and navigation.cpp.
- Updated initialization of subscribers to reflect the new type specification.
2025-09-22 14:50:52 +08:00
6b9ad80757 fix(命名空间): 修复Unitree SDK类型命名空间问题并重构PoseData
- 将ChannelSubscriberPtr改为unitree::robot::ChannelSubscriberPtr
- 重构PoseData结构为poseDate类,增加JSON序列化功能
- 更新相关代码以使用新的poseDate类
2025-09-22 14:46:18 +08:00
ccaf5f3513 build: 更新导航头文件中的消息依赖
将std_msgs/msg/dds_/String_.hpp替换为unitree/idl/ros2/String_.hpp以使用统一的消息接口
2025-09-22 14:40:38 +08:00
1e4e5c3943 feat(服务监控): 添加服务状态自动打印功能
当获取服务列表时,系统现在会自动打印每个服务的状态信息到日志中,包括服务名称、当前状态(ACTIVE/INACTIVE)和保护状态(YES/NO)
2025-09-22 14:30:59 +08:00
ec6f4c0057 feat(导航): 实现SLAM信息处理和导航状态管理
添加SLAM信息订阅处理功能,包括位姿更新和任务结果处理
引入PoseData结构体存储当前位姿信息
使用常量定义替换硬编码的API ID
增加导航状态管理功能(到达检测)
2025-09-22 11:33:15 +08:00
1d8daa7542 fix(navigation): 修复Navigation类中Init方法的实现
移除对Client::Init()的显式调用,因为基类构造函数已处理该初始化。同时更新README.md中的相关描述。
2025-09-21 15:24:58 +08:00