File statexd.hpp

namespace o80
template<typename ...Args>
class StateXd
#include <statexd.hpp>

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.

class Joint2d : public StateXd<Joint2d,int,double>
Joint2d will encapsulate an int and a double attribute.

Public Functions

StateXd(Args... args)
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...> &current_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...> &current_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...> &current_state, const StateXd<Args...> &previous_desired_state, const StateXd<Args...> &target_state, const o80::Duration_us &duration) const
StateXd<Args...> intermediate_state(long int start_iteration, long int current_iteration, const StateXd<Args...> &start_state, const StateXd<Args...> &current_state, const StateXd<Args...> &previous_desired_state, const StateXd<Args...> &target_state, const o80::Iteration &iteration) const
template<class Archive>
inline void serialize(Archive &archive)

Private Members

std::tuple<Args...> values_