Class o80::StateXd¶
-
template<typename ...Args>
class o80::StateXd¶ Similarly to an instance of State, an instance of StateXd represents the state of an actuator, and provides methods for iterpolating between states. The difference with State is that StateXd supports several attributes, e.g.
Joint2d will encapsulate an int and a double attribute.class Joint2d : public StateXd<Joint2d,int,double>
Public Functions
-
StateXd()¶
-
template<int INDEX>
std::tuple_element<INDEX, std::tuple<Args...>>::type get() const¶ returns the INDEXth attributes
-
template<int INDEX>
void set(typename std::tuple_element<INDEX, std::tuple<Args...>>::type value)¶ set the INDEXth attribute
-
std::string to_string() const¶
-
bool finished(const o80::TimePoint &start, const o80::TimePoint &now, const StateXd<Args...> &start_state, const StateXd<Args...> ¤t_state, const StateXd<Args...> &previous_desired_state, const StateXd<Args...> &target_state, const o80::Speed &speed) const¶
returns true if the speed command finished for the attribute at the first (0) index
-
StateXd<Args...> intermediate_state(const o80::TimePoint &start, const o80::TimePoint &now, const StateXd<Args...> &start_state, const StateXd<Args...> ¤t_state, const StateXd<Args...> &previous_desired_state, const StateXd<Args...> &target_state, const o80::Speed &speed) const¶
-
StateXd<Args...> intermediate_state(const o80::TimePoint &start, const o80::TimePoint &now, const StateXd<Args...> &start_state, const StateXd<Args...> ¤t_state, const StateXd<Args...> &previous_desired_state, const StateXd<Args...> &target_state, const o80::Duration_us &duration) const¶
-
StateXd()¶