12 from geometry_msgs.msg
import Pose
15 from visualization_msgs.msg
import InteractiveMarkerControl
22 self.editor.observers.append(self)
31 def update(self, editor, level, elements):
35 if self.editor.active_frame
is not self.
old_frame:
39 if self.editor.active_frame
is not None:
40 self.int_marker.name = self.editor.active_frame.name
41 self.int_marker.header.frame_id = self.editor.active_frame.parent
42 self.int_marker.pose = self.editor.active_frame.pose
44 self.server.applyChanges()
51 self.server.erase(self.old_frame.name)
52 self.server.applyChanges()
59 self.int_marker.name = frame.name
60 self.int_marker.header.frame_id = frame.parent
61 self.int_marker.pose = frame.pose
64 self.server.applyChanges()
72 '''arrows is a list with any number of the following strings: ["x", "y", "z", "a", "b", "c"].''' 80 int_marker = InteractiveMarker()
81 int_marker.header.frame_id =
"" 83 int_marker.description =
"Frame Editor" 84 int_marker.pose = Pose()
85 int_marker.scale = scale
88 control = InteractiveMarkerControl()
89 control.name =
"move_x" 91 control.interaction_mode = InteractiveMarkerControl.MOVE_AXIS
92 int_marker.controls.append(control);
95 control = InteractiveMarkerControl()
96 control.name =
"move_y" 98 control.interaction_mode = InteractiveMarkerControl.MOVE_AXIS
99 int_marker.controls.append(control);
102 control = InteractiveMarkerControl()
103 control.name =
"move_z" 105 control.interaction_mode = InteractiveMarkerControl.MOVE_AXIS
106 int_marker.controls.append(control);
109 control = InteractiveMarkerControl()
110 control.name =
"rotate_x" 112 control.interaction_mode = InteractiveMarkerControl.ROTATE_AXIS
113 int_marker.controls.append(control);
116 control = InteractiveMarkerControl()
117 control.name =
"rotate_y" 119 control.interaction_mode = InteractiveMarkerControl.ROTATE_AXIS
120 int_marker.controls.append(control);
124 control = InteractiveMarkerControl()
125 control.name =
"rotate_z" 127 control.interaction_mode = InteractiveMarkerControl.ROTATE_AXIS
128 int_marker.controls.append(control);
def __init__(self, frame_editor)
def update(self, editor, level, elements)
def NewQuaternion(x, y, z, w)
Orientation ##.
def callback_marker(self, feedback)
old_frame
Stop currently active frame.
def set_marker_settings(self, arrows, frame=None, scale=0.25)
style_marker = Marker() style_marker.scale = NewVector3(0.75*scale, 0.75*scale, 0.75*scale) style_marker.color = NewColor(0.0, 0.5, 0.5, 0.75)
def make_interactive(self, frame)