Control
As shown before, the control Node exploits the
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 (
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.
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.
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]
since the first command reference is received).
•
device_id [1]
your system.
•
standalone [false]
this to
(or remove it since the default value is
false
Communication Handler in a separate terminal.
https://wiki.ros.org/ros_control
16
: Each device has its own ID, you need to set the one of the actual device connect to
: Starts the Communication Handler together with the control Node. If you set
QBSOFTHAND2 RESEARCH USER MANUAL — 27
16
ros_control
Controller Manager which loads and runs
*_controller/command
: Activates the motor at startup (the device will not move
), you need to launch the
false
) that can be used to
Need help?
Do you have a question about the SoftHand2 Research and is the answer not in the manual?
Questions and answers