33 static std::unique_ptr<MobileIO>
create(
const std::string& family,
const std::string& name);
39 bool resetUI(
bool acknowledge_send =
true);
44 bool setAxisSnap(
int axis_number,
float snap_to,
bool acknowledge_send =
true);
45 bool disableAxisSnap(
int axis_number,
bool acknowledge_send =
true) {
return setAxisSnap(axis_number, std::numeric_limits<float>::quiet_NaN()); }
46 bool setAxisValue(
int axis_number,
float value,
bool acknowledge_send =
true);
47 bool setAxisLabel(
int axis_number,
const std::string& message,
bool acknowledge_send =
true);
50 bool setButtonLed(
int button_number,
bool on,
bool acknowledge_send =
true);
53 bool setButtonLabel(
int button_number,
const std::string& message,
bool acknowledge_send =
true);
55 bool setLedColor(uint8_t r, uint8_t g, uint8_t b,
bool acknowledge_send =
true);
57 bool appendText(
const std::string& message,
bool acknowledge_send =
true);
58 bool clearText(
bool acknowledge_send =
true);
80 MobileIO(std::shared_ptr<hebi::Group> group) : group_(std::move(group)), fbk_(group_->size()) {}
82 std::shared_ptr<hebi::Group> group_;
85 std::bitset<NumButtons> buttons_{};
86 std::array<float, NumButtons> axes_{};
88 std::bitset<NumButtons> prev_buttons_{};
89 std::array<float, NumButtons> prev_axes_{};
A list of Feedback objects that can be received from a Group of modules; the size() must match the nu...
Definition: group_feedback.hpp:18
ButtonState getButtonDiff(int button) const
Definition: mobile_io.cpp:175
Structure to hold a 3-D floating point vector (i.e., x/y/z components)
Definition: vector_3_f.hpp:8
bool setAxisLabel(int axis_number, const std::string &message, bool acknowledge_send=true)
Definition: mobile_io.cpp:90
bool update(int32_t timeout_ms=Group::DEFAULT_TIMEOUT_MS)
Definition: mobile_io.cpp:23
Structure to hold a floating point quaternion (i.e., w/x/y/z components)
Definition: quaternion_f.hpp:8
static const int32_t DEFAULT_TIMEOUT_MS
The default timeout for any send-with-acknowledgement or request operation is 500 ms.
Definition: group.hpp:77
const Vector3f getArPosition() const
Definition: mobile_io.hpp:64
static std::unique_ptr< MobileIO > create(const std::string &family, const std::string &name)
Definition: mobile_io.cpp:14
Feedback objects have various fields representing feedback from modules; which fields are populated d...
Definition: feedback.hpp:32
Definition: mobile_io.hpp:21
bool setButtonLed(int button_number, bool on, bool acknowledge_send=true)
Definition: mobile_io.cpp:110
bool appendText(const std::string &message, bool acknowledge_send=true)
Definition: mobile_io.cpp:147
bool setButtonLabel(int button_number, const std::string &message, bool acknowledge_send=true)
Definition: mobile_io.cpp:129
bool setButtonMode(int button_number, ButtonMode mode, bool acknowledge_send=true)
Definition: mobile_io.cpp:100
bool setLedColor(uint8_t r, uint8_t g, uint8_t b, bool acknowledge_send=true)
Definition: mobile_io.cpp:139
const hebi::Feedback & getLastFeedback() const
Definition: mobile_io.hpp:61
bool resetUI(bool acknowledge_send=true)
Definition: mobile_io.cpp:52
float getAxis(int axis) const
Definition: mobile_io.cpp:163
bool clearText(bool acknowledge_send=true)
Definition: mobile_io.cpp:155
bool getButton(int button) const
Definition: mobile_io.cpp:169
const Quaternionf getArOrientation() const
Definition: mobile_io.hpp:67
bool setAxisValue(int axis_number, float value, bool acknowledge_send=true)
Definition: mobile_io.cpp:80
ButtonMode
Definition: mobile_io.hpp:25
bool setAxisSnap(int axis_number, float snap_to, bool acknowledge_send=true)
Definition: mobile_io.cpp:70
bool disableAxisSnap(int axis_number, bool acknowledge_send=true)
Definition: mobile_io.hpp:45
ButtonState
Definition: mobile_io.hpp:27
static constexpr size_t NumButtons
Definition: mobile_io.hpp:23