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):
39 if self.
editor.active_frame
is not None:
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);