-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
iiwa_driver.h
46 lines (36 loc) · 1.37 KB
/
iiwa_driver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#include <string>
#include "drake/common/drake_copyable.h"
#include "drake/common/name_value.h"
namespace drake {
namespace manipulation {
namespace kuka_iiwa {
/** This config struct specifies how to wire up Drake systems between an LCM
interface and the actuation input ports of a MultibodyPlant. This simulates the
role that driver software and control cabinets would take in real life.
It creates an LCM publisher on the `IIWA_STATUS` channel and an LCM subscriber
on the `IIWA_COMMAND` channel. */
struct IiwaDriver {
/** The name of the model (`name` element of the `add_model` directive) in
the simulation that the driver will analyze to compute end effector inertia
for its copy of the arm in inverse dynamics. */
std::string hand_model_name;
/** Per BuildIiwaControl. */
double ext_joint_filter_tau{0.01};
/** The driver's control mode. Valid options (per ParseIiwaControlMode) are:
- "position_only"
- "position_and_torque" (default)
- "torque_only" */
std::string control_mode{"position_and_torque"};
std::string lcm_bus{"default"};
template <typename Archive>
void Serialize(Archive* a) {
a->Visit(DRAKE_NVP(hand_model_name));
a->Visit(DRAKE_NVP(ext_joint_filter_tau));
a->Visit(DRAKE_NVP(control_mode));
a->Visit(DRAKE_NVP(lcm_bus));
}
};
} // namespace kuka_iiwa
} // namespace manipulation
} // namespace drake