8 int main(
int argc,
char **argv)
15 lyap_control::plant_msg msg;
35 ROS_INFO(
"Waiting 3s for rqt_plot to load.");
41 ROS_INFO(
"x1: %f x2: %f", msg.x[0], msg.x[1]);
46 x_dot[0] = 0.1*msg.x[0]+
u[0];
47 x_dot[1] = 2.0*msg.x[1]+
u[1];
49 msg.x[0] = msg.x[0]+x_dot[0]*
delta_t;
50 msg.x[1] = msg.x[1]+x_dot[1]*
delta_t;
static const int num_inputs
void publish(const boost::shared_ptr< M > &message) const
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
lyap_control::controller_msg u_msg
ublas_vector u(num_inputs)
void chatterCallback(const lyap_control::controller_msg &u_msg)
static const double x_IC[num_states]
int main(int argc, char **argv)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
ublas_vector setpoint(num_states)
ROSCPP_DECL void spinOnce()
static const int num_states