@@ -1107,6 +1107,7 @@ def variableTreeWidget_on_right_click(self, item_position):
11071107 menu .addAction (dont_use_as_base_orientation_str )
11081108 else :
11091109 menu .addAction (use_as_base_orientation_str + " (xyzw Quaternion)" )
1110+ menu .addAction (use_as_base_orientation_str + " (wxyz Quaternion)" )
11101111
11111112 if item_size == 6 :
11121113 if item_key in self .visualized_3d_arrows :
@@ -1199,6 +1200,12 @@ def variableTreeWidget_on_right_click(self, item_position):
11991200 self .robot_state_path .base_orientation_path
12001201 ).setBackground (0 , QtGui .QBrush (deselected_base_color ))
12011202 self .robot_state_path .base_orientation_path = item_path
1203+ if "wxyz Quaternion" in action .text ():
1204+ self .robot_state_path .base_orientation_type = "wxyz"
1205+ elif "xyzw Quaternion" in action .text ():
1206+ self .robot_state_path .base_orientation_type = "xyzw"
1207+ else :
1208+ self .robot_state_path .base_orientation_type = "rpy"
12021209 # In real time mode, add those signal to the provider buffer
12031210 if (
12041211 self .signal_provider
@@ -1215,6 +1222,7 @@ def variableTreeWidget_on_right_click(self, item_position):
12151222
12161223 if action .text () == dont_use_as_base_orientation_str :
12171224 self .robot_state_path .base_orientation_path = []
1225+ self .robot_state_path .base_orientation_type = "rpy"
12181226 # if the item is used as base position we do not remove the color
12191227 if item_path != self .robot_state_path .base_position_path :
12201228 item .setBackground (0 , QtGui .QBrush (deselected_base_color ))
0 commit comments