Acts as a server displaying a set of interactive markers. More...
Public Member Functions | |
def | __del__ (self) |
Destruction of the interface will lead to all managed markers being cleared. More... | |
def | __init__ (self, topic_ns, server_id="", q_size=100) |
Create an InteractiveMarkerServer and associated ROS connections. More... | |
def | applyChanges (self) |
Apply changes made since the last call to this method & broadcast an update to all clients. More... | |
def | clear (self) |
Clear all markers. More... | |
def | doSetPose (self, update, name, pose, header) |
def | erase (self, name) |
Erase the marker with the specified name Note: This change will not take effect until you call applyChanges(). More... | |
def | get (self, name) |
Get marker by name. More... | |
def | insert (self, marker, feedback_cb=-1, feedback_type=DEFAULT_FEEDBACK_CB) |
Add or replace a marker. More... | |
def | keepAlive (self, msg) |
def | processFeedback (self, feedback) |
def | publish (self, update) |
def | publishInit (self) |
def | setCallback (self, name, feedback_cb, feedback_type=DEFAULT_FEEDBACK_CB) |
Add or replace a callback function for the specified marker. More... | |
def | setPose (self, name, pose, header=Header()) |
Update the pose of a marker with the specified name Note: This change will not take effect until you call applyChanges() More... | |
Public Attributes | |
init_pub | |
marker_contexts | |
mutex | |
pending_updates | |
seq_num | |
server_id | |
topic_ns | |
update_pub | |
Static Public Attributes | |
int | DEFAULT_FEEDBACK_CB = 255 |
Acts as a server displaying a set of interactive markers.
Note: Keep in mind that changes made by calling insert(), erase(), setCallback() etc. are not applied until calling applyChanges().
Definition at line 73 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.__init__ | ( | self, | |
topic_ns, | |||
server_id = "" , |
|||
q_size = 100 |
|||
) |
Create an InteractiveMarkerServer and associated ROS connections.
topic_ns | The interface will use the topics topic_ns/update and topic_ns/feedback for communication. |
server_id | If you run multiple servers on the same topic from within the same node, you will need to assign different names to them. Otherwise, leave this empty. |
Definition at line 82 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.__del__ | ( | self | ) |
Destruction of the interface will lead to all managed markers being cleared.
Definition at line 106 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.applyChanges | ( | self | ) |
Apply changes made since the last call to this method & broadcast an update to all clients.
Definition at line 229 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.clear | ( | self | ) |
Clear all markers.
Note: This change will not take effect until you call applyChanges().
Definition at line 178 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.doSetPose | ( | self, | |
update, | |||
name, | |||
pose, | |||
header | |||
) |
Definition at line 386 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.erase | ( | self, | |
name | |||
) |
Erase the marker with the specified name Note: This change will not take effect until you call applyChanges().
name | Name of the interactive marker |
Definition at line 161 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.get | ( | self, | |
name | |||
) |
Get marker by name.
name | Name of the interactive marker |
Definition at line 283 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.insert | ( | self, | |
marker, | |||
feedback_cb = -1 , |
|||
feedback_type = DEFAULT_FEEDBACK_CB |
|||
) |
Add or replace a marker.
Note: Changes to the marker will not take effect until you call applyChanges(). The callback changes immediately.
marker | The marker to be added or replaced |
feedback_cb | Function to call on the arrival of a feedback message. |
feedback_type | Type of feedback for which to call the feedback. |
Definition at line 116 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.keepAlive | ( | self, | |
msg | |||
) |
Definition at line 361 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.processFeedback | ( | self, | |
feedback | |||
) |
Definition at line 309 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.publish | ( | self, | |
update | |||
) |
Definition at line 367 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.publishInit | ( | self | ) |
Definition at line 373 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.setCallback | ( | self, | |
name, | |||
feedback_cb, | |||
feedback_type = DEFAULT_FEEDBACK_CB |
|||
) |
Add or replace a callback function for the specified marker.
Note: This change will not take effect until you call applyChanges(). The server will try to call any type-specific callback first. If none is set, it will call the default callback. If a callback for the given type already exists, it will be replaced. To unset a type-specific callback, pass in an empty one.
name | Name of the interactive marker |
feedback_cb | Function to call on the arrival of a feedback message. |
feedback_type | Type of feedback for which to call the feedback. Leave this empty to make this the default callback. |
Definition at line 193 of file interactive_marker_server.py.
def interactive_markers.interactive_marker_server.InteractiveMarkerServer.setPose | ( | self, | |
name, | |||
pose, | |||
header = Header() |
|||
) |
Update the pose of a marker with the specified name Note: This change will not take effect until you call applyChanges()
name | Name of the interactive marker |
pose | The new pose |
header | Header replacement. Leave this empty to use the previous one. |
Definition at line 134 of file interactive_marker_server.py.
|
static |
Definition at line 74 of file interactive_marker_server.py.
interactive_markers.interactive_marker_server.InteractiveMarkerServer.init_pub |
Definition at line 97 of file interactive_marker_server.py.
interactive_markers.interactive_marker_server.InteractiveMarkerServer.marker_contexts |
Definition at line 91 of file interactive_marker_server.py.
interactive_markers.interactive_marker_server.InteractiveMarkerServer.mutex |
Definition at line 85 of file interactive_marker_server.py.
interactive_markers.interactive_marker_server.InteractiveMarkerServer.pending_updates |
Definition at line 95 of file interactive_marker_server.py.
interactive_markers.interactive_marker_server.InteractiveMarkerServer.seq_num |
Definition at line 84 of file interactive_marker_server.py.
interactive_markers.interactive_marker_server.InteractiveMarkerServer.server_id |
Definition at line 87 of file interactive_marker_server.py.
interactive_markers.interactive_marker_server.InteractiveMarkerServer.topic_ns |
Definition at line 83 of file interactive_marker_server.py.
interactive_markers.interactive_marker_server.InteractiveMarkerServer.update_pub |
Definition at line 98 of file interactive_marker_server.py.