8 int main(
int argc,
char **argv)
10 ROS_INFO(
"Starting simulation of a first-order, single-input plant.");
16 lyap_control::plant_msg msg;
33 ROS_INFO(
"Waiting 3s for rqt_plot to load.");
39 ROS_INFO(
"x1: %f setpt: %f", msg.x[0], msg.setpoint[0]);
45 x_dot[0] = 0.1*msg.x[0]+
u[0];
46 msg.x[0] = msg.x[0]+x_dot[0]*
delta_t;
void publish(const boost::shared_ptr< M > &message) const
int main(int argc, char **argv)
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)
static const double x_IC[num_states]
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void chatterCallback(const lyap_control::controller_msg &u_msg)
ublas_vector setpoint(num_states)
ROSCPP_DECL void spinOnce()
static const int num_states