
QBSOFTHAND2 RESEARCH USER MANUAL —
27
16
https://wiki.ros.org/ros_control
•
•
•
Control
As shown
before, the
control Node exploits the
Controller Manager which loads and runs
the device controllers. Each controller provides an Action Server that, together with the Hardware
Interface structure, allows the user to send commands to the relative device and get its measurements.
From an API point of view, it is implemented an Action Client which matches the relative trajectory
controller and provides a method to send Goals, i.e. command references, directly to the given device.
Additionally the Action Client is subscribed to a Topic (
*_controller/command
) that can be used to
send reference commands from outside the code, e.g. asynchronously from the command line, or from a
higher level control Node, e.g. as a result of a planning algorithm.
Regardless the control mode chosen for the given application, and apart form a customization of the API,
an example of how to launch and control one or more
qb SoftHand2 Research
with one synchronous
control node can be found in the subpackage qb_hand_control, in the launch folder. The files
control_qbhand2m.launch
or
control_qbhand2m_chain.launch
explains how to control one or several
devices.
Control Modes
For the sake of simplicity, we are going to cover all the control modes for a single
qb SoftHand2 Research
,
but it is just a matter of putting things together and set the launch file parameters properly to control
several devices together.
All the control modes are initialized in the same manner but with distinct command line arguments. The
default single-device control Node which brings everything up and simply waits for commands on the
above-mentioned Action topic is started with the following command:
roslaunch qb_hand_control control_qbhand2m.launch activate_on_initialization:=true standalone:=true
use_controller_gui:=true
The arguments explained
activate_on_initialization [false]
: Activates the motor at startup (the device will not move
since the first command reference is received).
device_id [1]
: Each device has its own ID, you need to set the one of the actual device connect to
your system.
standalone [false]
: Starts the Communication Handler together with the control Node. If you set
this to
false
(or remove it since the default value is
false
), you need to launch the
Communication Handler in a separate terminal.
WARNING:
It is recommended not to mix these two control modes: choose either to control the device
directly from the code by extending our API or through this command Topic.
Содержание SoftHand2 Research
Страница 4: ...8 5 The USB flash drive is not working 44...