How to assign geometry_msgs / Pose of ROS under arduino circumstances
#include <ros.h>
#include <geometry_msgs/Pose.h>
ros::NodeHandle nh;
geometry_msgs::Pose pose_msgs;
ros::Publisher pose("pose",&pose_msgs);
void setup(){
// put your setup code here, to run once:
//Serial.begin(9600);
nh.initNode();
nh.advertise(pose);
}
void loop() {
// put your main code here, to run repeatedly:
pose_msgs = {[1,2,3],[4,5,6,7]};
pose.publish(&pose_msgs);
nh.spinOnce();
delay(1000);
}
My answer:How to assign geometry_msgs / Pose of ROS under arduino circumstances?
Edit: How to assign geometry_msgs / Pose of ROS under arduino circumstances?
Please add a question...