first prototype of templated rcl, using non-templated middleware interface, implemented by connext using dynamic data
This commit is contained in:
parent
a226aecd96
commit
bcecf00928
13 changed files with 416 additions and 0 deletions
16
userland/src/main.cpp
Normal file
16
userland/src/main.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include "rclcpp/Node.h"
|
||||
#include "rclcpp/Publisher.h"
|
||||
#include "std_msgs/Int32.h"
|
||||
|
||||
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
rclcpp::Node* n = create_node();
|
||||
rclcpp::Publisher<std_msgs::Int32>* p = n->create_publisher<std_msgs::Int32>("topic_name");
|
||||
std_msgs::Int32 ros_msg;
|
||||
ros_msg.data = 23;
|
||||
p->publish(ros_msg);
|
||||
ros_msg.data = 42;
|
||||
p->publish(ros_msg);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue