MIT License

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

HyperDog ROS2 项目深度技术分析

项目背景与痛点

HyperDog 是基于 ROS 2 和 Micro-ROS 构建的一款四足机器人平台。针对传统机器人平台开发过程中编译效率低下以及通信延迟的问题,HyperDog 提供了一个高度集成的软件框架,同时也支持微控制器级别的实时通信。该框架特别适合开发需要高效实时控制的四足机器人应用,解决了开发者在处理复杂机器人系统时所面临的痛点。

核心技术揭秘

HyperDog 采用了 ROS 2 作为其主干开发框架,这使得开发人员能够在一个高度模块化的环境中开发复杂的应用程序。Micro-ROS 的引入不仅提供了实时通信的支持,还确保了系统即便在资源限制严格的硬件上也能高效运作。

整个系统的架构可以概括如下:

graph TD subgraph "主控节点" A[ROS 2 节点开发] B[ROS 2 订阅器与发布器] end C{"硬件抽象层"} subgraph "Micro-ROS 模块" D[微控制器支持单元] E[实时通信协议] end F[高精度传感器数据处理] A --> B B --> C C --> D D --> E E --> F F --> C
  • 主控节点:ROS 2 提供了强大的节点架构,可以灵活配置各类开发任务。
  • 硬件抽象层:提供了高层次的接口来访问底层硬件,方便实现与具体硬件细节的解耦。
  • Micro-ROS 模块:提供了从硬件层面到软件应用层的实时通信支持。

其中,ROS 2 的实时通信能力和 Micro-ROS 的微控制器优化,确保了系统能够在拥有多种传感器和执行器的复杂四足机器人平台上顺畅运行,提供高性能的控制和数据处理能力。

功能亮点与差异

HyperDog 项目的核心差异在于它对实时环境友好。传统解决方案通常无法在低资源环境中保持高效通信,但得益于 ROS 2 的异步特性和 Micro-ROS 的精简设计,HyperDog 能够无缝支持资源受限的嵌入式系统。

此外,该项目还提供了详尽的文档与案例,引导开发者从零开始构建复杂的四足机器人应用。这让开发者更好地理解整个框架的运作机制。

应用场景与落地建议

对于希望实现高效实时控制和通信的四足机器人项目,HyperDog 提供了一个很好的解决方案。尤其是在需要精确的步态控制和传感器集成的情况下,HyperDog 能够提供坚实的软件和硬件支持。

在生产环境中使用 HyperDog 时,需要注意以下几点:

  • 硬件兼容:确保配套硬件与系统兼容性。
  • 软件更新:及时跟进 ROS 2 和 Micro-ROS 的更新,以获得更好的性能和稳定性。
  • 实时性能:在关键时刻确保实时性能,以预防速度不够造成的不稳定。

综合评价

HyperDog ROS2 项目提供了一种全新的机器人开发方式,将实时通信协议和高效开发环境相结合。在次领域无疑颇具优势,解决了现有解决方案的痛点,但也需要开发者对底层硬件和实时操作系统有一定的了解。其独特的架构和技术栈使其在实时系统中表现出色,但也带来了一定的学习成本。总体来说,HyperDog 为追求高性能、低延迟的机器人应用提供了强大的支持。

关于

GitHub 原始描述(英文)

HyperDog is a quadruped robot which is fully based on ROS 2 and Micro-ROS

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
222
价值分
98
活跃状态
活跃

语言占比

C++
CMake
Python

README

hyperdog_ros2

HyperDog is a quadruped robot which is fully based on ROS 2 and Micro-ROS.

Publications:

YouTube:

Contains

This repository contains ros2 packages for quadruped robot HyperDog. packages are :

  1. hyperdog_msgs : this package contains the msgs those used by other packages.

    1. JoyCtrlCmds : this contains the control variables of the robot from the gamepad

      • bool[3] states : { start, walk, side_move_mode}
      • uint8 gait_type : to change the gait type
      • geometry_msgs/Pose pose : to control slant(x,y) and roll,pitch,yaw
      • geometry_msgs/Vector3 gait_step : gait_step.x = steplen_x, gait_step.y = steplen_y, gait_step.z = swing_height
    2. Geometry: this contains the parameters for coordinate of each leg and body orientation(roll,pitch,yaw)

      • geometry_msgs/Point32 fr : x,y,z end effector coordinates of FR leg
      • geometry_msgs/Point32 fl : x,y,z end effector coordinates of FL leg
      • geometry_msgs/Point32 br : x,y,z end effector coordinates of BR leg
      • geometry_msgs/Point32 bl : x,y,z end effector coordinates of BL leg
      • geometry_msgs/Quaternion euler_ang : roll, pitch, yaw angles
  2. hyperdog_teleop : this pkg creates `/hyperdog_teleop_gamepad_node.

    • Node 1 : /joy_node This node creates commands to robot from Gamepad commands
      • subscriber : /joy_node
      • publisher : /hyperdog_joy_ctrl_cmd using the interface hyperdog_msgs/msg/JoyCtrlCmd
  3. hyperdog_ctrl : This pkg has Body_motion_planner and gait_generater and creates the nodes /command_manager_node and /IK_node

    • Body_motion_planner : plans body motions from control commands receive from /command_manager_node

    • gait_generator : generates gaits acording to the given gait_type command from the Gamepad

    • Node 1 : /command_manager_node

      • subscriber : /hyperdog_joy_ctrl_cmd via hyperdog_msgs/msg/JoyCtrlCmds interface
      • publisher : /hyperdog_geometry via hyperdog_msgs/msg/Geometry interface
    • Node 2 : /IK_node

      • subscriber : /hyperdog_geometry via hyperdog_msgs/msg/Geometry interface
      • publisher : /hyperdog_jointController/commands
  4. uros : this is the micro_ros package from its official git. this package is used to launch micro_ros_agent to communicate with micro-controllers which run micro_ros via ROS2

  5. hyperdog_launch : This contains the launch file for all the above nodes and micro_ros_agent

  6. hyperdog_gazebo_sim : Gazebo simmulation

  7. hyperdog_gazebo_joint_cmd : this pkg contains the node /hyperdog_gazebo_joint_cmd to send joint angles to gazebo

    • Node : /hyperdog_gazebo_joint_cmd
      • subscriber : /hyperdog_jointController/commands
      • publisher : '/gazebo_joint_controller/commands`

Building

  1. Create a ROS2 workspace and build this package for ROS2 foxy
# make the workspace
mkdir hyperdog_ws/src 
cd hyperdog_ws/src

# download the pkg
git clone https://github.com/NDHANA94/hyperdog_ros2.git

# build the pkg
cd .. 
colcon build
  1. build micro_ros_agent in hyperdog_ws from the git repository https://github.com/micro-ROS/micro_ros_setup/tree/foxy. follow instuction and build the micro_ros_agent.
  2. edit line 41 in hyperdog_ros2/src/hyperdog_launch/launch/hyperdog.launch.py script to configure your serial port.
  3. go to hyperdog_ws directory and build all the packages again

Launching

source the workspace

source hyperdog_ws/install/setup.bash

to add workspace source permenently to .bashrc:

  
  # add source 
  echo "source /home/$USER/hyperdog_ws/install/setup.bash" >> ~/.bachrc

to launch run following

ros2 launch hyperdog_launch hyperdog.launch.py

to launch gazebo with hyperdog

ros2 launch hyperdog_gazebo_sim hyperdog_gazebo_sim.launch.py

Known bugs:

  • gazebo-ros2-control pkg doesn’t work properly. So the robot slides on the ground.

评论

暂无评论