Skip to main content

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

If you're not sure about the file name format, learn more about wheel file names.

rabo_robocap-2.0.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file rabo_robocap-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: rabo_robocap-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for rabo_robocap-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4abb13c1caeb2ea1c4e245acd4fe88a12cc9560670328d9ec74528a60d8e31d
MD5 af9e301ba5a95bd499ecafa03944dec3
BLAKE2b-256 efdb40b2d6724112cc256c7561078bc5bf3f9cf4d07e4268b9ee5d31e5809425

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page