rabo_robocap: ROS2 机器人能力封装
Project description
rabo_robocap
ROS2 机器人能力封装 SDK,为 Gazebo 仿真中的机器人提供高级控制接口。
支持热更新:pip install 一次后,每次 import 自动获取最新版本。
安装
# 1. 安装 Python 包(仅需一次)
pip install rabo_robocap
# 2. 构建 ROS2 消息包(需要 ROS2 环境)
cd ~/ros2_ws/src/rabo-lib
colcon build --paths rabo_robocap_msgs
source install/setup.bash
详细构建说明请参考 构建指南。
使用
移动底盘
from rabo_robocap import AgilexScoutMini
# 仿真模式(自动从 API 获取配置,rclpy 自动初始化)
base = AgilexScoutMini(robot_id='scout_model', mode='sim')
# 或 真实硬件模式
# base = AgilexScoutMini(robot_id='scout', mode='real')
base.set_velocity(linear_x=0.5, angular_z=0.0)
base.move_distance(1.0)
x, y, theta = base.get_odometry()
print(f"Position: ({x:.2f}, {y:.2f}), Heading: {theta:.2f}")
base.shutdown()
机械臂
import numpy as np
from rabo_robocap import UR5
# 仿真模式
arm = UR5(robot_id='ur5_model', mode='sim')
# 或 真实硬件
# arm = UR5(robot_id='ur5', mode='real')
# 移动到 ready 位置
arm.move_joints([0, -np.pi/2, np.pi/2, -np.pi/2, -np.pi/2, 0])
# 移动到目标位置
arm.move_to(0.3, 0.2, 0.4)
# 获取当前位姿
pos, ori = arm.get_pose()
print(f"Position: {pos}")
arm.shutdown()
版本管理
import rabo_robocap
# 查看当前版本
print(rabo_robocap.__version__)
# 查看更新状态
rabo_robocap.check_update()
注意:
- rclpy 自动初始化,无需手动调用
rclpy.init() - 节点内部自动管理 ROS2 回调,不要将节点添加到外部 executor
文档
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rabo_robocap-2.0.2-py3-none-any.whl.
File metadata
- Download URL: rabo_robocap-2.0.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1ae0f1c53c9d2180a548ca8ade72dbbcf9871c99fa74c162dfc32a2110dc783
|
|
| MD5 |
1e1b1334897012372590cd05400035e1
|
|
| BLAKE2b-256 |
2ae7ecf7142994b3601d78964916e50e45187b8464774ceb8ff8e2beac09599a
|