# diffrobot **Repository Path**: lucapog/diffrobot ## Basic Information - **Project Name**: diffrobot - **Description**: 使用ros2_control框架,ros2_socketcan作为can通信中间层的差速机器人 - **Primary Language**: C++ - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://gitee.com/lucapog - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-25 - **Last Updated**: 2025-05-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # diffrobot *DiffBot*, or ''Differential Mobile Robot'', is a simple mobile base with differential drive. The robot is basically a box moving according to differential drive kinematics. Find the documentation in [doc/userdoc.rst](doc/userdoc.rst) or on [control.ros.org](https://control.ros.org/master/doc/ros2_control_demos/example_2/doc/userdoc.html). #### 介绍 使用ros2_control框架,ros2_socketcan作为can通信中间层的差速机器人 ## Building and Running 1. 安装依赖项。 ```shell sudo rosdepc init # 初始化 rosdepc update # 更新本地缓存 rosdepc install --from-paths src --ignore-src -r -y # 安装依赖项 rosdepc check --from-paths src # 验证依赖是否已满足 ``` 2. 编译。 ```shell colcon build # 编译 ``` 3. 启动 CAN 通信节点,并过滤掉 CAN 接收超时的日志信息。一切控制器节点都依赖于 CAN 通信节点,因此应该在此之后启动。 ```shell ros2 launch diff_robot can_bridge.launch.py | grep -v "CAN Receive Timeout" ``` The launch file can_bridge.launch.py starts the CAN bridge node and filters out the CAN receive timeout log messages. ### All controller nodes depend on the CAN bridge node, so it should be launched after this. 4. 启动 DiffBot 控制器节点。通过发布/cmd_vel消息控制 DiffBot 移动,消息类型为geometry_msgs/TwistStamped。 ```shell ros2 launch diff_robot diff_drive_controller.launch.py ``` This command launches the controller node for the DiffBot. It controls the DiffBot by publishing a /cmd_vel message of type geometry_msgs/TwistStamped. ## 作者 - [Cyy](https://gitee.com/lucapog)