古老师,我尝试自己写了一个节点去监听某个话题里的消息visualization_msgs/InteractiveMarkerUpdate,需要监听的消息内容是visualization_msgs/InteractiveMarkerPose[] poses
std_msgs/Header header
uint32 seq
time stamp
string frame_id
geometry_msgs/Pose pose
geometry_msgs/Point position
float64 x
float64 y
float64 z
geometry_msgs/Quaternion orientation
float64 x
float64 y
float64 z
float64 w
string name
string[] erases
我写的节点里的回调函数是
a=msg->poses[0].pose.position.x;
b=msg->poses[0].pose.position.y;
c=msg->poses[0].pose.position.z;
x=msg->poses[0].pose.orientation.x;
y=msg->poses[0].pose.orientation.y;
z=msg->poses[0].pose.orientation.z;
w=msg->poses[0].pose.orientation.w;
ROS_INFO("I heard pose a:[%f] b:[%f] c:[%f] x[%f] y:[%f] z:[%f] w:[%f]",a, b,c,x,y,z,w);
编译没有问题,但是一运行就提示段错误 (核心已转储)
请问下这是什么问题
展示全文
第三方账号登入
QQ 微博 微信