trick/trick_sims/ROS/SIM_ros_subscriber/S_define
Alex Lin 4c471eb32d Introduce Trick ROS publish/subscribe examples.
Introducing a pubish and subscribe example sim.  The publisher includes
a ROS msg file that is processed by ROS into a header file.

refs #190
2016-02-26 09:39:42 -06:00

21 lines
487 B
Plaintext

#include "sim_objects/default_trick_sys.sm"
##include "ros_comm/ros_framework.hh"
##include "ros_comm/ros_subscribe.hh"
class RosSubscribeSimObject : public Trick::SimObject {
public:
RosFramework rf ;
RosSubscribe rp ;
RosSubscribeSimObject() : rf("trick_listener") , rp() {
("initialization") rp.init() ;
C1 (0.5, "scheduled") rp.process() ;
("shutdown") rf.shutdown() ;
}
} ;
RosSubscribeSimObject rs_so ;