## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = ## note.0 = [[ROS/Tutorials|ROS Tutorials]] ## title = Interactive Markers: Writing a Simple Interactive Marker Server ## description = This tutorial explains how to setup a minimalist server which manages a single interactive marker. ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link=[[rviz/Tutorials/Interactive Markers: Basic Controls|Interactive Markers: Basic Controls]] ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = #################################### <> <> == The simple_marker tutorial explained == If you run the simple_marker example from [[interactive_marker_tutorials]] as described in the [[rviz/Tutorials/Interactive Markers: Getting Started|previous tutorial]], you will see this in RViz: {{attachment:simple_marker.png|The simple_marker example showing in RViz|width="100%"}} It shows the single interactive marker provided by the server node. Click on the arrow to move the box. What you will also see is that the server node prints out the current position of the marker each time you change it in RViz. This is the code of the server node: <> '''What this does is the following:''' * Define a function ''processFeedback'' which handles feedback messages from RViz by printing out the position. * Initialize roscpp. * Create an interactive marker server object. * Setup the interactive marker and add it to the server's collection. * Enter the ROS message loop. Note that when calling ''insert'', the server object will internally only push the new marker onto a waiting list. Once you call ''applyChanges'', it will incorporate it into it's publicly visible set of interactive markers and send it to all connected clients. That's all there is. You are now ready to go on to the next tutorial: [[rviz/Tutorials/Interactive Markers: Basic Controls|Interactive Markers: Basic Controls]]. ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE