本文主要是介绍ROS学习笔记(八)::RVIZ::Interactive Markers: Writing a Simple Interactive Marker Server,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1 Interactive Markers: Interactive Markers: Writing a Simple Interactive Marker Server
说明:本教程介绍了如何设置一个管理交互标志物的最简单的服务器。
2.内容
如果你运行如前面的教程中介绍,interactive_marker_tutorials的simple_marker例子,你会在RViz看到:
这是服务器节点的代码:
https://raw.githubusercontent.com/ros-visualization/visualization_tutorials/indigo-devel/interactive_marker_tutorials/src/simple_marker.cpp
97 #include <ros/ros.h>
98
99 #include <interactive_markers/interactive_marker_server.h>
100
101 void processFeedback(
102 const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback )
103 {
104 ROS_INFO_STREAM( feedback->marker_name << " is now at "
105 << feedback->pose.position.x << ", " << feedback->pose.position.y
106 << ", " << feedback->pose.position.z );
这篇关于ROS学习笔记(八)::RVIZ::Interactive Markers: Writing a Simple Interactive Marker Server的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!