mycobot_ros/READMEcn.md
2021-04-01 20:06:19 +08:00

2.6 KiB

myCobotROS

jaywcjlove/sb

English | 中文

Demo

注意:

请确保顶部的 Atom 烧入 Atom,底部的 Basic 烧入 Transponder。烧录工具的下载地址: https://github.com/elephantrobotics/myCobot/tree/main/Software
该包的测试环境:
     ubuntu: 16.04LTS
     ros version: 1.12.17

如果你的Atom 是 2.3 或更早的, 或者 pymycobot 是 1.*, 请查看分支 before

ROS 下载地址:http://wiki.ros.org/ROS/Installation

1. 安装

1.1 前提

要使用该包,请确保 python api 已正确安装。

pip install pymycobot --user

1.2 Ros 包的下载和安装

将该 ros 包安装到 Catkin 的 src 文件夹中。

$ cd ~/catkin_ws/src
$ git clone https://github.com/elephantrobotics/myCobotROS.git
$ cd ~/catkin_ws
$ catkin_make

1.3 你可以选择测试 Python API

cd ~/catkin_ws/src/myCobotROS
python scripts/test.py

2. 模块

2.1 节点

  • display 展示节点。 同步展示 myCobot 的姿态到仿真的模型。
  • control_slider 通过滑动条控制 myCobot。
  • control_marker 通过可交互的标记控制 myCobot。

2.2 主题

  • joint_states - 控制和记录 myCobot 的状态.

    Message_type: std_msgs/JointState
    Data: position[float, float, float, float, float, float]
    

3. RViz 可视化

3.1 功能

  • 可视化 -- display.launch: This function will display robot arm movement in realtime when you manually move mycobot.

  • 控制 -- control.launch: This function will allow you use slider bar to control movement of the robot arm.

3.2 启动和运行

  • 使用滑块控制

    • 启动 ros 和 rviz
    roslaunch myCobotROS control_slider.launch
    
    • 运行 python 脚本
    rosrun myCobotROS control_slider.py
    
  • 仿真模型同步机械臂

    • 启动 ros 和 rviz
    roslanuch myCobotROS mycobot.launch
    
    • 运行 python 脚本
    rosrun myCobotROS display.py
    

Q & A

Q: error[101]

A: 请确保的你的串口没有被占用,以及 Basic 和 Atom 烧入了正确的固件。