qbrobotics五指灵巧手/qb soft hand使用概要

qbrobotics五指灵巧手/qb soft hand使用概要

qbhand

1 驱动及ROS包安装

2 连接及使用

2.1 单纯连接qb_hand

roslaunch qb_device_driver communication_handler.launch

On start, it scans the serial communication resources connected to you system and shows a list of the devices it has found. By default it never scans again for new devices, apart from asking it explicitly during the initialization of a control Node.
This is a simple example when starting the Communication Handler with two qbrobotics® devices connected on two distinct USB ports:

2.2 GUI控制

  • 打开GUI方法:
roslaunch qb_hand_control control.launch standalone:=true activate_on_initialization:=true use_controller_gui:=true

这种方法应该是没啥用,就是拉动进度条控制夹持器的开合程度(0-1)及速度(0-100%)。
GUI

This control mode is the one suggested to test that everything is working as expected.
You will probably need this only the very first times and for debugging.

2.3 Waypoints控制

简单来说,就是让夹持器按照config/<robot_name>_waypoints.yaml中的waypoints循环动作。官方默认的waypoints格式如下:

waypoints:
  -
    time: [2.0]
    joint_positions:
      qbhand: [0.0]
  -
    time: [4.0, 4.2]
    joint_positions:
      qbhand: [0.8]
  • 启动waypoint控制的命令
roslaunch qb_hand_control control.launch standalone:=true activate_on_initialization:=true use_waypoints:=true device_name:=qbhand

注意:

  • 设置use_waypoints:=true时,不能再设置use_controller_gui:=true
  • yaml文件的名称格式是<robot_name>_waypoints.yaml,如默认为qbhand_waypoints.yaml,但yaml文件(见上)中有一个参数为device_name,而device_namecontrol.launch中默认定义为<robot_name>+<device_id>,所以如果要使用默认的例程(device_name被写死为qbhand),务必重新传入参数device_name:=qbhand

2.4 API控制

按照qb_device_control.hqb_device_control.cpp的思路扩展即可。

2.5 通过rostopic pub发送topic控制

这个其实和API控制本质上是一样的,都是通过topic或者action。参考自:How to use the package!。具体步骤:

(1) 连接及启动qb_hand

roslaunch qb_hand_control control.launch standalone:=true activate_on_initialization:=true device_id:=1 device_name:=my_hand

参数含义(打开launch文件全都可以看到):

  • standalone: Choose whether or not to start the Communication Handler, default is false.
    设置为true的话,上面的连接qb_hand的命令就不需要单独执行了。
  • activate_on_initialization: Activates the motor at startup (the device will not move since the first command reference is received).
  • device_id: Each device has its own ID, you need to set the one of the actual device connect to your system.(单个qb设备直接忽略,多个设备时才需要设置。)
  • device_name: The unique device name used in the yaml controller configurations (also in the urdf if not already specified there) (单个qb设备直接忽略,多个设备时才需要设置。)
    其他有可能用上的参数:
  • use_rviz: Choose whether or not to use rviz.
  • use_controller_gui:
  • use_waypoints: Choose whether or not to use the waypoint references. Waypoint Control

(2)发送控制信息(使用tab补全)

rostopic pub -1 /my_hand/control/my_hand_synergy_trajectory_controller/command trajectory_msgs/JointTrajectory "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
joint_names:
- 'my_hand_synergy_joint'
points:
- positions: [0.5]
  velocities: [0]
  accelerations: [0]
  effort: [0]
  time_from_start: {secs: 1, nsecs: 0}"

猜你喜欢

转载自blog.csdn.net/lyh458/article/details/118423300