3 import geometry_msgs.msg
as gm
4 import visualization_msgs.msg
as vm
14 node_name = rospy.get_name()
15 rospy.Subscriber(
'/'.join([node_name, name,
'update_interactive_marker']),
18 rospy.Subscriber(
'/'.join([node_name, name,
'update_pose']), gm.Pose,
20 rospy.Subscriber(
'/'.join([node_name, name,
'add_control']),
21 vm.InteractiveMarkerControl,
23 rospy.Subscriber(
'/'.join([node_name, name,
'remove_control']),
24 vm.InteractiveMarkerControl,
28 int_marker_org = self._server.get(name)
29 name_org = int_marker_org.name
30 int_marker_org = int_marker
31 int_marker_org.name = name_org
32 self._server.insert(int_marker_org, process_feedback)
33 self._server.applyChanges()
36 self._server.setPose(name, pose)
37 self._server.applyChanges()
40 int_marker = self._server.get(name)
41 cntrl = [c
for c
in int_marker.controls
if c.name == control.name]
43 int_marker.controls.append(control)
46 self._server.insert(int_marker, process_feedback)
47 self._server.applyChanges()
50 int_marker = self._server.get(name)
51 int_marker.controls = [c
for c
in int_marker.controls
if c.name != control.name]
52 self._server.insert(int_marker, process_feedback)
53 self._server.applyChanges()
def _remove_interactive_marker_control(self, name, control)
def _update_interactive_marker_pose(self, name, pose)
def _add_interactive_marker_control(self, name, control)
def __init__(self, server)
def process_feedback(feedback=None)
def _update_interactive_marker(self, name, int_marker)